#circuitpython-dev

1 messages Β· Page 232 of 1

exotic pumice
#

right?

tulip sleet
#

what is it supposed to be?!

exotic pumice
#

TC0 and TC1 are both 9

#

but the way they wrote it is pretty cruel

tulip sleet
#

you mean they only have one clock for both?

exotic pumice
#

yeah

#

so if you create an enum out of that chart without reading all the indexes, you end up off by one and you turn on the wrong clock instead of the sercom clock

tulip sleet
#

I think you should file an issue with MicroChip about that, to note it in the doc.

exotic pumice
#

haha, there are several issues I could file with microchip

tulip sleet
#

I'm just looking to see if it's a typo or something

exotic pumice
#

they state that divsel makes the divider 2^(n+1) when in fact it's 2*(n+1)

#

I've found a few issues in their SVD as well

umbral dagger
#

Any objections to me calling my CP version of Lispy "CircuitLisp"?

tulip sleet
#

They do respond to filed cases via their issues/case mechanism. At least it will be put on someone's TODO list.

#

Note entry 26. The entries for 9 should be like that.

#

@umbral dagger I'd say pass it by pt.

exotic pumice
#

or like entry 3

tulip sleet
#

yah

exotic pumice
#

where is this issue tracker?

tulip sleet
#

hold on...

exotic pumice
#

alright, I'll get on that

#
Hello,

I spent the last two months trying to track down a bug that ultimately ended up being due to the confusing way you have listed TC0 and TC1 in the PCHCTRLm table, table 14-9. You have two entries in the table with the same index (9), but no visual indication that they are linked. This caused me to write an enum starting at 0, going along every row of the table, which led to an off by one error, because I didn't see TC0 and TC1 were actually the same index. I recommend you change the way you have noted TC0 and TC1 to something more like entry 3 or entry 25, so it is more visually clear that they are the same index. I'm hoping an improvement to this documentation can prevent others from making the same mistake I did.

Cheers,
Paul Sajna
#

submitted one for divsel, now I gotta remember all the SVD issues I found

#

maybe I'll just send them a diff as a .patch file

meager fog
#

@exotic pumice wow - nice find

#

there are some typos in ASF and they are Really Exciting :/

solar whale
#

@slender iron FYI -- I was able to get the displaytest you posted yesterday running with these two changes -- do they make sesnse?

meager fog
#

@gilded cradle heya do you need any help with seting up ESPSPI? ive been swamped πŸ˜ƒ

solar whale
#

@meager fog I think she has it running -- she tested some examples I posted in a PR to the repo

exotic pumice
#

I filed 3 issues.

manic glacierBOT
marble hornet
#

@slender iron any naming preference on the shape lib?

meager fog
#

@solar whale cool - yeah i commented that maybe a wifi manager could be useful. i dont think ill get to writing one soon - i have some socket optimizations to work on which are weedy

#

to make a happy wrapper that is optimized for requests which, honestly, is what everyone wants

#

like you'd call get or post directly on the object and it would ferry that to requests for you

#

then you just init it, and call get/post to fetch data. then on each call it would also check connection n all that

#

maybe also expose ping

#

i like using the neopixel for status too, blinks when xfering data, red when connecting to wifi, etc

solar whale
#

OK - thanks -- will take a look -- lots of new stuff for me so it may not be fast...

meager fog
#

any suggestions?

#

you dont have to write it all, i can probably do some πŸ˜„

#

just figure it would be nice to not replicate the access point code

marble hornet
#

and a shapes ever not in a tilegrid?

solar whale
#

@meager fog OK -- took a few minutes to sink in , but I think I see waht you are looking for. sounds likea good way to go. I'll see what I can do - should have some time this weekend

#

or if @gilded cradle would prefer to take it on, thats fine with me

meager fog
#

kk

slender iron
#

@solar whale ya, those fixes look good

#

@marble hornet how about "Adafruit_CircuitPython_Display_Shape"?

#

and ya, I think all in a tilegrid to start so that the api can include color

marble hornet
#

give me a min to commit my local code

#

i haz more questions, do you have a few min?

manic glacierBOT
marble hornet
#

pushed!

#

okay two things: does adafruit mind forking from my repo? (if not this is me giving express permission to gank the code as long as it is attributed)

manic glacierBOT
idle owl
#

@marble hornet We have forked other repos previously, but it's usually easier to create a new repo. You have to put all the code into cookiecutter and deal with all of that anyway. And of course you would get attribution πŸ˜ƒ

manic glacierBOT
gilded cradle
#

Hi @meager fog, yeah I got it working. @solar whale, yeah I could probably take that on. Seems pretty straight forward and is definitely in my wheelhouse.

solar whale
#

@gilded cradle Great! Go for it -- let me know if you need any help or testing.

gilded cradle
#

Ok. I'll have to wait until later tonight to work on it, but I'll let you know if I have any questions.

solar whale
#

I would not have done anthing until Friday at the soonest.

gilded cradle
#

Yeah, I'm trying to juggle a bunch of stuff with moving and all, so I'll need to sneak in a little development here and there when I can.

solar whale
#

Life happens πŸ˜‰ Good luck moving?

manic glacierBOT
gilded cradle
#

Thanks @solar whale

solar whale
#

@tulip sleet ran into an interesting issue -- I am testingthe adafruit_featherwing library alphanum or sevensegment functions and they work fine on a feather_m4_express, but they put the feather_nrf52840 (and argon) into safe mode -- I am running current master on all boards

gilded cradle
#

They use the Adafruit_CircuitPython_HT16K33 library. Could you try the example in that?

solar whale
#

actually they crash the nrf boards -- drop USB and end up in safe mode

tulip sleet
#

could you figure out the simplest example and file an issue? They are I2C, right?

solar whale
#

yes -- working on a simple example -- will file an issue -- just wanted to give a heads up. Yes I2C

tulip sleet
#

we haven't changed anything about I2C recently, so hmm

solar whale
#

I've heard that before πŸ˜‰

tulip sleet
#

i'll set it up with a doubler or something to debug. It might be due to I2C hogging the CPU so the BLE softdevice gets mad, maybe, maybe

solar whale
#

OK -- I'm just running the "simpletest" for the alphanum or sevensegment (in latest pr). I'll try the ht16k33 test now

#

ht16k33 test works OK on the feather_nrf52840

gilded cradle
#

Oh, that's good news. Can you tell which functionality on the FeatherWing library simpletest it fails on? I usually try and have it do a thorough range of stuff.

solar whale
#

not yet -- it fails very quickly at the start and the terminal session closes so I loose any messages. working on a test

gilded cradle
#

Ok. I was thinking of commenting out most of the stuff and slowly uncommenting until it fails.

solar whale
#

Ill first jsut run in manually in the REPL

gilded cradle
#

That works too

solar whale
#

very strange -- the alphanum works fine when I run the commands normally fial the REPL

gilded cradle
#

Maybe it's running stuff too rapidly that causes it?

solar whale
#

but boom if IT run the script...

#

I'll ad some delays

gilded cradle
#

kk

solar whale
#

it crashes on the import of the featherwing lib.

#

this kills it ```print("import sleep")
from time import sleep
sleep(1)
print("import featherwing")
from adafruit_featherwing import alphanum_featherwing

gilded cradle
#

Ok, that's odd. I'll take a closer look at the code. I just ordered an NRF52840 so I can use that for testing in the future.

solar whale
#

from adafruit_featherwing import alphanum_featherwing works via REPL but crashes if in script. just the one line

gilded cradle
#

I wonder if we can change it to import alphanum_featherwing and then in the instantiation change it to alphanum_featherwing.AlphaNumFeatherWing(

solar whale
#

@tulip sleet see above -- one line kills it -- shpuld I file the issue in circuitpython or featherwing?

gilded cradle
#

@solar whale, could you try different versions of CP?

solar whale
#

yes, will try that

gilded cradle
#

Like if you're trying 4, try 3

#

Cool

solar whale
#

not sure if 3 support the nrf boards

gilded cradle
#

Oh, good point

solar whale
#

I try earlier version of 4.

gilded cradle
#

Ok. If we can get it to not fail then it may be a CP bug.

tulip sleet
#

@solar whale @gilded cradle if you can, try beta.1 or alpha.5 on the nRF too, since there have been significant changes since then

solar whale
#

it fails on beta2 and on beta0

tulip sleet
#

beta.2 changed how the BLE and tinyusb stuff were set up. It's a significant change for the nRF52840

gilded cradle
#

Yeah, I think I tried it on all betas while developing with the Feather M4 Express

#

However, I'll try it on the nrf board when that comes in

solar whale
#

I have to rebuild before beta0 since there are not .uf2s --- but since it work in REPL -- hard to thin whats going on.

#

but since it does work in the RPL, hard to blame the library... I'll open an issue in CP.

gilded cradle
#

Well, what probably happens is that when it's imported, it cascades other imports within those libraries, so maybe we need to dig a little deeper.

#

However, I'm not sure why it wouldn't fail in the REPL in that case, but worth looking at.

raven canopy
#

i'm trying to find it, but i remember an issue with periph calls too early after reset... can't remember if it was in the GH issues or on the forum.

manic glacierBOT
solar whale
#

I have to go for a few hours -- will dig more later.

gilded cradle
#

Ok, thanks for your work with looking into that Jerry

solar whale
#

it would be nice if someone can reproduce the issue

raven canopy
#

"You build it, we'll break it!" - Jerryn Industries. πŸ˜„ Thanks @solar whale. if i had any of my particle boards CP'd, I would try. prob won't have any cycles tonight...

#

uh-oh...

/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: build-itsybitsy_m0_express/firmware.elf section `.text' will not fit in region `FLASH'
/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld: region `FLASH' overflowed by 7380 bytes
collect2: error: ld returned 1 exit status
Makefile:446: recipe for target 'build-itsybitsy_m0_express/firmware.elf' failed
make: *** [build-itsybitsy_m0_express/firmware.elf] Error 1

may have to try and update the branch to current, or abandon M0. 😬

solar whale
#

Note - it is not in code.py just a manually imported script

raven canopy
#

oh...that's even more perplexing. πŸ€”

gilded cradle
#

What do you mean by manually imported script?

solar whale
gilded cradle
#

Huh, I'll have to try that.

solar whale
#

That is how I run all tests. Rarely use code.py

gilded cradle
#

But the import statement was inside code.py or from the REPL?

solar whale
#

REPL

gilded cradle
#

Ah, ok. That makes sense then.

raven canopy
#

can be done in code.py as well, though.

gilded cradle
#

Yeah, I just was asking how jerry did it.

raven canopy
#

its a nice little technique. reduces having to keep track of all those code/main .py's. πŸ˜„

gilded cradle
#

Hehe, I just always keep renaming mine and creating a new code.py. πŸ˜ƒ

solar whale
#

I just copy the file to the.board then import.

gilded cradle
#

I hadn't thought about doing that, but I probably will more often now.

solar whale
#

I only use code.py for finished projects.

raven canopy
#

whats a finished project? never experienced that... 🀣

gilded cradle
#

I use it for dev work because I can just save it and it reloads

solar whale
#

That scares me πŸ˜‰

gilded cradle
#

Well, it sure speeds things up. However, I can see it being a problem if it puts your board in a looping state.

#

In that case, it may be good to place a 2 second delay before code starts executing so you have a chance to put it in REPL mode.

solar whale
#

but now you can force boot to safe mode so you can remove the file

gilded cradle
#

How do you do that?

solar whale
#

slow double tap on RESET button about .5 sec -- instead of going to bootloader - it goes to safe mode -- yellow neopixel

gilded cradle
#

Oh, thanks. I didn't know about that.

solar whale
#

i have never used until just now it works!

gilded cradle
#

πŸ˜ƒ

solar whale
#

more like 1 second between tap

gilded cradle
#

Ah, ok

solar whale
#

I thought I was leaving ... soon

gilded cradle
#

πŸ˜ƒ

solar whale
#

looking at the library code -- it ia hard to see a cause, but as I have learned, when code does not work, stop focusing on waht it is supposed to do and focus on what it is doing....

gilded cradle
#

Yeah

raven canopy
#

hmm. time to ask myself this question again: to git reset --hard or wade through a painful merge/rebase. reset and re-glue wins...

solar whale
#

I'm fond of git pull --rebase upstream master git push --force-with-lease origin master

manic glacierBOT
raven canopy
#

i guess i could give that a shot. i am way off from current, and have changes peppered throughout. thanks @solar whale

#

i've backed up the "difficult" stuff, so if i lose it all the easy things won't take to long.

solar whale
#

at least it's a known starting point. just save your changes!!

#

yay -- finally time to go -- I'm hungry -- back later.

manic glacierBOT
raven canopy
#

windows and symlinks. 😑

manic glacierBOT
wild pasture
#

@tulip sleet Really, I was hoping there was a comprehensive guide on memory profiling, optimization etc. I did my due diligence but only found the one page on expectations that mentioned around 250 lines of code. CPX board

#

@tulip sleet Idk if there's coding tips somewhere or a guide to "Just skip python and move to c code if you...".

tulip sleet
#

@wild pasture i'm in a mtg but will get back to you!

wild pasture
#

@tulip sleet No rush! Sorry, i had to bail yest bc I have a 13 week pregnant gf who needed dinner ASAP lol. Ty, appreciate it!

manic glacierBOT
slender iron
umbral dagger
#

No ure module in the Feather nRF52840 build?

slender iron
#

Β―_(ツ)_/Β―

umbral dagger
#

It's there on the grand central and feather m4 & itsy bitsy m4

tulip sleet
#

@umbral dagger, that's an accident; could you file an issue? Is json there also?

#

is it re instead of ure?

umbral dagger
#

=I'm not using json

#

It's ure on the others

#

json is there

#

no re, no ure

manic glacierBOT
wild pasture
#

@slender iron will do. Any self-service i can do i will. Appreciate it!

manic glacierBOT
tulip sleet
#

@slender iron ohmygoodness, the nrf port is actually using MICROPY_OBJ_REPR_A, and atmel-samd is using REPR_C. REPR_A uses heap-allocated floats (!) (which means two more bits of accuracy, but more ram)

#

like I said, I'm going to refactor the includes so these are all consistent

slender iron
#

interesting! I'm considering boxing in 2-tuple of small int

#

really handy for position tuples

tulip sleet
#

you could overlay that with the 31-bit ints, I guess - no need to actually make it identifiable as a 2-tuple

#
atmel:
>>> 1/3
0.333333
nrf:
>>> 1/3
0.3333333

we're not going to keep this

exotic pumice
#

gotta have that quad floating point πŸ˜›

#

it's an stm32

manic glacierBOT
raven canopy
#

@slender iron @tulip sleet i'm trying to get FrequencyIn back to an active review, but in seeing that we're out of memory on M0 express, I'm guessing that I should just scrap M0 support?

slender iron
#

@raven canopy ya, maybe make a frequencyio for it

#

you can leave any m0 code in that you have

raven canopy
#

πŸ€” yeah, that would probably be the easiest way. seeing as how we're trying to get out of the #ifdef quagmire.

slender iron
#

yup yup

exotic pumice
#

haha pound-define heck

raven canopy
#

good thing i'm re-gluing anyway... haha

manic glacierBOT
#

@ladyada Note comment above (https://github.com/adafruit/circuitpython/issues/1270#issuecomment-429569293) that Nordic says low-speed pins should use standard drive to avoid RFI. So there are arguments both ways: high drive so we can drive a lot of stuff easily; standard drive to avoid RFI. Maybe we'll have to document this, since if we respect the guidelines, it'll be confusing which are available for high drive.

exotic pumice
#

I'd be happy to help review if you like

#

seeing as I know so much about clocks now πŸ˜…

umbral dagger
#

I just submitted a very (IMO) interesting guide and code. πŸ˜ƒ

exotic pumice
#

lispy?

umbral dagger
#

Now officially CircuitScheme

exotic pumice
#

cool

umbral dagger
#

It has a ways to go, but it's a good start. A better REPL is next on my list for it. I expect it to be an ongoing project for a while.

exotic pumice
#

saaaaaaaaaame. I just "finished" atsamd-rs for samd51 but it has a ways to go for things like the dac, adc, dma, rng, aes, etc.

#

If I want to build up abstractions on all those

solar whale
#

@gilded cradle I won’t be able to do any more with the FeatherWing lib on the nRF52840 tonight. May be Friday before I can spend much time on it. In the meantime can someone with an nRF52840 try to reproduce the issue?
https://github.com/adafruit/circuitpython/issues/1545

gilded cradle
#

Ok @solar whale . If somebody else isn't able to, I should get my board and be able to take over on Friday.

solar whale
#

Great! I’ll be able to dig into it as well. I’m really curious what is going on.

tulip sleet
#

i'll look at this also, but prob not tonight

exotic pumice
#

oh btw @raven canopy , I ended up needing a C version of clock_out for my debugging, might help you out in creating your own test frequencies

#include "sam.h"


int main(void)
{
    GCLK->GENCTRL[2].reg = 
        GCLK_GENCTRL_SRC(GCLK_GENCTRL_SRC_DFLL_Val) | 
        GCLK_GENCTRL_GENEN |
        GCLK_GENCTRL_DIV(4u) |
        GCLK_GENCTRL_OE;
    
    PORT->Group[0].DIRSET.reg=PORT_PA16;
    PORT->Group[0].PINCFG[PIN_PA16].bit.PMUXEN = 1;
    PORT->Group[0].PMUX[PIN_PA16 >> 1].reg |= GPIO_PIN_FUNCTION_M;

    while (1) {}
}
#

indentation is hard

raven canopy
#

hehe. yeah, especially in the code blocks. the kerning there is...bleh.

exotic pumice
#

that's gclk2, 12MHz, PA16 (metro m4 d13)

#

you have to pick a gclk matching your pin

#

it's under pin function m on the datasheet

#

or h on '21

#

in which case you also have to change the 12 up there

#

I wrote this in a hurry πŸ˜…

#

there

main meteor
#

@slender iron looks from that deep dive video like you're a fellow Graphviz aficionado.

slender iron
#

πŸ˜ƒ it worked well enough

exotic pumice
exotic pumice
#

@raven canopy have you looked into the freqm peripheral for frequency in on D51?

#

I guess you probably want something that works on 21 and nRF and such

tulip sleet
#

@exotic pumice Yay!

manic glacierBOT
#

to clarify -- I test this as follows:
create a script named alnum.py containing the single line
from adafruit_featherwing import alphanum_featherwing

then copy alnum.py to the CIRCUITOY drive and execute it via the REPL:
import alnum
the board immediately disconnects from USB and the NEOPIXEL goes Yellow indicating safe mode.

pressing RESET brings it back to normal

If you copy/paste the same command to the REPL it executes normally.

manic glacierBOT
#

Note that I have just started doing a large refactor of the #define stuff so we can have consistent settings across our ports. See #1547. I'm introducing an mpconfig_circuitpy.h file (or some name like that), which will have common settings, will check for small and large flash sizes, etc. Also I'll have on/off #defines for each native module so they are easily enabled/disabled in mpconfigport.h or mpconfigboard.h.

raven canopy
#

@exotic pumice I have. But FREQM is only for measuring internal clocks. I actually used it in a previous iteration, to help adjust readings due to open-loop DFLL drifting.

raven canopy
exotic pumice
#

@raven canopy It looked like you could feed in external clocks on gclk_io, the way I read it

umbral dagger
#

@tulip sleet Let me know when ure is available in the '840 build and I'll build/test it against CircuitScheme.

manic glacierBOT
raven canopy
#

@exotic pumice well, yeah, that might actually work. Could be an interesting dance with configuring the REF_CLK though (lower-but-not-too-low frequency, adequate REFNUM). Not that using the TC hasn't been a dance. Haha

#

And thanks for pointing that out. My inexperience let me look past that as an option.

lime trellis
#

@exotic pumice just read your comment about atsamd-rs. VERY exciting πŸ˜ƒ πŸ‘

exotic pumice
#

πŸ˜ƒ

#

do you want github/gitter links?

lime trellis
#

haha post them in case other folks are interested. But I already hunted your fork down.
https://github.com/sajattack/atsamd

exotic pumice
marble hornet
#

woohoo

lime trellis
exotic pumice
#

ESP32 would be totally new to me,but you could add a board def for the M4, which exact chip are you using?

lime trellis
#

The J20A

exotic pumice
#

ah ok, so it would be a tiny bit more work than a board def, we'd need to add the pac for that chip too.

lime trellis
#

ESP32 is actually most easily interacted with via ladyada's ESP32 SPI library

gilded cradle
#

Oh, that's the one I'm working on at the moment

#

Adding a WiFi manager

exotic pumice
#

@lime trellis, so that library would need a rust version too

lime trellis
exotic pumice
#

cool

manic glacierBOT
#

Yes, thanks for pointing that out. I did miss a couple of cases as I'm working on this. The new file has a ton of #ifdef's and #ifndef's. However, the individual port and board files should be a lot nicer.

I want also to combine the .mk settings as well, such as a common set of warnings, etc. Right now -flto doesn't work on nrf, it should, and it's very hard to debug why it isn't working.

marble hornet
#

@meager fog thank you for the pyp tool! it is really useful

manic glacierBOT
raven canopy
#

@marble hornet wrt ^^^, I haven't even read any of displayio, but are Shapes static or dynamic? If dynamic, zero could be allowed, but handled better?

marble hornet
#

looking at the code 1 mo plz

#

c-code

manic glacierBOT
manic glacierBOT
tulip sleet
#

@slender iron i'm doing a big sweep of all the config files. framebuf should be off by default everywhere, right?

slender iron
#

@tulip sleet nice! yup

tulip sleet
#

yes, this is massive, but it should be a lot better in the long run, no more EXTRA_BUILTIN_MODULES and stuff like that

slender iron
#

great!

tulip sleet
#

also, if I conditionalize all the module defintions, maybe i can get rid of the WEAK_LINKS stuff? Do you know a strong reason to keep that? like the _time and other such modules, etc.?

#

this is relying on -flto to discard compiled but unused modules

#

i mean this refactoring is relying on that

#

I could put the on/off definitions in the .mk files, but right now they are in the .h files, and we rely on -flto to discard

slender iron
#

its meant to allow default implementations

tulip sleet
#

do we actually use it for such?

#

it's turned off in the small builds

slender iron
#

I know the interrupt handlers use weak

#

be careful that you aren't getting yourself in too deep

#

this reorg will be good but its a large task

tulip sleet
#

yah, but that's not MICROPY_PY_MODULE_WEAK_LINKS; that's what I mean I'm getting rid of, not weak links in general

slender iron
#

ah, I see

#

ya, I say get rid of those

tulip sleet
#

yes, it seems to be leftovers that we've moved to shared-bindings, mostly

slender iron
#

ya, I'd believe that

tulip sleet
#

ok, the proof is in the compilation, which will take a while to check everything

#

hopefully I can get -flto working on nrf too, though that's not vital now since we have the space

#

@slender iron displayio should be usable on nrf, right? Just checking for root pointer definitions

slender iron
#

yup!

tulip sleet
#

great!

slender iron
#

I don't think I added parallel bus but the fourwire should work

manic glacierBOT
#

I've potentially got a board (Mini SAM Nordic version in the works) that would use a low speed pin (P1.10) to drive the builtin_led. Would this be configurable via board definition to set to high drive? Or is this not possible currently? I could just create a fork and modify to suite my needs, but I'd rather not fork CP too much if I can just define in the board files.

rare geode
#

Owner of Python Discord here! Really looking forward to getting into circuit python, going to order myself some kit this week and have a play around, it looks awesome

idle owl
#

@rare geode Welcome!

#

That's great to hear! Can't wait to find out how you like it!

manic glacierBOT
#

hmmm -- I hope this is a clue: If I cop yht contents of alphanum_featherwing.py

import adafruit_ht16k33.segments as segments
from adafruit_featherwing import shared
from adafruit_featherwing.led_segments import Segments

class AlphaNumFeatherWing(Segments):
    """Class representing an `Adafruit 14-segment AlphaNumeric FeatherWing
       <https://www.adafruit.com/product/3139>`_.

       Automatically uses the feather's I2C bus."""
    def __init__(self, address=0x70):
       ...
rare geode
#

that Mu integration is fantastic as well, kudos to whoever is behind that!

idle owl
#

@rare geode Group effort, but @plucky flint is the primary author of Mu πŸ˜ƒ

rare geode
#

It's awesome! Great idea to use print statements and tuples, I love it

manic glacierBOT
manic glacierBOT
#

Thanks, I didn't check the makefiles...

I tried it on an Metro M4 Express and I get same result.
I can ping the board, it is able to resolve the dns name, but fails when sending:

Adafruit CircuitPython 4.0.0-beta.2 on 2019-02-05; Adafruit Metro M4 Express with samd51j19
>>>
>>>
>>> import board
>>> import busio
>>> import wiznet
>>> import socket
>>> import time
>>>
>>> spi = busio.SPI(clock=board.SCK, MOSI=board.MOSI, MISO=board.MISO)
>>> eth = wiznet.WIZNET5K(spi, boar...
raven canopy
#

just one left...and its stubborn!

vagrant@ubuntu-xenial:~/source/circuitpython/lib/tinyusb/src/osal$ git stash
No local changes to save
vagrant@ubuntu-xenial:~/source/circuitpython/lib/tinyusb/src/osal$ cd ../../../..
vagrant@ubuntu-xenial:~/source/circuitpython$ git submodule update --init --recursive
error: The following untracked working tree files would be overwritten by checkout:
        src/osal/osal_freertos.h
Please move or remove them before you can switch branches.
Aborting
Unable to checkout '29b49199beb8e9b5fead83e5cd36105f8746f1d7' in submodule path 'lib/tinyusb'
#

hah! just keep throwing git commands until...i win!

vagrant@ubuntu-xenial:~/source/circuitpython/lib/tinyusb$ git branch
* (HEAD detached at 6d96b12)
  master
vagrant@ubuntu-xenial:~/source/circuitpython/lib/tinyusb$ git checkout master
warning: unable to rmdir hw/mcu/nordic/nrfx: Directory not empty
Previous HEAD position was 6d96b12... improve auto descriptor
Switched to branch 'master'
Your branch is behind 'origin/master' by 742 commits, and can be fast-forwarded.
  (use "git pull" to update your local branch)
vagrant@ubuntu-xenial:~/source/circuitpython/lib/tinyusb$ cd ../..
vagrant@ubuntu-xenial:~/source/circuitpython$ git submodule update --init --recursive
Submodule path 'lib/tinyusb': checked out '29b49199beb8e9b5fead83e5cd36105f8746f1d7'
solar whale
#

Try git submodule sync

raven canopy
#

i did. several times. to include:

git submodule foreach --recursive 'git fetch'
git submodule foreach --recursive 'git stash'

i had about 4 that complained before all of that, but tinyusb was so detached it needed some brute force. πŸ˜„

solar whale
#

I use git submodule update --init --recursive git submodule foreach --recursive 'git fetch --tags'

#

And I stand on my left foot πŸ˜‰

raven canopy
#

ahh! that's probably it. i was sitting down. 🀦

main meteor
#

Is this expected when building CP? ```
../../shared-bindings/usb_hid/init.h:33:23: warning: size of 'common_hal_usb_hid_devices' differ from the size of original declaration [-Wlto-type-mismatch]
extern mp_obj_tuple_t common_hal_usb_hid_devices;

raven canopy
#

i think that is a known warning message. i've been building out of date, so haven't come across it.

main meteor
#

It's a really strange one, I wouldn't expect the size of a typedef to change, trying to wrap my head around how that could even happen.

#

Ah, it looks like it's a conflict between an array-in-place and an array pointer. Tricky.

tulip sleet
#

@main meteor are you using a version of arm-gcc older than 7.3.1? That looks like something fixed in 7.3.1.

#

@slender iron exciting build results: we've been relying on -flto to excise unused code, but it's still leaving remants. If I actually excise the source files in the Makefile conditionally, we get back hundreds of bytes from modules that aren't used

tough flax
#

Back from the frozen northwest. Thanks everyone for the HID help. Anyone happen to know if a ps4 will take an HID game pad? Or if there’s a breakout board that emulates a ps4 controller?

manic glacierBOT
manic glacierBOT
main meteor
#

Sure enough, I clicked on the wrong one when I backgraded from gcc 8 to 7. I grabbed the q4 one instead of q2, missing the detail that it was q4 2017. 😳

manic glacierBOT
tulip sleet
#

@slender iron following up on build results after compiling only source files that are really needed: trinket m0 build has 1936 more free bytes after doing this. Will try more builds. It's all working out nicely. Had to move a lot of setting stuff from .h to .mk, but it's all pretty clean. Time to πŸ’€

plucky flint
#

@idle owl @rare geode these things are always a group effort.... the "lone programmer" is a myth. We all depend so much on the work of others, which is one of the main reasons community is so important. πŸ˜ƒ

slender iron
#

@tulip sleet That's epic! I think french is our largest language so try that too!

pastel panther
#

how does one get rid of a code.py that has their board in a boot loop?

#

remembers the debugger in front of him

#

hmm... no dice

#

(β•―Β°β–‘Β°οΌ‰β•―οΈ΅ ┻━┻

#

πŸ’€

timber mango
#

@pastel panther yes, I would love to see more of your "itsybitsy -knockoff", do you have a link or github-repo ?

solar whale
#

@pastel panther boot to safe mode. Slow double tap, about 1 second between taps. Then you can get to REPL and import os then os.remove(β€œcode.py”)

manic glacierBOT
tulip sleet
#

@slender iron on Metro M0, looks like the fr build has 1396 bytes free now as opposed to 244.

#

note that metro m0 has wiznet ethernet support turned on by default (that's not new)

#

the more features included in a build, the less you save (since more of the files would have been compiled in anyway)

manic glacierBOT
#

forgot to post safe mode message


You are running in safe mode which means something unanticipated happened.
Looks like our core CircuitPython code crashed hard. Whoops!
Please file an issue at https://github.com/adafruit/circuitpython/issues
 with the contents of your CIRCUITPY drive and this message:
Crash into the HardFault_Handler.

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-beta.2-58-g35e3d99f6 on 2019-02-14; Adafruit Feather nRF528...
manic glacierBOT
marble hornet
#

WOOHOO gui 1.x is done ! 2.x will include dislayio support.

manic glacierBOT
manic glacierBOT
#

gdb backtrace:

(gdb) break HardFault_Handler
Breakpoint 1 at 0x44686: file supervisor/port.c, line 121.
(gdb) c
Continuing.

Breakpoint 1, HardFault_Handler () at supervisor/port.c:121
121	    reset_into_safe_mode(HARD_CRASH);
(gdb) tr
Note: breakpoint 1 also set at pc 0x44686.
Tracepoint 2 at 0x44686: file supervisor/port.c, line 121.
(gdb) his
Undefined command: "his".  Try "help".
(gdb) backtr
#0  HardFault_Handler () at supervisor/port.c:121
#1  <signal handler called>...
pastel panther
#

@solar whale No dice; tried various speeds of double taps, the best I can do is get into bootloader mode; I tried using the flash eraser from the troubleshooting page but macos says it's 141k too large and won't copy it 😐

solar whale
#

what version of CP did you have loaded and on what board

pastel panther
#

a fork off master (working on bitmap stuff)? I may have also flashed whatever the latest release is

solar whale
#

what board?

pastel panther
#

Grand Central

solar whale
#

just a sec -- I can make you an eraser -- maybe

#

been awhile -- trying to fin the correct spot.

tulip sleet
#

init fileystem in main.c -- make last arg true, or something like tthat

lone sandalBOT
solar whale
lone sandalBOT
solar whale
#
diff --git a/main.c b/main.c
index c1244f36c..e81392027 100755
--- a/main.c
+++ b/main.c
@@ -389,7 +389,7 @@ int __attribute__((used)) main(void) {
     // Create a new filesystem only if we're not in a safe mode.
     // A power brownout here could make it appear as if there's
     // no SPI flash filesystem, and we might erase the existing one.
-    filesystem_init(safe_mode == NO_SAFE_MODE, false);
+    filesystem_init(safe_mode == NO_SAFE_MODE, true);
 
     // Reset everything and prep MicroPython to run boot.py.
     reset_port();
pastel panther
#

heeeeeeeeeey!

#

Thanks jerry!

pastel panther
#

definitely filing that one away in my bag of tricks

#

@tulip sleet any idea why the GC flash eraser build on the troubleshooting page would show up as being too large but a freshly built one would not?

tulip sleet
#

are you sure you were trying to copy it to the boot drive and not the CIRCUITPY drive?

#

otherwise I don't know, but that's an arduino program, and could have been built wrong

#

(I have made the copy mistake in the past)

pastel panther
#

ya; I couldn't get a CIRCUITPY drive because of the boot loop so I'm sure it was the boot drive

tulip sleet
#

what's the name of the uf2 you were using?

pastel panther
#

GC_M4_QSPI_Erase.UF2

tulip sleet
#

i do not know - I'l try it myself later. afk for a coupla hours now

pastel panther
#

ttyl

#

thanks for the help

#

yay, still-in-bed-half-asleep-hacking is the best; 565 support here we come!

slender iron
#

@pastel panther update your repo. I fixed safe mode so it shouldn

#

't boot loop anymore

pastel panther
#

ok, thanks

slender iron
#

bootloader was overwriting the safe mode state

pastel panther
#

ah

umbral dagger
#

Is there a schematic around for the PyPortal?

slender iron
#

not public yet

#

I can send it to you if you need it

umbral dagger
#

Yes, please.

#

Also... STLs for that 3d printed stand on the product page?

slender iron
#

you have eagle? what form is best?

pastel panther
#

are there spare PyPortals around? 🀣

umbral dagger
#

eagle is good. PDF is fine. I just want some details.

slender iron
#

@pastel panther not yet. I have an old rev myself

pastel panther
#

greens overflowing... πŸ€”

manic glacierBOT
prime flower
#

@gilded cradle I have a pyportal on my desk if you'd want me to review the WiFiManager PR?

idle owl
gilded cradle
#

Sure @prime flower

slender iron
#

@idle owl sure, looking now

idle owl
#

Thanks!

gilded cradle
#

I've only tested it with a MetroM4 + Huzzah32 Feather

idle owl
#

@slender iron Thank you!

slender iron
#

np

marble hornet
#

@slender iron is mp_obj_t* children; the list inside of groups that holds the items ?

slender iron
#

ya

#

technically its an array because its a fixed size

marble hornet
#

okay πŸ€” ...

#

thank you

idle owl
#

@gilded cradle bump is the word Limor uses for creating a new release. Because you're "bumping up" the release tag number. πŸ˜ƒ

gilded cradle
#

Yeah, just trying to learn some of the terminology.

idle owl
#

I understand entirely! I figured I'd make it even clearer if I could.

gilded cradle
#

Yeah. When you said I was already bumping, I was pretty sure what that meant. Just wanted to verify.

marble hornet
#

@slender iron i can't inherit from two objects that each individually inherit from Group

#
  File "main.py", line 3, in <module>
  File "/lib/tg_gui/gui.py", line 761, in <module>
TypeError: multiple bases have instance lay-out conflict```
slender iron
#

why would you inherit from two things?

marble hornet
#

i have a rect and a pointable object and i want to make a button

prime flower
#

@gilded cradle just tested it on my pyportal, it's awesome.

marble hornet
#

text is added ontop

prime flower
#

I like the ability to include headers as a dict

gilded cradle
#

Thanks for testing

#

Yeah, it just passes them on to Limor's code

slender iron
#

@marble hornet I'd have button inherit from Group and then have rect and pointable object as children

prime flower
#

@gilded cradle Do you think adding in code for handling disconnects from a router (AP drops off) would be useful?

gilded cradle
#

Yeah, that's why it checks to see if it's connected on each call

prime flower
#
            self.connect()``` Oh, it pings on each `get` or `post`
gilded cradle
#

Yeah

prime flower
#

good idea

gilded cradle
#

Thanks. That was part of the original request.

prime flower
#

Adafruit IO Arduino does a ping at the top of each loop to stay connected to the api/broker, this is way more elegant.

gilded cradle
#

πŸ˜ƒ

prime flower
#

I'm going to try to whip together a really basic Adafruit IO wrapper to sit on top of WiFiManager

marble hornet
#

@slender iron what about inheriting from both causes the conflict?

slender iron
#

I don't think that's what you want

#

multi-inheritance is complicated

marble hornet
#

Is this the double diamond problem?

slender iron
#

never heard of that

marble hornet
slender iron
#

my issue is that you rarely want a combination of APIs

#

more often you want a smaller api that wraps the two

#

and simplifies how to use them

marble hornet
#

can you say more about that? i'm not picturing how

ancient sage
#

What's the most common adafruit part used on/with a circuitpython board?

idle owl
#

@ancient sage That's a tough one. There's support for a lot of things. Maybe NeoPixels because who doesn't love LED rainbows?

#

The Circuit Playground Express has a ton of stuff built into the board, so it gives you a lot of options for learning different things in one package.

ancient sage
#

I'm going to try to support people with CircuitPython and I'm just wondering what would give the broadest range of testing. Already going to get a C.P.E.

idle owl
#

I think understanding the protocols, e.g. I2C and SPI, etc, is a good way to start. Because while different sensors do different things, if they're I2C and you know how to troubleshoot that, you're covered for a ton of different sensors. If that makes sense.

#

Check out the CircuitPython Essentials guide if you haven't already. It covers the different things built into CircuitPython, which most of our sensors/breakouts/etc use.

ancient sage
#

OK, thanks

#

I already have a stack of PWM servos from my hobby aircraft days

idle owl
#

Nice!

slender iron
#

@marble hornet have button subclass group and then in __init__ create the rectangle and add it to self's children (since self is a group)

prime flower
#

@gilded cradle io.send() workin'. I'm going to toss this in a repo before I break for lunch

#

need to figure out a better way of constructing the URLs passed into the $path though

gilded cradle
#

Awesome work @prime flower!

marble hornet
#

thank you, i think i have some ideas

exotic pumice
#

mac people, is there some package manager that has arm-none-eabi-gcc or do y'all just install the tarball every time?

slender iron
#

brew used to have it

exotic pumice
#

I couldn't find it searching their package list online

slender iron
#

they removed it because it was a cask and shouldn't have been πŸ™„

main meteor
#

I just install the tarball. I tried using the gcc that comes with Arduino, but it's not the right vintage.

exotic pumice
#

@main meteor lol

#

everybody loves vintage compilers

slender iron
exotic pumice
#

speaking of vintage compilers, I wrote some 6502 assembly for C64 yesterday

#

it just endlessly prints "green on black" in green on black

main meteor
#

Nice! Tempted to fire up my old 6800 machine and see if it still goes.

pastel panther
#

@exotic pumice the brew cask people removed it because they said it belongs in regular brew but they didn't think to/want to /have time to add a PR to add it to brew

#

I was planning on submitting a PR but haven't had time

exotic pumice
#

got it, thanks

slender iron
#

I just asked to see if someone is working on it

exotic pumice
#

is cask binary package versus source package or something?

slender iron
#

ya

pastel panther
#

their github page also mentions targeting GUI apps

manic glacierBOT
#

Just a wild guess, but I wonder if it is something to do with running out of stack space.. I found that if I compile with DEBUG=1 I can reproduce the problem -- see above, but when I tried to run some tests of the ESP32SPI code, It also went to Safe Mode but in that case, the Safe Mode message reported the reason as running out of stack space. I normal build w/o DEBUG runs the ESP32SPI code fine on the nrf52840.

solar whale
#

@slender iron If I want to increase the stack for the nrf52840 build do I only have to change the setting in mpconfigport.h -- or are there other places as well?

slender iron
#

I think just there

solar whale
#

thnaks -- I'll try increasing it to see if it helps

slender iron
#

it'd be good to add stack checks so this fails more gracefully next time

solar whale
#

is that an mpconfigport.h setting?

#

yup -- doubling the stack got rid of the problem ....

slender iron
#

its not a setting

#

@tulip sleet would know what it is

solar whale
#

at least for the simple test -- trin ghte full test next

slender iron
#

that will cause a safe mode

#

that will raise an exception

manic glacierBOT
solar whale
#

so in does atmle report stack when going to safe mode, but nrf does not -- it issed HardFault

manic glacierBOT
slender iron
#

right, we can only go into safe mode if we check before we crash

gilded cradle
#

I think it is going into safe mode

slender iron
#

ah, well the reason will change

#

the hardfault handler will also trigger safe mode

solar whale
#

right -- it goes to safe mode but says it was due to HardFault, not stack overrun.

slender iron
#

ideally we'd notice we're out of stack and throw an exception before we crash

gilded cradle
#

I see

#

That would make tracing the actual problem easier

solar whale
#

it did taht for me in another test, so it may depend on how it runs out of stack

tulip sleet
#

stack checking was turned off in the nrf port, for some reason. I noticed that while refactoring. It will be on after my big PR.

#

also the default stack will be 24k

slender iron
#

ah, so it can be turned on?

tulip sleet
#

MICROPY_STACK_CHECK

solar whale
#

great! issue solved πŸ˜ƒ

slender iron
#

may be worth trying jerry

gilded cradle
#

πŸ‘

slender iron
#

just to see if it fails nicer

solar whale
#

OK will try

gilded cradle
#

We should try on the Argon too

tulip sleet
#

argon is same

#

no stack check and 4k check are common across all the nrf boards

#

as of now

solar whale
#

gdb was not much help!

slender iron
#

in gdb I like to break on reset_into_safe_mode

solar whale
#

I had break on HardFault_Handler, and it worked ok -- more my lack of familiarity with what was reported -- rusty on gdb...

#

Even with stack checking enabled, it went to HardFault

slender iron
#

hrm

#

hardfault_handler is good too

#

it'll call reset_into_safe_mode too

#

the checks may not be in the right places

solar whale
#

I posted the backtrace to the issue -- you can read it at your leisure -- it may tell you more than it did me.... I guess I'll leave the issue open until Dans PR is in -- I'll add some notes

umbral dagger
#

I just wrote a better repl (read more than readline from stdin) for CircuitScheme. Basic readline move left/right, backspace/forward-delete, history using up/down, multi-line command input.

#

Would a guide be of interest? It's general purpose (just a parse and eval ties it to CircuitScheme).

#

It's pure CircuitPython code.

manic glacierBOT
solar whale
#

@gilded cradle argon works!

gilded cradle
#

Sweet

solar whale
#

Whew! I don't have many hairs left -- lost quite a few on that one πŸ˜‰

gilded cradle
#

I got an Argon too. I just haven't put the bootloader on it yet.

#

I mean it just got here today.

idle owl
#

Tape 'em back on, @solar whale!

solar whale
#

@gilded cradle ave fun with the Argon -- If you put the AT Firmware on the ESP32 you might get inspired to add the Wifi Wrapper to the ESPATControl library! Let me know if you have any problems getting it going.

gilded cradle
#

Ah, ok. I might try that.

exotic pumice
solar whale
#

@exotic pumice this was a great exercise for me -- I need be quicker to pull out the J-Link and gdb. It's a thrill!

exotic pumice
#

hahaha

manic glacierBOT
ruby tiger
#

how much storage space would typically be used by circuitpython's code and libraries? assuming this is a small project with not much code. rough estimate is fine.

manic glacierBOT
river quest
#

@ruby tiger it's small, so even with images and sounds, everything does not fill up the "USB" drive

ruby tiger
#

but like, on the playground express, how much of those 2MB can I actually use to store media?

prime flower
#

@gilded cradle Can I extend your WiFiManager for DELETE/PUT?

gilded cradle
#

Sure @prime flower, that works for me.

prime flower
#

They're within requests.py, not sure if you are going to add them or not and dont want to overrun your work

river quest
#

@ruby tiger almost the full 2mbs

ruby tiger
#

super cool. thanks @river quest

gilded cradle
#

Oh, go ahead and add those.

#

I was just requested to do the get, post, and ping.

prime flower
#

ah np, they work great

#

super early and ugly (not for public consumption unless you really want to break things) , but ya can pass it in the wifi manager

gilded cradle
#

Nice. That should make doing stuff with Adafruit IO even easier.

manic glacierBOT
ancient sage
#

Can I do THUMB-2 assembler inline in CircuitPython on the ATSAMD21?

manic glacierBOT
slender iron
#

@ancient sage no, we don't support it because it is a very advanced feature

exotic pumice
ancient sage
#

Being a strict subset of cpython is a noble goal as well πŸ‘

#

I was a little freaked out by the form of the files in tests/ from micropython at first, but it seems that the strategy is to run everything against cpython and micro/circuitpython and check for differences?

#

it was like, these are the worst tests I've ever seen

tulip sleet
#

@ancient sage the tests do catch errors. If you think those are bad, wait until you see the ones we don't have.

ancient sage
#

Haha... Is there a need for more tests?

#

Initially I thought that it only ran the test files and checked for exceptions

#

Thus my astonishment

tulip sleet
#

we need more hardware-based regression testing. Those tests were written by the micropython folks. We have the start of some hw tests, but it's not automated yet. We had an automated tester that ran the test suite on several actual hardware boards, but it was kind of flaky and we haven't revived it (it lives at tannewt's house). https://github.com/adafruit/Adafruit_CircuitPython_BoardTest

#

that's the board test library. The automated tester is called rosie, and didn't do pin checking. the code for that is elsewhere

#

the micropython based tests of course are run on travis builds

ancient sage
#

Right, that wouldn't catch anything that only shows up when cross compiled

tulip sleet
#

the mpy tests are quite good at catching regressions in the core language impl, which we don't mess with much

#

@slender iron do you have a strategy for dealing with translation merge conflicts? Maybe I should just do git checkout --theirs ... and take the upstream one?

slender iron
#

@tulip sleet I think I take theirs and then rerun make translate

tulip sleet
#

that's what I think, but I need to make sure it's doing the right thing. ok tnx

#

aha, needed to do git add after git checkout --theirs kk

raven canopy
#

@tulip sleet @idle owl for the bundle link description, i'm thinking of a merge of both ideas. something like "Documentation for the bundle, which includes links to documentation for all libraries". thoughts?

idle owl
#

@raven canopy Sounds good

tulip sleet
#

that sounds good -- i didn't really know what it was actually pointing to

#

is there a summary page of all the libraries you could link to instead of just the bundle RTD link?

#

instead of or in addition to?

raven canopy
#

kk. commit imminent...or wait. πŸ˜„

idle owl
#

That's what the bundle RTD is

tulip sleet
#

shows how much i know

raven canopy
#

yeah, we just moved the "old" drivers.rst list to the bundle.

idle owl
#

@raven canopy Do the PR πŸ˜„

#

@tulip sleet all good πŸ˜„

raven canopy
#

πŸƒ

idle owl
#

Bundle RTD is links to all the libraries. And being added to the process of adding a lib to the bundle, is updating that file.

#

That way we're not forking CP just to update that drivers file anymore.

#

And it'll be kept up to date!

tulip sleet
#

i love it

raven canopy
#

and now...we wait for Travis to test two lines of text. πŸ•°

exotic pumice
raven canopy
#

@exotic pumice is knowing Rust a requirement? πŸ˜„

idle owl
#

@raven canopy So.... idea....

exotic pumice
#

@raven canopy barely

#

having it installed and following my instructions should be enough lol

raven canopy
#

uh-oh...ideas.

idle owl
#

@raven canopy In the bundle RTD under "Adding a library" should we include instructions for updating the docs page? I mean we need to update the guide on "Creating and Sharing a Library", but should it also be in the Bundle RTD?

#

Also my weirdo caching issue is magically fixed so that's nice.

raven canopy
#

that was the thing i kind of noted on the PR. i almost started to put in a "how to contribute to the bundle" section, linking to the guide and having an outline.

idle owl
#

Ahhh ok

#

I remember that in the PR, wasn't thinking it was the same thing. Obviously it is.

raven canopy
#

i mean, it costs nothing (or, very little?) to add it.

idle owl
#

Hmm. Let's get the guide updated first maybe?

#

Mostly so you don't have to do more right now πŸ˜„

raven canopy
#

ahh, that's just a little creatively technical writing. always cycles for that. πŸ˜„ after deciding dinner and retrieving it of course. hehe

idle owl
#

You want to update the guide too? πŸ˜†

raven canopy
#

walked into that one. 🀦 i mean, of course i do!

idle owl
#

πŸ˜„

raven canopy
#

seriously though, yeah, i can add it. though i think i'll need access to it.

idle owl
#

I will make that happen.

#

Traaaaavisssssssssss

exotic pumice
#

young woman yells at cloud

#

because travis is in the cloud

idle owl
#

Nah that wasn't yelling. It was meant to be more of a creepy whisper.

#

But well played πŸ˜„

exotic pumice
#

πŸ˜›

manic glacierBOT
#

This is a large refactoring of mpconfig*.{h,mk} settings to share as much as possible and to make enabling and disabling builtin modules easier.

There's a new directory ports/circuitpy-common/ containing settings that can be shared across ports:

  • mpconfig_circuitpy.h -- refactoring of common aspects of {atmel-samd,nrf}/mpconfigport.h
  • mpconfig_circuitpy.mk: refactoring of common aspects of {atmel-samd,nrf}/mpconfigport.mk
  • circuitpy_defns.mk: refactoring of common e...
manic glacierBOT
solar basin
#

Woohoo! My Adafruit box came in today!

#

I have goodies for days!

#

I didn't realize that the JTAG ribbon cable was so small

tulip sleet
#

pins are lot smalle than 0.1" spacing

gilded cradle
#

Oh right, the Adabox. Mine hasn't shipped yet and I'm about to move, so I just changed my address to my friend's house since it might come after I move.

solar basin
#

I just bought an Adabox 10 ad-hoc

gilded cradle
#

Ah, that makes sense. I think the next ones ship next month.

solar basin
#

That is my understanding as well

gilded cradle
#

But just in case I forgot to change my addr, I set it to something where I could still get it.

solar basin
#

Nice!

manic glacierBOT
tulip sleet
#

yay

pastel panther
#

why do the pixels hate me so? 😒

main meteor
#

Fighting displayio?

pastel panther
#

kinda; trying to add 565 support to OnDiskBitmap and my green channel is overflowing

main meteor
#

I was just looking over OnDiskBitmap last night, amusingly enough.

pastel panther
#

I thought I had my bitmask wrong but the input pixel from the disk seems to agree with what I'm getting out so either what's coming in is wrong or my expectations are

tulip sleet
#

@slender iron the last several travis merge builds have failed, not sure why. Restarting doesn't help. The shallow clone claims something has changed. This happened before my big PR. The PR builds are fine. 🀷

pastel panther
#

signs are pointing to me being wrong....

#

Don't over shift your bitz, boyz and gurlz

pastel panther
#

A for effort?

tulip sleet
#

@raven canopy are you happy with the Move the Docs PR? I can merge it. All the merge builds seem to be failing due to depth 1 and a lot of outstanding merges, I think.

raven canopy
#

hehe. i just kicked the tires on the Travis for that PR. even after reading your post. i'm good with the PR. want me to stop the Travis?

tulip sleet
#

no problem. I'll just wait and see, or approve anyway. I'm not sure why the depth:1 is fialing but it might be due to so many simultaneous PR's.

raven canopy
#

it seems to be past the funky bits.

tulip sleet
#

the PR builds are fine, it's the merge builds after the merge is doen

raven canopy
#

ahh. my last PR run failed with the same error, so i thought it was across the board.

tulip sleet
#

ok, didn't see that, but I'll wait for it to finish before I merge

raven canopy
#

πŸ‘

tulip sleet
manic glacierBOT
raven canopy
#

hmm. interesting theories...

tulip sleet
#

the accepted answer does seem to be wrong about the commit hash. but we have a backlong of multiple commits and a depth of 1 wouldn't fetch the right one if there were merge commits of other PR's in between.

#

i will knock off a bunch of these and re-run the top one if necessary

gilded cradle
#

I just got CircuitPython running on my Particle Argon. I knew buying a JLink would come in handy down the road. πŸ˜ƒ

#

lol

raven canopy
tulip sleet
#

that is definitive!

#

we have depth: 1 but we also have:

  - git fetch --shallow-exclude=4.0.0-alpha.1 || git fetch --unshallow
  - git fetch --depth 1 origin $LAST_TAG:$LAST_TAG

so I'm confused

manic glacierBOT
#

Hi,

I have the following piece of code, however when I run it, it returned CCCD error:
OSError: Failed to read CCCD value, err 0x3002

	chara = bleio.Characteristic(uuid_char_temp, notify=True, read=True, write=False)
	serv = bleio.Service(uuid_env_sense, [chara])
	periph = bleio.Peripheral([serv], name="BME680")

	periph.start_advertising()

	while True:
		send_temp()
		time.sleep(5)

send_temp() is essentially `chara.value = byte...

ruby tiger
#

hey guys! does CPy support f-strings?

manic glacierBOT
tulip sleet
#

@ruby tiger no f-strings - it's not in MicroPython either

ruby tiger
#

aww. that's too bad, they're lovely.

raven canopy
#

@tulip sleet how's Travis looking this morning? still a bunch of ❌s?

#

he asks lazily, while waiting for coffee to work πŸ˜„

tulip sleet
#

I approved a PR a few minutes ago and it messed up too. If Scott is not around this weekend, we can discuss it on Monday/Tuesday, about increasing the depth, etc. I need to go back and look at the old changes to see why we did what we did.

raven canopy
#

i would hazard a guess that it was done in the interest of speed..

manic glacierBOT
tulip sleet
#

I don't think the clone time is the major bottleneck now. It's the zillions of translations. Making a depth of 6 or something might be fine.

tulip sleet
#

The extra git fetch is supposed to pull more as necessary, but it doesn't seem to be working. I should try this by hand locally and see what's going on.

raven canopy
manic glacierBOT
#

I Need to check about MICROPY_MODULE_WEAK_LINKS, which I think is no longer necessary but may need a bit of cleanup if it's still used.

The CPython std library port I'm working on requires this. It makes it possible to extend bare bones builtin modules using pure python.
Most noteable are the os and time modules that I have ported.

...

manic glacierBOT
raven canopy
#

oof. re-gluing code in and trying to remember why i had done certain things. taking 4 month breaks on something has detrimental effects. 😬 🀷

main meteor
#

I know that feel.

raven canopy
#

eureka! now i remember. πŸ˜„

sinful thorn
#

hiya :) i seem to be unable to connect to the REPL on my circuit playground express. saving and modifying the circuitpython code works fine and it behaves as expected, but mu shows this error when attempting to open a serial connection. i've pressed the reset button but that doesn't help either. i've also had a look at this https://learn.adafruit.com/welcome-to-circuitpython/advanced-serial-console-on-mac-and-linux but nothing shows up when i do ls /dev/ttyACM* (i'm running arch linux, btw). is there perhaps anything else i could try? :D

raven canopy
#

@sinful thorn try lsusb. does that list the device?

sinful thorn
#

hmm, not from what i can see: ```
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 007 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 006 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 005 Device 003: ID 256c:006e
Bus 005 Device 022: ID 239a:8019
Bus 005 Device 002: ID 093a:2521 Pixart Imaging, Inc. Optical Mouse
Bus 005 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 002: ID 058f:6366 Alcor Micro Corp. Multi Flash Reader
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 004 Device 002: ID 045e:07f8 Microsoft Corp. Wired Keyboard 600 (model 1576)
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub

raven canopy
#

yep. Bus 005 Device 022: ID 239a:8019. now, does ls /dev/ttyUSB show anything?

sinful thorn
#

oh huh, okay. lemme check

#

nope, it doesn't.

raven canopy
#

is it sad when USB VID/PIDs are burned in your memory?

sinful thorn
#

not particularly :D

raven canopy
#

i'm trying to find it, but i seem to remember a conflict with modemmanager...

sinful thorn
#

well, i don't even have modemmanager installed.

raven canopy
#

sweet. cause the "fix" is to remove it. haha

sinful thorn
#

yeah i read about that when looking for a solution myself, but i didn't even have it installed in the first place so.. Β―_(ツ)_/Β―

raven canopy
#

just for grins and giggles, what does ls /dev/tty* spit out?

sinful thorn
#
/dev/tty    /dev/tty19  /dev/tty3   /dev/tty40  /dev/tty51  /dev/tty62
/dev/tty0   /dev/tty2   /dev/tty30  /dev/tty41  /dev/tty52  /dev/tty63
/dev/tty1   /dev/tty20  /dev/tty31  /dev/tty42  /dev/tty53  /dev/tty7
/dev/tty10  /dev/tty21  /dev/tty32  /dev/tty43  /dev/tty54  /dev/tty8
/dev/tty11  /dev/tty22  /dev/tty33  /dev/tty44  /dev/tty55  /dev/tty9
/dev/tty12  /dev/tty23  /dev/tty34  /dev/tty45  /dev/tty56  /dev/ttyS0
/dev/tty13  /dev/tty24  /dev/tty35  /dev/tty46  /dev/tty57  /dev/ttyS1
/dev/tty14  /dev/tty25  /dev/tty36  /dev/tty47  /dev/tty58  /dev/ttyS2
/dev/tty15  /dev/tty26  /dev/tty37  /dev/tty48  /dev/tty59  /dev/ttyS3
/dev/tty16  /dev/tty27  /dev/tty38  /dev/tty49  /dev/tty6
/dev/tty17  /dev/tty28  /dev/tty39  /dev/tty5   /dev/tty60
/dev/tty18  /dev/tty29  /dev/tty4   /dev/tty50  /dev/tty61

forgot to mention actually, i believe the /dev/ttyS* would be serial ports but i just got a blank screen when attempting to use screen to connect to /dev/ttyS0 (which is the only one which didn't immediately terminate with or without sudo) with a baud rate of 115200.

raven canopy
#

really just stalling to avoid sifting through dmesg πŸ˜„

sinful thorn
#

haha, i avoid my own dmesg when i can. :D

raven canopy
#

yeah, nothing there looks like it would be it. i have no arch experience, but kernel is kernel, right?

sinful thorn
#

how do you mean?

tulip sleet
#

if you are running a main.py, screen to /dev/ttyS0 will be blank until you type ctrl-C

raven canopy
#

@tulip sleet have you Arch experience? would it show up on ttyS*?

tulip sleet
#

no, no arch experience. what version of arch? Are you up to date?

#

do you have any other computers in the house, Windows or Mac?

sinful thorn
#

i did try pressing ctrl-C, didn't work either. i'm running kernel version 4.20.6 (i upgraded to 4.20.8 earlier but haven't rebooted since, actually). all of the computers in my house are running linux. i could dig around for an old windows laptop, but i think it still needs windows 7 SP1 haha

tulip sleet
#

all arch, or any debian or ubuntu

sinful thorn
#

there's a linux mint computer somewhere, which is ubuntu-based.

#

not mine though, so i'd have to wait until it's not in use.

tulip sleet
#

maybe I can find a DVD-boot arch to try, or find an external disk to boot from.

#

looks like you should see /dev/ttyACM0

sinful thorn
#

i don't, unfortunately. my entire ls /dev/tty* output is shown above

tulip sleet
#

what version of CPy are you running on the CPX?

sinful thorn
#

version 3.1.2

tulip sleet
#

ok, that's good - i see some arch linux live-cd/usb instructions. i'll give it a brief go. will get back to you later. in the meantime maybe bother the linux mint person if available

sinful thorn
#

will do. :D

raven canopy
#

@sinful thorn what type of port do you have it plugged into (USB2, USB3)? shouldn't matter, but long-shot

sinful thorn
#

i'm pretty sure it's USB2

#

could be USB1 knowing this motherboard haha

raven canopy
#

have any other ports available to try? other than that, its a wait on dan or dmesg. dan is much smarter than i...so i'll defer to him. πŸ˜„

sinful thorn
#

yeah i'll try a few others.

tulip sleet
#

flashing a usb drive...

sinful thorn
#

works perfectly on linux mint. :)

tulip sleet
#

I made a bootable arch 4.20.6 usb drive, booted it, plugged in a CPX, and I see /dev/ttyACM0. You said you updated but haven't rebooted yet? So maybe reboot and see if that fixes things.

sinful thorn
#

okay sure.

#

heck of course that works haha. reboots fix everything, don't they? sorry for wasting your time, thanks for the help :D

raven canopy
#

yay! πŸŽ‰

tulip sleet
#

ok, wait, this is interesting. I pressed the reset button and then /dev/ttyACM0 did not reappear, or when I unplugged it and plugged it back in. Try unplugging and replugging and see if it appears

#

That was after doing cat </dev/ttyACM0

#

@sinful thorn ^

sinful thorn
#

sorry, got distracted. it still works fine after resetting.

#

and replugging.

tulip sleet
#

@sinful thorn ok, good! I was getting weird errors, but quite possibly due to booting from USB drive

sinful thorn
#

that's possible, yeah. everything's working fine for me though, thanks :D

slender iron
manic glacierBOT
#

Possibly this could be combined with deepsleep, which also needs an RTC timer as timeout and to advance the systick so time.monotonic() returns a reasonable result after sleep. This however would require a lower divide value (1024). My implementation of deepsleep is here: https://github.com/bboser/iotpython/blob/master/ports/nrf/common-hal/microcontroller/__init__.c.

The other possible issue is that apparently the softdevices (BT?) also use RTC timers. Somewhere I read that RTC0 is used by...

idle owl
#

@slender iron I put "Community News" after the State of CircuitPython in my template πŸ˜ƒ I'll move it to before. Mostly I'm entertained that we chose different places for it.

pastel panther
#

@tulip sleet is it kosher to have PRs targeting master coming from a branch on the fork, or is it preferred to have them coming from master on the fork?

idle owl
#

@pastel panther If you're asking what I think you're asking, branches are fine. As long as it's up to date and you know it is, it shouldn't matter.

pastel panther
#

kk

tidal kiln
#

id say that's fine and generally preferred. i try to do it that way and make the branch name reflect the point of the PR, like give it an issue number, or feature name, etc.

tulip sleet
#

@pastel panther I always use branches so I can keep my work organized and save a line of development away if necessary

#

cater and kattni are on the money

pastel panther
#

I do too! For some reason I'd previously always made PRs from master and I didn't know if that reason was a rule or something I just did arbitrarily

idle owl
#

Hey I wrote that guide! πŸ˜„

tidal kiln
#

i'm not skilled enough to have multiple branches going at one time though

manic glacierBOT
#

This adds support for 565 16bpp BMPs as well as hacky support for 8bpp grayscale that ignores the palette because it's just a ramp of values and uses the index as a value for RGB. I started looking into actually reading in the palette for 8bpp indexed images but figured to check in before I go any farther.

The output is also kinda hacky; in the case of 565 each of the color values have been shifted up only to later be shifted back down by ColorConverter.

I'm sure there is much room for...

raven canopy
#

@tidal kiln its a total juggling nightmare. i've gotten into that state only a couple times, but...ugh.

tulip sleet
#

the important thing is to make sure to commit before you switch branches. you can also use git stash, but that's harder to keep track of.

#

or just clone again

gilded cradle
#

Sometimes I work on multiple branches for the Adafruit_CircuitPython_FeatherWing library. I just merge them into master when the branches are ready to go.

tulip sleet
#

git clean -xf will clean out build junk, etc.

manic glacierBOT
#

Travis builds have been failing recently. Example:
https://travis-ci.com/adafruit/circuitpython/jobs/178330132

0.58s$ LAST_TAG=`git ls-remote --quiet --tags --sort=version:refname | egrep -o "refs/tags/[0-9]+.*\$" | tail -n 1`
3.11s$ git fetch --shallow-exclude=4.0.0-alpha.1 || git fetch --unshallow
remote: Enumerating objects: 8166, done.
remote: Counting objects: 100% (8164/8164), done.
remote: Compressing objects: 100% (2944/2944), done.
remote: Total 7180 (delta 5557), reused ...
marble hornet
#

@slender iron I'll have to miss the meeting tomorrow, robotics. But I did make a pwm tool with circuit python to help with the robot. Best of luck to all and a large group hug

idle owl
#

@marble hornet The meeting is on Tuesday this week.

#

Also tomorrow is Sunday πŸ˜ƒ

#

We're making the notes doc on Saturdays now to provide more time to enter notes into it.

manic glacierBOT
raven canopy
#

@slender iron i only sort of understand what is going on with Travis, so I'm going to leave that ^^ PR to you for approval.

umbral dagger
#

@pastel panther I always use branches for new work as well.

slender iron
#

k, I'm gonna look next week. shouldn't need to rush it

exotic pumice
#

uh, how is dotstar_sck on pad 0 in the neotrellis m4?

#

my understanding was sck could only be pad 1 or pad 3

raven canopy
#

@exotic pumice i see I2S/SCK[0] in the I/O for PB16. pg 34.

exotic pumice
#

wot it's pb02

#

and what's I2S got to do with it?

raven canopy
#

can be either, is how i've understood that. how to choose... 🀷

#

well, not either. but...you know what i mean. i hope. what are we talking about? lol

exotic pumice
raven canopy
#

well, nvm. seems SCK in that instance is related to I2S?

exotic pumice
#

yeah

raven canopy
#

you threw me off with the SCK. too used to SCLK or CLK. πŸ˜„

exotic pumice
#

datasheet also calls it that

raven canopy
#

yeah, i'm tracking now. SERCOM5/PAD[0] is available for PB02

exotic pumice
#

yeah, and that can't be sck

#

due to padpin mapping

#

only 1 and 3 are sck

exotic pumice
#

ah darn

#

was that pin choice a mistake I wonder?

#

if you swap sck and mosi then you can use a sercom

raven canopy
#

may have been more to keep the sercoms available for other things?

exotic pumice
#

maybe

#

I don't have a rust bitbang apa102 driver, so I'll have to move onto something else

#

I find the "keep sercoms free" theory implausible, aren't you only using 1 sercom for i2c?

raven canopy
#

🀷 it was just a thought. ladyada is way more smarter and experienced on board design than i'll prob ever be. πŸ˜„

exotic pumice
#

Yeah same

#

But everyone makes mistakes

manic glacierBOT
#

Regarding Discussion in PR https://github.com/adafruit/Adafruit_CircuitPython_FeatherWing/pull/27, in the latest official release (beta 2), the functions are there, but cause a BCDDateTimeRegister object to be returned. @jerryneedell had compiled a build from master on 2/15 and that was missing the mktime() and localtime() functions, but the BCDDateTimeRegister seemed to be fixed.

gilded cradle
#

If I wanted to compile the latest CircuitPython on my local computer for a particular board, what command would I use? I think I might already have all of the dependencies (I've successfully compiled bootloaders and mpycross before).

tired steppe
#

Anyone here have experience building CP on linux?

lone sandalBOT
solar whale
woeful juniper
#

Hi there, I'm newbie. Actually I don't know difference between circuitpython and micropython. But I have a problem about micropython's re library. It have not DOTALL flag. How can I match (.) special charachter with newline characters too?

solar whale
#

@tired steppe yes, what information are you looking for?

#

@woeful juniper I don't think I understand your question - can you provide an example of what you are trying to do -- the newline can be represented as "\n" - carriage return as "\r" if that helps.

#

@gilded cradle the actual build is done much like the bootloader make BOARD=feather_m4_express clean then make BOARD=feather_m4_express for example. The tricky part is getting the full repo and tools installed but you may have most of that done. This page has the crucial stull https://learn.adafruit.com/building-circuitpython/build-circuitpython#fetch-the-code-to-build-6-1 and I would ad one thing after you clone or update the repo do git submodule update --init --recursive git submodule foreach --recursive 'git fetch --tags'

How to build CircuitPython yourself on different platforms

woeful juniper
#

@solar whale Thanks for attention, I'm just trying create simple template engine so I need to parse template string. I'm trying split with re string with {{(.*?)}} template and re.DOTALL flag. It's not matching {{thing\nsomething\n anotherthing}} without DOTALL flag. As you know the dot char (.) matching everthing except newline. But this flag is not available on micropython. How can I handle it?

solar whale
#

@woeful juniper sorry - you are well beyond my knowledge of regular expressions - Hopefully someone else can help later in the day. Good luck!

woeful juniper
#

@solar whale thank you so much. Actually I have another idea its all about reading string char-by-char and parse it. But I'm not sure is it best way for performance. Do you have any suggestion about it?

solar whale
#

as to parsing each character, I'm not sure how much difference it really makes. I guess it depends on how often you are executing this code.

woeful juniper
#

@solar whale thanks again, I didn't see this topic on stackoverf. It looks like great solution.

solar whale
#

@woeful juniper great! You are welcome. Good luck!

tired steppe
#

@solar whale Nevermind, I figured out my problem last night and was able to build CP without any issues

manic glacierBOT
umbral dagger
#

CP keyboard handling head scratcher: I'm working on a REPL for CircuitScheme. It's coming along well (maybe done for now) except for supporting C-c. I'm catching KeyboardInterrupt and am getting it when C-c is pressed... but not until another key is pressed. I'm using sys.stdin.read(1) to get keys. Thoughts?

solar whale
#

@umbral dagger it works normally on your board in CP, correct -- or does sys.stdin.read(1) block it?

#

oh -- I see, it does

#

same for input()

umbral dagger
#

Fine in CP

solar whale
#

at least on the nrf build it does

umbral dagger
#

Having async C-c is pretty important. For the same reasons it is in CP

solar whale
#

for me in cp if so sys.stdin.read(1) or input() it does not respond to control-c until next char

umbral dagger
#

But I don't want it to break out to the CP REPL. Just the CS REPL.

solar whale
#

actually until next EOL

umbral dagger
#

I'm seeing it happen on next char

solar whale
#

clarify: input() waits for EOL sys.stdin.read(1) waits for another char

#

that is in CP

umbral dagger
#

ok, yes

#

I'm using sys.stdin.read(1)

solar whale
#

right - now I understand -- looks like it blocks until at least one char is received, but the contol-C is not treated as a received char.

#

yikes -- don't do sys.stdin.read() w/o argument -- it just hangs

umbral dagger
#

Right. I never read the \x03 character

#

Which is fine since I need it to be asynchronous so as to interrupt running code

solar whale
#

still trying to find the code for sys.stdin

umbral dagger
solar whale
#

doesn't look good πŸ˜‰

manic glacierBOT
gilded cradle
#

Thanks for the information @solar whale

#

Ok, yeah it compiled successfully without having to install anything new beyond submodules. Also the 2 time functions you mentioned to be missing are now gone on mine too, but the rest of it works.

manic glacierBOT
umbral dagger
#

@tulip sleet I built the latest for the nrf52840 feather. Now it's saying there's no io module. Shall I open an issue for that?

tulip sleet
#

Yes. Just 'io`?

umbral dagger
#

The rest are just the usual suspects.

#

So that should be it.

#

How do I add it? You've revamped that stuff, right?

tulip sleet
#

What’s the specific error?

manic glacierBOT
umbral dagger
#

@tulip sleet ```Adafruit CircuitPython 4.0.0-beta.2-74-g90bc09a31 on 2019-02-17; Adafruit Feather nRF52840 Express with nRF52840

soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most recent call last):
File "code.py", line 31, in <module>
ImportError: no module named 'io'

#

Line 31: from io import StringIO

tulip sleet
#

@umbral dagger did this code used to work? Could you point me to the code?

umbral dagger
#

Works on SAMD51 boards

tulip sleet
#

did you ever test it on nrf before today?

umbral dagger
#

Yes, that's how I discovered that ure wasn't included.

#

I'm in the process of trying to get it running on the nRF feather (and eventually others)

tulip sleet
#

yes, but did you do a successful from io on nrf before today? I know it needs to be defined; I'm just trying to figure out if this is an old or a new problem.

solar whale
#

@tulip sleet ran into this -is is it expected when setting an int with a large value? ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 4.0.0-beta.2-72-gf7a397d52 on 2019-02-16; Particle Argon with nRF52840

import featherwing_rtc_simpletest
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: long int not supported in this build

#

this is the cause rtc.unixtime = 1550335257

tulip sleet
#

could you try on f840? Has something to do with size of build.

solar whale
#

ok -- is argon differnt from nrf52840?

tulip sleet
#

@umbral dagger @gilded cradle @solar whale I have a lead on missing time stuff, etc.

umbral dagger
#

@tulip sleet Have not imported io on an 840 board before. This is my first real attempt at CP on 840

tulip sleet
#

from io didn't actually work on f840 before, but it should, and I'm fixing it.

#

does argon have a spi flash chip/

solar whale
#

yes 8Mbytes

tulip sleet
#

ok, I'll check the definitions, might be an ordering problem or something

#

ok, tried on f840, longint is off, by mistake

#

will fix that too

solar whale
#

sorry only 4Mbytes

#

can you fix this too - argon does not mount the file system if you load the feather_nrf52840_express UF2 to it 🀦

#

I was almost ready to create an issue...

gilded cradle
#

Thanks @tulip sleet. Also, I'm not sure if this was intentional or not, but the Argon's debug LED does not light up for me (at least on the latest Alpha 2 release).

solar whale
#

Does CP even try to use the Argon LED? -- it is not a neopixel but an RGB LED

gilded cradle
#

Ohhh, that explains it. I think there's an issue to add an RGB LED to CP.

solar whale
#

and D7 blinks a blue LED (not D13)

tulip sleet
#

i missed the earlier discussion: which boards are missing ure in the latest master?

gilded cradle
#

What is ure?

tulip sleet
#

micropython's version of re. We should rename it to re sooner or later.

gilded cradle
#

Ah, ok.

solar whale
#

sorry - I was not part of the ure discussion -- not sure where the issue was.

umbral dagger
#

I found it missing on the feather nrf52840 build.

#

And if we're revisiting ure/re it'd be nice to flesh it out.

#

It's missing character classes when I looked.

gilded cradle
#

It's missing on argon too

tulip sleet
#

ok, thanks, on the trck of that too

solar whale
#

@tulip sleet o good deed goes unpunished πŸ˜‰

tulip sleet
#

ok, i have fixes for missing time.mktime() and missing ure. still working on io. It will all be in one PR.

#

i expected worse!

solar whale
#

will it also fix time.localtime?

tulip sleet
#

and longint fixed

#

is it that localtime() is missing altogether or isn't taking the right args?

solar whale
#
Adafruit CircuitPython 4.0.0-beta.2-72-gf7a397d52 on 2019-02-16; Particle Argon with nRF52840
>>> import time
>>> dir(time)
['__class__', '__name__', 'monotonic', 'sleep', 'struct_time']
>>> 


tulip sleet
#

ok, there is no rtc on nrf yet, so right now `time.localtime() throws RuntimeError: RTC is not supported on this board. should it do something else?

gilded cradle
#

it's missing altogether from what I compiled this morning.

solar whale
#

should it work with the RTC Featherwing ?

tulip sleet
#

CPy doesn't know if the featherwing is there or not, so I don't think so

solar whale
#

so only time.locatime needs the builtin rtc? everything else works for rtc via the library

tulip sleet
#

i guess, not sure what it does on boards without rtc enabled (or did do)

solar whale
#

I see -- it is time.localtime,, not rtc.localtime -- nevermind

tulip sleet
#

i think time.localtime() will use rtc.localtime() if available

#

just guessing

solar whale
#

ok -- but for now all but the "unixtime" commands work on the rtc featherwing on the nrfs so that is good -- and time.locatime gives an message along wit the error.

gilded cradle
#

Well, that's on the latest master. It's been about 2 weeks since the latest official release of CP and that one chokes.

#

It chokes on the DS3231 simpletest too

solar whale
#

and there is no rtc.localtime -- the rtc.unixtime functions just call time.localtime

gilded cradle
#

I think rtc.localtime() is a coincidentally named low level function.

manic glacierBOT
manic glacierBOT
granite crow
#

Hi, i just got a feather nrf52840 board and i'm playing with it, this might be super easy mistake i'm doing but the pinout says the user switch can be used as D7 but i get the following error when trying to use it switch = DigitalInOut(board.D7) Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'module' object has no attribute 'D7'

idle owl
#

@granite crow From the REPL: do import board and then do dir(board). It might be something like board.SWITCH.

#

I don't have one connected at the moment to check.

tulip sleet
#

just looked at the source, yes, board.SWITCH

idle owl
#

There you go πŸ˜ƒ

tulip sleet
#

says "D7" in the pinouts stuff User/DFU Switch
A tactile switch is provided for use in your projects, which is connected to P1.02 and is accessible in code as D7.
Maybe we should say "Arduino pin 7 or CircuitPython board.SWITCH" or something like that

granite crow
#

great, it works! thanks for the fast reply

#

yep, also maybe with the user led can be used as led = DigitalInOut(board.RED_LED)

exotic pumice
#

what does the magic number 500000 represent in bitbangio spi?

tulip sleet
#

self->us_delay = 500000 / frequency; frequency is in Hertz. us_delay is microseconds delay, so this is half of a clock cycle

raven canopy
#

the lucky winner? 😝

exotic pumice
#

oh I see, 1Hz is 1000000us

tulip sleet
#

yah

exotic pumice
#

got it

tulip sleet
#

i agree a comment might be good

obsidian dome
#

can someone point me at any directions for how to build CircuitPython from sources?

gilded cradle
obsidian dome
#

Thanks!

exotic pumice
#

what's the max speed of bitbangio spi?

#

my reimplementation is going 30KHz when I tell it to go 3MHz and I'm not sure if that's a math bug or a limit

#

seems like a limit

#

turning on optimizations got me to 150KHz, interesting

obsidian dome
#

Can anyone point me at what circuitpython components are excluded for the trinket_m0?