#circuitpython-dev
1 messages ยท Page 178 of 1
hmm
@idle owl @raven canopy please take a look at:
https://github.com/adafruit/Adafruit_CircuitPython_HT16K33/pull/15
will fix things for now at least...
@tidal kiln Done, I'm leaving it for sommersoft to take a look at as well.
@idle owl I think rtd is churning the themes, not something we can fix for now
@tulip sleet Ok good to know.
@idle owl thanks!
Just got my Gemma M0 up and running
so much better than arduino so far
but Arduino does have more libraries
print("yay!")
so is there a place where all the pinouts are listed or am I missing something?
so far I only know pin 13 is red led
I found a guide
Are you looking at the Learn Guide? [we crossed]
well I went to the github listed above so I think I'm good on guides
fingers crossed that adabox 008 has circuitpython and a crickit
@haughty bobcat this? https://learn.adafruit.com/adafruit-gemma-m0/pinouts
yes!
the other little trick is to do this in REPL:
import board
dir(board)
Ok thanks!
So is Arduino on its way out?
Personally I haven't heard any new things about Arduino for a while
plus, all the boards you can program with circuitpython can also be programmed with arduino
yeah it's a win win
think of it as more programming options, not one thing replacing another
so is adafruit just going to start making everything circuitpython since the chipsets support both?
I just tried the test case in the previous post on an M4 (without sleep) and the number of iteration varies quite a lot:
Adafruit CircuitPython 3.0.0-rc.0-25-gd7d132d5a-dirty on 2018-06-26; Adafruit Metro M4 Express with samd51j19
>>>
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
time: (2000, 1, 1, 0, 0, 39) monotonic:0.244003 iterations:403
time: (2000, 1, 1, 0, 0, 40) monotonic:1.003006 iterations:548
time: (20...
@haughty bobcat you still can do more with Arduino โ it gives you more resources on the same hardware
so there will be both
this is probably more of a general Python question, but is there any way for me to have an array of variables where some of those variables are a single thing and some are themselves an array of variables?
@scarlet fjord Yes, absolutely!
or a better way would be to have everything as an array of arrays, but then have the single-thing ones be just an array of one?
Say you have variable [X, Y, Z]
With python, variables can be freely changed.
So you can do something like X = 10
X is now an int.
Well, more accurately
Var[X, Y, Z]
Var[0] = 10 would make X an int
oh ok, so something like this then, should work?
Var[0] = [0, 10, 5] would make X a list
kbd_p1 = [Keycode.A, Keycode.S, Keycode.F]
kbd_p2 = Keycode.B
kbd_p3 = Keycode.C
kbd_p4 = Keycode.D
kbdkeys = [kbd_p1, kbd_p2, kbd_p3, kbd_p4]```
Yep, that should work.
ok cool
But, you'd have to re-update kbdkeys
Which could be useful in some cases, IE to see if it has changed.
what do you mean update it?
Oh, right. Sorry.
If you changed kbd_p1, it wouldn't automatically update inside kbdkeys
Keyboard.press() will take multiple arguments. So if you make them all lists or tuples, you can do this:
kbdkeys = ( (Keycode.SHIFT, Keycode.A), (Keycode.B,), (Keycode.CTRL, Keycode.D))
...
kbd.press(*kbdkeys[i])
im assuming then;
Traceback (most recent call last):
File "main.py", line 48, in <module>
File "adafruit_hid/keyboard.py", line 116, in release
File "adafruit_hid/keyboard.py", line 156, in _remove_keycode_from_report
File "adafruit_hid/keycode.py", line 305, in modifier_bit
TypeError: unsupported types for __le__: 'int', 'list'```
I'm assuming im not doing what Dan just said i should do ๐
two new concepts there: * in arg list, and (1,) for a tuple with one element
(whats a tuple) ๐
it's a math term generalizing the idea of pair, triple, quadruple, etc.
quadruple = 4-tuple
i see
Deshipu and Dan know a lot more than I, and it's dinner time for me anyawy.
thanks for your help! ๐
most of the time you can use tuples and lists exchangeably
the exception is for dict keys, where you can't use mutable objects, so you can only use tuples
hmm ok
so
kbd.press(*kbdkeys[i])
is looking for whatever '*' is? in an array called kbdkeys, for the array item at index [i]?
the asterisk in this place is a little tricky to explain
it lets you pass a list (or tuple) as parameters to a function as if you separated them with commas
for instance, instead of f(1, 2) you can have x = (1, 2) and then f(*x)
i see, ok
you can also use two asterisks to pass a dict as keyword arguments, for example x = {'a': 1, 'b': 2} and then f(**x) gives you f(a=1, b=2)
don't worry if you don't understand now
you will get there
haha yeah i wasnt expecting to understand any of this right away ๐
theres just so much that i didnt expect to need to understand to get this to work ๐
the issue im having is this:
so
kbd_p1 = [Keycode.A, Keycode.S, Keycode.F]
kbd_p2 = Keycode.B
kbd_p3 = Keycode.C
kbd_p4 = Keycode.D
kbdkeys = [kbd_p1, kbd_p2, kbd_p3, kbd_p4]
keypress = kbdkeys[keyindex]
kbd.press(*keypress)```
gives an error:
TypeError: can't convert list to int
which line?
File "main.py", line 49, in <module>
which of those lines is the 49?
which in my code is a print str...
waiduminnit
yup, lol... changed the do thing but didnt change the print thing ๐
it's always good to look at the line to which the error points, Python is a bit better than C in guessing where the error is
though of course it's not always perfect
print("Pressed #%d" % *keypress)```
`SyntaxError: invalid syntax`?
im assuming im not allowed to just do what i just did ๐
yeah, you can only use * this way in a function call
fair
kbd.release(*keypress)```
` File "main.py", line 48, in <module>
TypeError: 'int' object is not iterable`
I suppose you could change the %d to %r
oooh is that like a type thing, so %d would be int, so i can change that to str or something?
if you look carefully at Dan's example, he used 1-element tuples
yes, %s is string, %f is float, and %r gives you the "representation" of the object
ah
oh, of course...
woohoo! thanks a bunch ๐
@stuck elbow and @tulip sleet thank you both for your infinite wisdom and patience ๐
np
@tulip sleet when building circuitpython 3, should i be using branch master or 3.x
depends on what you're testing. master is now for nRF board development, but we are merging from 3.x to master. either is probably fine. if you're trying to pretend to be a regular user, use 3.x.
@slender iron TLDR: something's up with busio.OneWire
deets follow...
Adafruit CircuitPython 2.3.1 on 2018-05-07; Adafruit Itsy Bitsy M0 Express with samd21g18
>>> import board, busio
>>> ow = busio.OneWire(board.D7)
>>> ow.write_bit(1)
Adafruit CircuitPython 3.0.0-rc.0 on 2018-06-18; Adafruit ItsyBitsy M0 Express with samd21g18
>>> import board, busio
>>> ow = busio.OneWire(board.D7)
>>> ow.write_bit(1)
and there can be additional confusion due to the fact that D5 is a special pin on the Itsy (the example should be updated to use something else)
@tulip sleet โฌ FYI
that is a looooong bit
sure thing
REF: https://forums.adafruit.com/viewtopic.php?f=60&t=137405
D5 is a special pin on the Itsy, but even using D7 for testing indicates something is not working:
CP 2.3.1
Adafruit CircuitPython 2.3.1 on 2018-05-07; Adafruit Itsy Bitsy M0 Express with samd21g18
>>> import board, busio
>>> ow = busio.OneWire(board.D7)
>>> ow.write_bit(1)

CP 3...
@idle owl is it possible to fork an empty repository? I'm not able to get going with the one you setup for me today for the MLX90614 driver. https://github.com/adafruit/Adafruit_CircuitPython_MLX90614/
Closing. Reopen if you have more questions, or ask in #circuitpython on https://adafru.it/discord or in https://forums.adafruit.com
@strange pumice I would have thought so, but maybe not. I'm at a meeting. I'll take a look when I get home. Worst case, I'll upload the first version.
seesaw library is also updated.
Crickit builds were shrunk slightly to fit by using -finline-limit. make variable CFLAGS_INLINE_LIMIT introduced to generalize doing this via mpconfigboard.mk.
just scanned over some of Adafruit_Blinka. very nice!! "Blinka, for all the things!" ๐
@strange pumice I don't think so. I usually have github put in a bogus README temporarily. need me to?
haha. i just looked at that too, and was about to suggest the same thing (a bogus file). fork is definitely disabled since it is empty.
@slender iron if you don't mind placing a bogus file in there for me that would be great.
kk
done @strange pumice ! https://github.com/adafruit/Adafruit_CircuitPython_MLX90614
thanks...tryign now.
๐
Back.
I think it is beyond OneWire. I ran this test for DigitalInOut, since that is all that shared-modules/bitbangio/OneWire is doing:
Adafruit CircuitPython 3.0.0-alpha.1-737-gd1b3c3c-dirty on 2018-06-22; Metro M4 Express with samd51j19
>>> import board, digitalio
>>> d = digitalio.DigitalInOut(board.D11)
>>> d.switch_to_output(True, digitalio.DriveMode.PUSH_PULL)
>>> d.switch_to_input()
>>>
Same flatline result:
 ๐บ
As well you should have!
The DRVSTR bit setting thing was added about eight months ago, but the code was wrong for PBxx pins initially. It worked OK for PAxx pins. That was fixed 2 months ago.
btw if you want to update your tags, you can do git pull --tags
@tulip sleet so drive strength is probably a red herring? i trust that you and Scott are light years ahead of me on pin handling... ๐
and no errata or other datasheet goodness that points to DRVSTR.
@sommersoft How did you decide to do digitalio.DriveMode.PUSH_PULL give no args to switch_to_input()?
shared-module/bitbangio/OneWire.c` does this:
void shared_module_bitbangio_onewire_write_bit(bitbangio_onewire_obj_t* self,
bool bit) {
common_hal_mcu_disable_interrupts();
common_hal_digitalio_digitalinout_switch_to_output(&self->pin, false, DRIVE_MODE_OPEN_DRAIN);
common_hal_mcu_delay_us(bit? 6 : 60);
common_hal_digitalio_digitalinout_switch_to_inp...
@raven canopy we could easily be wrong, it's just that the DRVSTR change was made a long time ago, and a similar change was also made in 2.x.
i am going to try a onewire device in old and newer 3.0's
My initial test with OPEN_DRAIN didn't pull the pin high, since I'm using the pin directly. If I were using a OW device, the slave would be pulling it high; at least that is my understanding. So, I forced it with PUSH_PULL.
The no arg switch_to_input is because it defaults to PULL_NONE anyway.
I was really just trying to force the behavior of switching between modes, and being able to capture it with the Saleae.
Yep! That was my bad. Using switch_to_input(pull=Pull.DOWN) fixes my test. Disregard my rambling... ๐
@raven canopy I don't want to discourage you at all from trying to debug this. I was just trying to understand why you did what you did. I think an interesting test would be to duplicate the OPEN_DRAIN and PULL_NONE settings, and re-test with an external pullup, since that's how the devices work. There may well be a port setting issue.
I was thinking of using Atmel Studio to verify that the pin config registers were changing accordingly. but, that was under my assumption that my test was "valid". i can keep poking at it. abstract testing is largely an experience base; my base is shallow. ๐
I am testing with a DS18B20 temp sensor. I went all the way back to 3.0.0-alpha.2, and it doesn't work there either. Also verified 2.3.1 works. I am just scanning the OneWire bus for the device.
watchhing tihis discussion made me think that the DHT is "like a one-wire" so I tried a DHT22 and it does work with master. Just FYI - probabbly of no help.
@solar whale I looked, because that was intriguing. The DHT library uses pulseio, not bitbang, so it's not exercising the same paths.
@raven canopy I did comment out the DRVSTR setting, and it still doesn't work. But the way setting the pin value works is kinda different in 2.3.1 vs 3.0.0. Diff screenshot attached. The gpio_... routines in ASF4 actually do more than the register operations in 2.3.1. Worth looking at carefully. I also wonder if there's something wrong with the microsecond timer for some reason.
@sharp rain were you using CP2.x or 3.x?
(I'm getting memory errors on my branch of CP3, trying master)
(Feather M0 express)
Huh, build error. make: *** No rule to make target `peripherals/samd/clocks.c', needed by `build-feather_m0_express/genhdr/qstr.i.last'. Stop. on newest master
Trying a fresh checkout
ah oops, git submodule update --init --recursive : forgot the --init
also fails on master 3.x
I spent time on this and have OneWire working, if a bit erratically, with a DS18B20 temp sensor. Two issues:
common_hal_digitalinout_set_pull()worked differently in 2.x vs. 3.0. In 2.x it always sets the port direction to input. In 3.0 it just set the pull-up/down/none bits, without forcing the direction to input.common_hal_digitalio_digitalinout_switch_to_input()was depending on the direction change, because it wasn't doing it itself explicitly. (Thanks to @sommersoft for lookin...
I'll continue on this OneWire thing in the morning.
Hello ... I'm new around here. Just began using CircuitPython last weekend. Would anyone know why the method described to install Mu with the plotter doesn't seem to work for me? Tried on both of my Macs following the steps described here: https://learn.adafruit.com/welcome-to-circuitpython?view=all#installing-mu-editor I've been using Mu just fine, wanted to try the plotter so I installed Homebrew, entered the next commands described. Each appeared to run successfully, but when I type Mu in Terminal ... "Command not found"
Maybe I broke something with my SPI patch, I will try to debug the issue tomorrow.
c4f11df flash target update bootloader setting to skip ... - hathach
just push the update, pca10056 will behave like feather52840 from now. I.e it needs bootloader + sd and can upload via dfu-flash.
I also update the flash (with jlink) target to update bootloader setting (mark app as valid and disable CRC checksum) so that we could flash circuitpython with jlink.
The dfu-related target is also moved from board.mk to common's Makefile since several files uses them now (details here https://github.com/adafruit/circuitpython/blob/nrf52840_usbboot/ports/nrf...
I know this is on a different branch, so not really a problem, but for now I'm using the pca10056 board files for my own board and I don't want to use the bootloader on it just yet, so I think once we merge we should revert to not force the users to have a bootloader on non-feathers. I think we could maybe make it configurable with make flags like we do with softdevice, so when we build we could just specify make BOOTLOADER=0 or BOOTLOADER=1, we could do that with the feathers too, just f...
@sweet wedge Did you type "mu" or "Mu" to run?
In any case, there is now a real installer for the Mac, available here: https://codewith.mu/ -- click the Download button. We'll be revising the Mu installation instructions imminently to reflect this rather than the complicated procedues described in the guide.
@sweet wedge when imu is installed via the new MacOs installer, it isntalls to "Applications" as mu-editor and can be started by double clicking on the mu-editor icon -- it does not install a command line script to start it.
you can start if rom the command line by entering /Applications/mu-editor.app/Contents/MacOS/mu-editor
or even simple open -a mu-editor
@solar whale thanks for elaborating
I thought I'd finanlly give it a try myself!
@ruby atlas Its CP2.x but I'm using fairly basic python so I would be surprised if the code is not compatible.
Compatible. Just out of memory.
Any chance we can do something about very long usernames?
It's extremely annoying to me.
Not everybody is 25 years old.
what do you mean?
well your name is 7 letters and in lowercase.
right? Mine's 3 letters. 'adafuit' is 8 letters but one of them is an 'i' which takes up less room here (we use proportional fonts)
I think I follow so far
MYNAMEISJOEKAVEMAN is a bit larger than those examples.
that is true, what of that?
Well it's distracting and it serves no purpose here. It doesn't facilitate communication; it obstructs it.
you lost me there
MYNAMEISJOEKAVEMAN suppose I say
MYNAMEISJOEKAVEMAN lots of things that have no real value
MYNAMEISJOEKAVEMAN but in each utterance
there is tab completion, so it doesn't really matter
MYNAMEISJOEKAVEMAN I state that my name is joe kaveman
MYNAMEISJOEKAVEMAN in all caps.
I believe I've just illustrated the problem.
That's your real name though.
It looks like a real name and the eye forgives the length because it has a natural aesthetic quality about it.
(I think it's excessive practice for every single utterance, but it's your name and it's nice to see it once in a while).
Dido Florian Cloud de Bounevialle O'Malley Armstrong
is a real person's name, too.
But she uses 'Dido'. ;)
I'm back quiet (and afk).
@arturo182 you could just flash it with flash target as you did currently, you don't have to flash the bootloader If you don't use it. Though I think pca10056 & feather52840 should share the same linker for fat filesystem
Oh, I thought if the bootloader is present then the firmware is flashed to a different location in the memory, was that not the case? I need to read through the commits in that branch at some point ;)
Ah, The bootloader is placed at the end of the flash, the application address is the same in both cases. However, the bootloader did perform a checksum to decide if the application (circuitpython) is valid. This memwr will set it to 0 ( disable crc ). So yes, you could simply make flash it now, I use it as well, to just speed up the testing here :D
https://github.com/adafruit/circuitpython/blob/nrf52840_usbboot/ports/nrf/Makefile#L259
 is not always accurate. Using some NOP loops but need to tune it.
@tulip sleet k. it could be related to the monotonic issues notro reported
i don't know if those issues are cause or effect. I think the time it takes to go through tick_delay varies depending on whether it's on a ms boundary or not and maybe other stuff.
onewire turns off interrupts but needs to do delays of like 6us, which is not always accurate, it appears. I get CRC errors from the DS18B20 on and off. Didn't see these on 2.3.1.
i think we can't use pulseio because it has to be an open-drain output, which is simulated by switching back and forth to an input
I hate time-based protocols
time-division multiplex forever ๐
I'm looking at this today. I've got my heap analysis setup going.
"OUT OF STOCK" ๐ฎ any guess to how soon they will be shipping again?
Usually that is answered in terms of "few weeks". Depends on what "they" you are referring to. At any rate, best suggestion is to use the "Notify" button; it's usually the best and quickest indicator. @teal bear
If it's a good selling new item you have to watch it manually. ;)
thanks - isn't this the CPX channel? (that's the they I was hoping to buy
I've been burned several times by thinking 'Notify' was going to give me a good shot at a newly introduced item.
CarlFK there are no channels that are board specific. ;)
what else does circuitpyuthon run on?
Every SAMD21 board (M0 is usually in the name).
Feather M0 Express. Metro M0 Express. Gemma M0. Trinket M0. ..
The ones without 'Express' in the name usually don't have a 2MB SPI flashROM on them, and so even when they run CircuitPython, there are restrictions on how large a library can be stored on the target board at any one time.
The 'Express' ones all have 2MB SPI flashROM and can hold the entire populated /lib folder.
neat - thanks
i the cpx was more expensive I might look at the smaller ones .. but for $25 it's hard to justify going cheaper
The form factor is an important aspect of the CPX as well as the wide variety of sensors.
I show them to people that want to learn Python and they keep trying to buy mine
Haha yeah have a few spares to sell!
so today I decided to to finely do that... and Bzzz
What happened?
@teal bear DigiKey has 59 in stock. https://www.digikey.com/product-detail/en/adafruit-industries-llc/3333/1528-2280-ND/7310913
@tulip sleet Do you want me to wait for Scott to review this or merge it?
@idle owl thanks, it was fine you did
@tulip sleet did you run into any issues with servos getting very hot with the extended min/max pulse limits?
@solar whale, i didn't really test that, I was just looking at the angle. I think the 550-2400 is a compromise, some are wider
have you seen that?
OK - I did some playing when I first got my CRIKIT and one servo go vry hot when I pushed the limits out. Not an exhaustive test. I did not repeat the test ๐
not sure if it was the limit or something else I did. It kept working.
I'll try to reproduce it int the next few days. more systematically.
I went to the Tower Pro website and they don't actually seem to give the specs for pulse width! I am giong to ask CGrover
he added one extra to some info the library
I had the same issue about needing more range.
I think if you go too far and hit the stops it wil get hot
so just back off a little
1000-2000 is clearly too low
I think it is just shy of the stops. I just tested the micro servo and the continuous servo
I don't recall how far I went. sorry.
this website https://servodatabase.com/ lists some limits, but they're missing for a lot of the servos.
that's ok, I think it's trial and error.
it seems to be a bit empirical!
there may be sample variation as well
I did a bunch of googling and came up with very little, which I don't really understand. I thought the RC world would be all over this issue
just something to watch out for
ya, I'll ping @errant grail now - he's offline. @errant grail, how did you come up with the pulse limits for the servo you put in a PR to the motor library, and do you know in general where this stuff is documented and explained?
thanks - I was surprised how hot it got, but it recovered nicely when I stopped!
Limor just told me in a mtg earlier this evening that the default limits should be changed. Brought up in several ways including this forum post: https://forums.adafruit.com/viewtopic.php?f=8&t=137545
Python 3.7 released: See https://python.org and https://pythoninsider.blogspot.com/2018/06/python-3.html
I'm not objecting to the change. Just curious if others have seen issues. Again, I need to do more systematic testing.
what will 3.7 break ๐
Its going to take me a day to clear enough space on the workbench to test servos again! I'm buried in radios....
@tulip sleet The values I provided were for just the Tower SG92R servo. Those values were determined experimentally using a batch of three servos recently purchased from the Adafruit store. I subtracted 5% from the empirically-measured range to determine new recommended values. I searched far and wide for specifications or guidance on those specific servos, but found nothing. A suggestion would be to provide an obvious note in the examples that the values can vary from batch to batch and that driving the servo to the min or max physical positions can cause permanent damage.
Sounds like a good idea. We can add that. A guide is underway as well. Thanks! Yes, the whole thing seems to be poorly documented. Maybe in RC applications one rarely goes to the limits?
My dad was an avid RC enthusiast and rarely pushed the limits of servos. Having trim and gain always handy on the controller helps, too. Wish the hobby servos were smarter about that -- mechanically and electrically.
( Sorry about the delay in my response. I missed S&T and AskEng, too. ๐ฆ )
no problem - I was just making a new motor library release and noticed you gave some servo data and thought maybe you had insider knowledge.
Thanks @tulip sleet and @errant grail - glad I'm not only one finding it hard to get clear guidance for the servo limits
I'm wondering if the servo universe will change now that Tower is out of the picture. I wonder who (in China) really makes the Tower servos...
Tower/Hobbico selective product lines were sold to Horizon Hobbies, I believe. Many of the parts I use are out of stock on the current Tower site.
Bed time here - good night all! -- I will try to set up some servo testing tomorrow.
I did some looking. I think that may be name overlap. https://www.towerhobbies.com/ does not seem to be the same as http://www.towerpro.com.tw/.
@tulip sleet That's good news. Have been ordering Tower servos from Tower Hobbies for so long I thought they were the same. ๐
I'm seeing some odd behaviour that I haven't found an explaination for. ItsyBitsyM0 Express. Double reset goes into bootloader mode fine. Drop the uf2 onto it (CP3rc0). ITSYBOOT unmounts, but CIRCUITPY never mounts. Reset does get it to mount either. The dotstar indicates that it's in the CP runtime (solid green). Thoughts?
I can load an arduino sketch with no problem.
Just did the same with the ItsyM0x this morning and didn't encounter any issues. FYI
Yeah, I've been using them since they came out.
Ran for 17 min 20 sec
So this saved about 4-5 minutes total.
Thanks for the explanation, I will try it today then!
For a moment I was confused how does the SD know to execute the bootloader and not the application, but I checked the bootloader's source and I can see when you flash the hex, it also writes the bootloader address to the UICR which is used by the SD to jump before executing the bootloader, feels like magic ;)
@umbral dagger which OS and version? Try changing ports and rebooting, especially for Linux and Mac. If that doesnt' work, try beta.1 and see if it's different, and 2.3.1 if necessary? Post an issue if it seems consistent. Thanks.
Latest Ubuntu. I lost bootloader mode at one point, but a reboot fixed that. Changing from a hub to a frontpanel USB port doesnโt bring back CIRCUITPY.
@umbral dagger can you do os.listdir() from the repl?
@umbral dagger the circuitpy disk won't mount if the filesystem is corrupt
or otherwise inaccessible
I donโt get a REPL. No presence at all.
My next step is to reformat in C I guess.
did you try on an another computer? did you reload the .uf2?
Itโs a cable Iโve been using successfully before this.
make sure it's the right .uf2 for the board
@umbral dagger - just my experience -- on my Ubuntu system -- the CIRCUITPY drive often shows up in the file manager but does not auto mount. Clicking on the drive icon mounts it and I can copy file to it -although drag/drop often does not work in the file manager.
for me it often mounts, but the directory is read-only, I have to do chmod +w .
@umbral dagger i built circuitpython on my ubuntu machine from source and had the same problem as you. i was thinking i did not have my machine tools installed correctly. are you also building circutpython from source?
nevermind - if you are not getting REPL, its a different issue. I can always get to REPL
solid green is unusual, usually it's pulsing green
@fading solstice No, using the release uf2
what was in the main.py? anything unusual?
"adafruit-circuitpython-itsybitsy_m0_express-3.0.0-rc.0.uf2", right?
@umbral dagger when you connect it does /dev/ttyACM0 or any /dev/ttyACMx appear ? just wondering if when you connect to REPL, soes it connect but not respnd (possibly running code) or does it fail to connect at all.
@tulip sleet yes
The board was fresh from the factory, so whatever demo code was preloaded.
@solar whale ttyACM0 shows up, screen connects but thereโs nothing responding. Unplug and screen exits. (ttyACM0 goes away)
so ctrl-C more than once does nothing
sounds like it is booting and running.
it was probably loaded with 2.3.1, so the lib directory is 2.x .mpy's. Can you load 2.3.1?
is there an itsybity_m0 eraser
no
if 2.3.1 can be loaded, then try getting to repl there, and easy to erase fs from repl
i could build one, just haven't
let me check - I may have built one...
but @umbral dagger try 2.3.1 first
i imagine lots of things going on we can't see ๐
I do have a .uf2 that will create a new FS - built in April --- I can post it if useful.
@tulip sleet Will do
hello it me again with another question ๐
following this tutorial for more GPIO on my Feather M0 Express:
https://learn.adafruit.com/using-mcp23008-mcp23017-with-circuitpython/software
it makes mention of the I2C addresses:
Either class initializer can also be passed an optional address keyword to override the I2C address
but it doesnt say how to use those address keywords.
i have two MCP23017 chips, one at 0x20 and one at 0x24, but i dont see how to tell CircuitPython that?
mcp = adafruit_mcp230xx.MCP23017(i2c, address=0x24)
ah, yep thanks, i just saw that on the github page ๐ (this one: https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx/blob/master/examples/simpletest.py)
does the library have any way of inverting the pin value?
cause the MCP23017 can be set up as pullup inputs, which would give False if the switch is pressed, and that is confusing to me ๐
unless im dumb and it can also be configured as pull-down?
looks like there are only pull-ups. I know it's confusing, but kinda typical to use pull-ups instead of pull-downs, so I'm afraid you'll have to live with it. you could write a helper function in Python to invert the value if you don't want to do if not blah.value
I added an example of using address= to the guide.
"active low"
@tulip sleet 2.3.1 works fine
3.0rc0 works fine on a different ItsyBitsyM0Express board
in 2.3.1 you can erase the FS import storage storage.erase_filesystem() then reload 3.0 -- but @tulip sleet may have had other things to check first.
@umbral dagger if there is a main.py/code.py you could rename it in 2.3.1 and see if 3.0.0rc0 starts, or just erase the filesystem in 2.3.1 and see how 3.0.0rc0 works
@solar whale That did it. It now seems fine in 3.0
I'm so bleeding edge.... never occurred to me to go "back" to 2.3.1
interesting...
was the othe IitsyBityM0 you tried also "fresh" that is did it have the same 2.3.1 based main.py and libs on it?
It would have initially, but I've been working with it for a while. This "new" one was from the saem order. It's been built into a project (i.e. I wanted a headerless one) so I grabbed a fresh one from the drawer.
As Dan said, probaly 3.0 did not like trying to run the .mpys from the 2.3.1 lib. Still a bit surpriing there was no way to "break" out in the REPL.
is there any way to ask the adafruit feather what sort of devices are connected to it over i2c, and specifically what addresses those devices have?
I ask because I can't seem to find these mcp23017 devices
nvm, taking the picture helped, that darned resistor there was plugged in to the wrong thing
@scarlet fjord you can do i2c.scan()
@scarlet fjord you have to do i2c.try_lock() before that, though
@tulip sleet I am trying to build metro m4 circuitpython from github source. it build (with a warning), but emits a uf2. when i copy the uf2 to my metro m4, i get the exact same behavior as dastels. maybe my machine does not have the coreect setup. is there a doc i should be following to setup my machine. UBUNTU 16.04
oh cool, thanks for letting me know ๐
ive figured that out now though, it was just that resistor not doing its job that caused them to not be detected ๐
hmm...
File "main.py", line 27, in <module> MemoryError: memory allocation failed, allocating 584 bytes
all im doing is this:
line: 17 pin00 = mcp1.get_pin(0)
line: 18 pin01 = mcp1.get_pin(1)
line: 19 pin02 = mcp1.get_pin(2)
line: 20 pin03 = mcp1.get_pin(3)
line: 21 pin04 = mcp1.get_pin(4)
line: 22 pin05 = mcp1.get_pin(5)
line: 23 pin06 = mcp1.get_pin(6)
line: 24 pin07 = mcp1.get_pin(7)
line: 25 pin08 = mcp1.get_pin(8)
line: 26 pin09 = mcp1.get_pin(9)
line: 27 pin10 = mcp1.get_pin(10)
line: 28 pin11 = mcp1.get_pin(11)
line: 29 pin12 = mcp1.get_pin(12)
line: 30 pin13 = mcp1.get_pin(13)
line: 31 pin14 = mcp1.get_pin(14)
line: 32 pin15 = mcp1.get_pin(15)
have i hit some memory limit im not aware of or something??
@fading solstice if you reset the Metro M4 - what does the LED show ? if you type `ls /dev/ttyACM*' do you see anything?
@scarlet fjord you ran out of memory, but that's strange if it's the only thing your program is doing
its not all im doing, but... im not doing much? i dont think...
the serial port does not connect on Ubuntu and does not connect to Window 10. the rgb led is solid green
the metroboot shows after double click
i did a thing and now it does this:
File "adafruit_hid/keycode.py", line 31, in <module> File "adafruit_hid/keycode.py", line 165, in Keycode MemoryError: memory allocation failed, allocating 584 bytes
circuitpy does not show
does screen /dev/ttyACM0 connect
@solar whale no
does ls /dev/ttyACM* show anything -- may conenct as ACM1...
@tulip sleet @solar whale nothing connected. BTW last 3.0 release uf2 works.
I did the erase_filesystem trick. did not help
same on windows 10
no
one thing to try is boot a working 3.0 version and erase the FS then reload RC0
extern mp_obj_tuple_t common_hal_usb_hid_devices;
^
common-hal/usb_hid/__init__.c:127:16: note: 'common_hal_usb_hid_devices' was previously declared here
mp_obj_tuple_t common_hal_usb_hid_devices = {
^
that is normal
ok thanks
@stuck elbow is there anything i can do? im at an impasse here, i have no idea how to progress
its a known issue with -lto and the frozen modules
oh, anything to get around it?
the solid green LED indicates the Metro is running somthing --- odd
It is just a warning -- not a problem
no need to do anything about it
if i was able to build a uf2, then either my machine is not setup correctly or the source i am build is incorrect
are you building current master?
i tried master then i tried 3.x. same result from both
git submodule foreach --recursive 'git fetch --tags'
i cut 39 lines of code (all variable assignments identical to above) and i got the number to go up ๐
File "adafruit_hid/keycode.py", line 195, in Keycode
MemoryError: memory allocation failed, allocating 776 bytes```
try running thos commands after you do git pull in master
i used git fetch adafruit; git pull adafruit. i am thinking i should try to clone the source instead
@solar whale i see your message now. i did the first, but not the second
try the second -- won't hur t ๐
@scarlet fjord I suppose you can save memory by using the mcp1.gpio() method directly, instead of creating all those pin objects
@fading solstice see if it helps -- it may depend on the version of git running. It has been a recent change needing it for me. @tulip sleet is more familiar with the reason for it.
oh, how does that work? @stuck elbow
are you reading or writing?
@fading solstice jsut to be sure, you are using a "new" metro M4, not one of the older "revbs"
how much memory should i have access to? im really not doing all that much
im reading, i think
listening for switches
oh, sorry, gpio is a property, not a method, so you simply read it, and it gives you a value where each bit corresponds to a state of pin
@idle owl https://github.com/adafruit/Adafruit_CircuitPython_MLX90614/pulls is ready for QA.
so for example to check if the first pin is high, you would do if mcp1.gpio & 0x01:
for third it would be & 0x04 etc.
using powers of two
@fading solstice if you load a working 3.0 into the board and at the repl tyrp import os os.listdir() what do you see?
0x01, 0x02, 0x04, 0x08, 0x0f, 0x10, 0x20, 0x40, 0x80, 0xf0
@solar whale
>>> import os
>>> os.listdir()
['.fseventsd', '.metadata_never_index', '.Trashes', 'boot_out.txt']
what if i want to read the state of all 16 pins from 3 MCP23017 chips? surely id need to make an array of all the pins and read them in a for loop, instead of writing out a lot of if mcp1.gpio & 0x01?
whats different between mcp1.gpio() and mcp1.get_pin()?
@scarlet fjord what do you plan to do with the values once you read them?
@solar whale the board is the Metro M4 Express BETA
ok - that shpuld be fine.
im trying to make a keyboard, so i have a list of keys and a list of what those keys do, then a for loop that runs and checks each key to see if its pressed then passes on the keycodes that that key presses over USB as a HID if that key was pressed
@solar whale i rebuit with the extra git command. same result
@scarlet fjord ok, so perhaps something like this will work:
@fading solstice did you do make BOARD=metro_m4_express clean make BOARD=metro_m4_express that is make clean first
that is what i do all the time
for mcp_id, pressed in enumerate([mcp1.gpio, mcp2.gpio, mcp3.gpio]):
for bit in range(8):
if pressed & 1 << bit:
print("key %d of chip %d has been pressed" % (bit, mcp_id))
running out of ideas -- hopefully Dan will have magic answer when he gets back.
(you might need to negate it)
does dmesg shown anything about the USB connection when if you run it after a RESET of the board
1 << bit calculates the power of 2 corresponding to the bit
woah that looks fancy
idk what it does, but ima try it out? ๐
@scarlet fjord you might need to enable the pullups with mcp1.gppu = 0xff first
aaaand I found a bug
this won't work
im assuming i have to set them as inputs too?
they are inputs by default iirc
@solar whale the METROBOOT has a connection, but after the uf2 is coopied and after a single click reset, no connections are logged
it is METROM4BOOT, correct?
sorry yes
whew ๐
@solar whale just to make sure i am doing the right thing. cd circuitpython; cd ports; cd atmel-samd; make clean BUILD=metro_m4_express; make BUILD=metro_m4_express
looks correct (as long as you spell BUILD correct on the second make ๐ -- then copy the build_metro_m4_express/firmware.uf2 to the METROM4BOOT
just for a test, I can post a .uf2 I have built and used.
sure
metro4m
@solar whale that worked.
that is very odd -- it was from 2 days ago
I can do a ne pull and buld - but I can't test it if you want to try it.
yes i will
building - just a sec
thx
new metrom4
well its 2:30 am and i need sleep, but if anyone wants to have a dig through and figure out why im running in to memory issues when using the adafruit_hid.keycode library, that would be really cool...
Just @me and ill see it in the morning ๐ฌ
(for context, the keycodes im defining in macros are arbitrary and random at the moment, i just wanted something there)
@solar whale yeah, that worked as well.
has to be something wrong with my environment
weird - waht arm-none-eabi-gcc are you running -- I have 7.2.1
how to i tell
arm-none-eabi-gcc -v
gcc version 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204] (GNU Tools for Arm Embedded Processors 7-2017-q4-major)
same -- one other suggestion -- after you cloned did you build mpy -cross -- make -C mpy-cross
not sure -- worth a try. If for some reason it is building 2.x versions ....
at top level make -C mpy-cross
@tulip sleet @slender iron I'll be out for a couple of hours this morning/afternoon. Should be back before 2pm.
then rebuild the .uf2
also jsut to be sure, git branch shows you on master, correct?
can someone please review this? https://github.com/adafruit/Adafruit_CircuitPython_MCP230xx/pull/2/files
@solar whale master branch, rebuilt after building mpy-cross; still fails ๐ฃ
๐ฆ sigh
do you have the same number of bytes as me?
4068 bytes free in ram for stack out of 32768 bytes ( 32.0 kb ).
Create metro_m4_express/firmware.bin
Create metro_m4_express/firmware.uf2
../../tools/uf2/utils/uf2conv.py -b 0x2000 -c -o metro_m4_express/firmware.uf2 metro_m4_express/firmware.bin
Converting to uf2, output size: 457216, start address: 0x2000
Wrote 457216 bytes to metro_m4_express/firmware.uf2.
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
install -d build-metro_m4_express/genhdr
python3 tools/gen_usb_descriptor.py \
--manufacturer "Adafruit Industries LLC"\
--product "Metro M4 Express"\
--vid 0x239A\
--pid 0x8021\
--output_c_file build-metro_m4_express/autogen_usb_descriptor.c\
--output_h_file build-metro_m4_express/genhdr/autogen_usb_descriptor.h
Generating build-metro_m4_express/genhdr/mpversion.h
GEN build-metro_m4_express/genhdr/qstr.i.last
QSTR updated
GEN build-metro_m4_express/genhdr/qstrdefs.generated.h
../../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;
^
common-hal/usb_hid/__init__.c:127:16: note: 'common_hal_usb_hid_devices' was previously declared here
mp_obj_tuple_t common_hal_usb_hid_devices = {
^
276476 bytes free in flash out of 499712 bytes ( 488.0 kb ).
49104 bytes free in ram for stack out of 196608 bytes ( 192.0 kb ).
Create build-metro_m4_express/firmware.bin
Create build-metro_m4_express/firmware.uf2
../../tools/uf2/utils/uf2conv.py -b 0x4000 -c -o build-metro_m4_express/firmware.uf2 build-metro_m4_express/firmware.bin
Converting to uf2, output size: 446976, start address: 0x4000
Wrote 446976 bytes to build-metro_m4_express/firmware.uf2.
not entirely sure
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
install -d metro_m4_express/genhdr
python3 tools/gen_usb_descriptor.py \
--manufacturer "Adafruit Industries LLC"\
--product "Metro M0 Express"\
--vid 0x239A\
--pid 0x8014\
--output_c_file metro_m4_express/autogen_usb_descriptor.c\
--output_h_file metro_m4_express/genhdr/autogen_usb_descriptor.h
Generating metro_m4_express/genhdr/mpversion.h
GEN metro_m4_express/genhdr/qstr.i.last
QSTR updated
GEN metro_m4_express/genhdr/qstrdefs.generated.h
../../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;
^
common-hal/usb_hid/__init__.c:127:16: note: 'common_hal_usb_hid_devices' was previously declared here
mp_obj_tuple_t common_hal_usb_hid_devices = {
^
25168 bytes free in flash out of 253696 bytes ( 247.75 kb ).
4068 bytes free in ram for stack out of 32768 bytes ( 32.0 kb ).
Create metro_m4_express/firmware.bin
Create metro_m4_express/firmware.uf2
../../tools/uf2/utils/uf2conv.py -b 0x2000 -c -o metro_m4_express/firmware.uf2 metro_m4_express/firmware.bin
Converting to uf2, output size: 457216, start address: 0x2000
Wrote 457216 bytes to metro_m4_express/firmware.uf2.
@solar whale even the first part is different for example
--output_h_file build-metro_m4_express/genhdr/autogen_usb_descriptor.h```
is different
I "think" it identifies the board configuration. -- may be mistaken.
if you type git diff master do you get any output
no output
the python3 command is generating the usb descriptor
i think we are getting somewhere byt i don;r know where
do you see a folder name metro_m4_express as well as a build_metro_m4_express?
in atmel-samd? no
good
just metro_m4_express
oh - I have build_metro_m4_express -- that is odd
ahhh --- igot it
use make BOARD=metro_m4_express not BUILD
the defaiultfor BOARD is metro_mo_express -- see Makefile
ok, that has to be it
why is there a default?
thank s thanks.
@stuck elbow good question
@fading solstice the build will go in build_metro_m4_express
you can (and were) renaming that via the BUILD parameter
@stuck elbow was taht just a typo you are fixing in the MCP230xx -- looks good to me - do you want me to reviewi it
I can't test it
@stuck elbow never-mind - it's done!
@fading solstice is it working OK now?
@solar whale you are the best. i was blind and you have allowed to see. it works!
Excellent! I was really puzzled -- I was going to suggest standing on your left foot next ๐
i might suggest a change to the makefile that requires a BOARD
seems reasonable -- with so many boards, it's not clear a default is helpful
@fading solstice PR's gratefully accepted
Hmm, strange, I just tested with master and I was able to mount without any errors. You said 3.x still works, so I guess it's not your sdcard or the board you use for it.
I think the error comes from here https://github.com/adafruit/circuitpython/blob/master/shared-module/storage/__init__.c#L39 which would mean that the vfs = ... call fails and return None, could you verify by printing vfs before you call mount?
@tulip sleet @slender iron interesting question:
https://forums.adafruit.com/viewtopic.php?f=57&t=137582
what is on the non-express feather M0's? SAM-BA?
@hathach Hmm, I thought this bootloader was meant to work like the CPX where you normally get a MSC for dropping .py files and then when you reset with double press/similar you get uf2 drive, but I flashed the bootloader and I always get the uf2 drive, I even tried to put P0.11 and P0.12 low/high to simulate buttons not being pressed. Am I doing something wrong or is this not implemented yet?
@tidal kiln I think it may just work fine, since uf2 bootloaders work on trinket and gemma. only issue is if the pin mappings are different on Feather M0 Basic vs Feather M0 Express. I'll look.
@tulip sleet replied
@tidal kiln pin mappings are almost the same. no NeoPixel on Feather basic, so that wouldn't work and the USB PID would be wrong, but not a big deal to change.
we're putting in some feather m4's today!
i know nobody here wants em
just throws all the feather m4's in the trash
scatters them to the wind
j/k! lots for everyone!
they are being QA'd now ๐
Time to spend some $$!
... and just in time. I'm giving a CPy talk at our local makerspace tonight. They'll be excited to hear that it's real!
just got my odroid-go ๐
Had a late-night idea a few days ago for a CPy-based musical instrument. They just published the learning guide for it today. Woo hoo! https://learn.adafruit.com/blues-playground
๐ฅ ๐ต
@errant grail nice work, this was a cool guide!
Thanks! I had a lot of fun making it and playing it!
@errant grail Amazing. Nice guide.
@slender iron Do you want to look over the new driver? The changes I thought needed to be made are in there, it's set to go in my opinion. There's a PR in for it. You don't have to look at it if you're busy, I'll take care of it, but I wanted to offer. https://github.com/adafruit/Adafruit_CircuitPython_MLX90614/pull/6
@idle owl I'll take a peek
I've been looking forward to a Feather M4. I managed to snatch an ItsyBitsy M4 before they were all gone again (I'm aiming to build a CRT art project out of it, using the 2 DACs for X and Y signals). I can't help wondering if there will be a Trinket M4, or is that just silly.
@main meteor seen this?
https://learn.adafruit.com/circuit-playground-express-dac-hacks/composite-video
Oooo, I hadn't! That's cool! I wonder what the mighty M4 can do with that. I should grab some clip leads and play with it (I don't have the ItsyBitsy M4 in my hot little hand yet, but I have a Metro M4).
we've got some more itsy m4s in stock
trinket m4 is a bit unlikely for now since the chip is bga
and i think itsy does a good job
of 'small powerul'
in stock now https://www.adafruit.com/product/3857
@ruby lake ping pong
we'll get more in stock shortly but this is the first bath
ch
I used the trinket on quite a few projects where the number of GPIO pins was perfect. Kept things really small. Designed some Trinket-compatible doublers and other PCB interfaces based on the form/factor/pinout. Sad to hear that it may not make it to the next generation, but I'm slowly overcoming that and moving on... ๐
well ya never know - its just not a high priority is all ๐
I just realized the AdaFruit Discord icons don't include a feather!
... the Trinket-compatible Rover family:
Trinket OCD
@meager fog Just ordered a couple ๐
@ruby lake i should have labeled the D+ D- pads "FOR OLDCROW USAGE ONLY" ๐
"crow's feathers"
but i think this design should satisfy your synthneeds - we put as many i2s pins as we could fit ๐
@river quest we need a feather emoji
we have a feather logo
Oh yeah, the drifting feather.
I will work out the next board for it, will be a bit wider
@stuck elbow Very cool. With a pressure sensor?
I'm thinking about an array of these for a MIDI harmonica: https://www.digikey.com/products/en?keywords=z3639-nd
Pressure Sensor ยฑ7.25 PSI (ยฑ50 kPa) Compound Male - 0.1
... with a touch pad array for note bends.
Your ocarina project sounds interesting. I'll be watching for details...
I was thinking about BMP280
in fact, I should probably start designing the PCB if I want it to arrive next month
do we have usb midi support for circuitpython?
That sensor should work nicely. The harmonica design needs 10 independent sensors, though.
we're making more feather m4s - sign up if you missed out
I've played around with MIDI on CPy a lot. There's nothing native, but CPy is pretty capable. The versions on M4 will be fantastic.
How long did it take, I was 15 minutes after the email and already gone
bummer. I put two in my cart when they were available, was adding other items and the M4s were dropped.
n000
I'll be patient.
That happened to me yesterday with the Metro M4
gotta move fast
High demand is a good thing.
Get your enamal pins fast, too.
(And the arcade feather ๐ )
@errant grail I was thinking about just doing pwm, or maybe a bit nicer DAC output, but with midi, I could actually skip the speaker and make it a usb midi device
saves me a pin
I see a ping from ladyada and I don't even look here, I just go see if they are in stock on the site ๐
lollll
@stuck elbow You can get some nicely natural sounds out of dedicated MIDI voice modules or add-ins that include the ability to respond to expression as well.
thaz rite!
@errant grail but I have no idea about midi, so unless there is something ready, I think I will go for the built-in speaker
That's simpler and more portable, too.
n-voice key assigner in cp runs on the m0, m4 will be quick
yeah, with a coin cell
@arturo182 ah, yes, nice catch, the bootloader address is written to ucir for its detection.
Ah yes, the bootloader only expose uf2 drive, you need to flash the circuitpython afterwards, by copy uf2 created by uf2 target
https://github.com/adafruit/circuitpython/blob/nrf52840_usbboot/ports/nrf/Makefile#L314
After complete, bootloader will reset and circuitpython will run, you should see REPL via jlink cdc (since native usb cdc is still work in progress). To display msc while in cir...
@stuck elbow Have you consider using the wind noise from a microphone? Do you need variable pressure sensing for volume or expression?
Indeed.
to be honest I have no idea how it will all work in the end
it's an experiment
if I wanted something working, I would go and buy https://www.tindie.com/products/yoe/twi-a-teensy-based-usb-midi-woodwind-controller/?pt=ac_prod_search
I actually even have that sensor in my drawer
Haven't played with a breath controller (yet). @ruby lake have you?
Thing to do next would be
- usb cdc to replace uart in circuitpython
- usb msc for storing py files in circuitpython
Though, I am still doing a bit more testing with bootloader in OTA and DFU Serial mode to make sure it is reliable enough.
@meager fog my only remaining experiment will be how to do time division multiplex without a direct hook into a hardware timer. I might be able to use time.monotonic to do a polled loop test, if I can get it to 1ms or better, we win
@errant grail I have, I have yamaha breath controllers from the olden days
they are not EWI, but rather the mouthpiece used with various Yamaha digital synthesizers
@slender iron Great catches, thanks for looking at the driver.
I have never tried any electronic woodwind instruments
I can't even imagine how it feels like
@idle owl np
but I would very much like a woodwind instrument that I can practice with headphones, because my gf hates me when I practice
@ruby lake what do you need to do?
@slender iron Ideally, I'd like to start a timer and bind it to a callback that sets my channel output states. That is not a cp thing, at least not yet, so I will have to try grabbing a time.monotonic value and waiting for a certain interval of ticks before running through an iteration of the output channel update.
It should work fine, it is just that I have to be better than 1ms of total time taken or I risk missing a midi byte
can you explain what you want to happen without saying how?
I don't know what the output channel is supposed to do
ok, say you have 2 lists, the input list and the output list
every interval (say 500 microseconds for now) a bit of code pulls an item from the input list and moves it to the output list.
the input list is populated based on how the midi keys are assigned. The output list is always written in a linear order. The lists have a certain number of entries (voices), say 8.
hrm
The time matters because the output hardware is a series of sample/hold circuits and their output voltages can droop if left unrefreshed for too long
feather-> dual -> mux -> S/Hs
what protocol is the output? midi (aka uart)?
er dac not dual
analog voltages. Multiplexed from a single dac channel into eight channels
I will experiment
k, sounds like something we could do in C land but still uncertain exactly what it is
well, when I get to my home office I will link my C version
k, perfect
@ruby lake o/ I sent you an email earlier today... ๐ Thanks for submitting something.
@plucky flint yep, got it. Will write a proper response when I get to the home office
Ah I see, so it's the CP app that creates and exposes the MSC for the py files, not the bootloader, good to know. As for the USB stack, couldn't we use the one that ships with the nRF SDK? I have used it before to do composite HID and CDC in another project, it's pretty nice to use. Otherwise, couldn't we create an abstraction layer so that both nrf and atsamd ports could use the same stack? That would make it easier to add new ports in the future and would remove duplicated code. I also work...
CircuitPython upgrade question: I am currently running CP 2.3.1 on my Feathers and I am looking at testing the version 3 of CP. Do I need to upgrade the uf2/bin files on the individual boards or just the folders/files in the lib folder, or everything? Thanks.
@ruby lake +1
@rigid path Everything. You'll need to install a new uf2 for each board, and you'll need the 3.x version of the library files you're using in your /lib folder.
@plucky flint Hey!
Pretty good! How about you?
I'm finishing up a guide to using Git and GitHub to contribute to CircuitPython or any open source project. It's massive. I'm super excited about it.
Fixed in github adafruit/asf4. Should be fix in circuitpython soon.
Busy: getting Mu 1.0 ready (beta.17 next week), also some behind the scenes work on CodeGrades which you'll hear about very soon. ๐
Excellent!
Oooh... that's a really useful resource. Using GitHub can be v.intimidating.
Happy to proof read / test etc... if you need extra eyes... just assign me on GH (@plucky flint)
It came out of us adding Travis to the Learn guide code repo, and forcing people to do PRs instead of pushing directly, but we get this question a lot "what's a good workflow?" And we usually say "whatever works best for you... here's a few ideas" which isn't all that helpful.
That would be great, but none of it's on GitHub. It's all in the Learn system. I can email you a preview link though.
oooh yes please!
I know millions (* may be a slight exaggeration) of teachers in the UK who'd find a guide like yours really useful.
Happy to help! ๐
Sent. With caveats included ๐
For usb stack, currently we are using my own usb stack called tinyusb in the bootloader, it got both cdc + msc working already as we see.
https://github.com/hathach/tinyusb
It is not perfect, but work with other chip such as lpc families from NXP as well ( though some update code is needed).
My issue is with the circuitpython rather than usb stack. It is a bit comprehensive for my brain, and hard to debug ( I will try to create an segger studio to deal with it later on). Yeah, I did the i...
gotit!
Did the link work? I feel like they don't always work
Oh you know what, hold on. I don't think it will work yet
@idle owl also would like to review it, if you want a reviewer that is
Ok refresh
@fading solstice That would be amazing. It's a huge guide. I haven't read back through it myself yet, I'm about to start. If you have the time, I'd love to have you review it. https://learn.adafruit.com/git-and-github-workflow/overview?preview_token=w7AAAYjAwqDDoemj6gGAoA
That worked! ๐ Thanks...
@slender iron do I need to do anything else to get my FTC fix included in next build of circuitpython 3.0
@tulip sleet my servos don't like 550 -2400 heard snap on a sg-5010 and it does a funny travel at the extreme -- the sg92r vibrates at 2400 seems to work. still testing
@fading solstice the submodule commit reference needs to be updated
in your circuitpython copy you can change into the directory and git pull
then back out and you should see a diff you can commit and PR
@idle owl Thanks for the info.
@tulip sleet its the 2400 that is problematic
what's a safer value?
@meager fog @solar whale testing servo limits here
do you have more than one sample of each servo?
I have 2 of each
I'll try them later. I did try the extremes manually in the REPL and they seemed to be slightly under the extremes of travel (I tried 500 and 2450, which went a little further), but that was mine. Tried mostly micro servo
I need to take some time to set this up for systematic testing... but 600 - 2400 caused bad behavior and heating of the sg-5010 -- the sg52 just made some noise - so far.
I think the microservos are more forgiving
are those analog or digital?
in analog servos, the frequency of the pwm signal determines the power (and thus heating)
they are just the regular servos from the adafruit store. we're using 50hz.
so if you feed more than the standard 50Hz, you can overheat them
(I actually use that to power them with lower voltage than they are made for)
I think @solar whale is seeing overheating at the extremes of travel, when the pulse width is too short or too long and they hit the stop. Does that make sense?
ah, yes, they really are not made to go beyond 90ยฐ travel normally
so around 1000-2000
they have large margins, but they are inconsitent
you have to tune them per servo
still not making +/- 90
no, +/-45ยฐ
trying for full 180 degree swing
90ยฐ total
ah - they do that at 1000-2000
1000-2000 was the original default, but that is a lot less than 180deg, more like 140. The Tower Pro ones seem more like 550 or 600 to 2300 or 2400 now. Limor said to change the defaults to 550-2400. They seem poorly spec'd: the datasheet (such as it is) doesn't say
@tulip sleet it really varies per individual servo
I wonder if the limits should stay safe at 1000 - 2000 and let the user play beyond if they want to.
There is enough clock instability in the M0 that the actual output value can be significantly different
I added a calibration example that allows you to compensate for it
The motor library assumed 1000-2000 would get you 180 degrees of rotation, but you're saying we should set that to 90 instead
hmm... I should look at the arduino libraries too
@slender iron I fixed OneWire by adding some delay routines that do not use tick_delay(). They are just busy-wait NOP loops. The OneWire read/write routines turn off all interrupts, and then call common_hal_mcu_delay_us(). But that's a bad idea, I believe, because then the SysTick handler doesn't get called. If tick_delay() is called for a delay that will cross a SysTick reset, the timing is thrown off. Couple of ideas:
- Add and call these busy-wait loops (they are calibrated based on M0 48MHz and M4 120 MHz, with cache on) instead.
- Make some interrupt enable/disable routines that don't disable SysTick interrupt. RIght now it is prio 1, same as USB. I did make it prio 0, to see if USB was messing things up. we could disable interrupts below prio 0 for critical sections that need to call delay routines.
I wonder if this is causing other timing issues, like notro's clock drift issues.
2 sounds better to me
yeah. I like it better also. Time must march on no matter what.
I did check calibration of tick_delay() for small us values, checking systick values before and after calling it (compensating for systick reset if necessary). It is actually quite good. 6us does really seem to be 6us most of the time. Occasionally 6, 10,15, or 100us was 1us more. Checked on both M0 and M4
@solar whale @stuck elbow Interesting reading re servos: http://forum.arduino.cc/index.php?topic=48773.msg348806#msg348806
I wan to update every thing to latest crikit build - I'm a few days old... occasionally getting an I/0 error (#5)
and following posts
also need to retest SD card on nrf52...
try this. my PR is not merged. I buitl this test one for Mike B
it has the 550-2400 default range and everything else is very new
in later post: http://forum.arduino.cc/index.php?topic=48773.msg348809#msg348809 : "Keep in mind that R/C servos were developed for the model industry. They typically use adjustable mechanical linkages from the servo horns (or wheels) to the thing they are actuating, here is a link explaining: http://www.powertorque.co.za/epf/pdf/servoset.pdf . That way they can adapt the servo a given servo rotation to the range of mechanical motion they need. There was never a need for all servos to move the exact same number of degrees per usec. "
is the limit the only change from master for the cpx-crikit build?
master has new nrf-related code
feather m4s are back in stock!
allowing '/' mounted on '/' is the last change to 3.x
right -- got all that - I was just wondering what was differnt in your build
@tulip sleet yeah, I know those, the thing is, even individual servos will have different ranges -- I suspect that's because of variations of components used
if R/C timing circuits, then component variation would account for a lot. I don't even know what' inside: I haven't seen a schematic for the insides. I thought there are some active components
@tulip sleet there is a generator of the base frequency, changed with the pot, and a comparator with the input, and the difference drives the motor
Doing some self-education. http://www.aishack.in/tutorials/servo-motors/ and https://www.voti.nl/docs/M51660L.pdf
was NE544 before M51660
that's why giving higher frequency signal gives more power
thanks for all this explanation - it's almost folkloric. people just use them without really knowing
yeah
to be honest, I have never seen a schematic myself, and even if I saw one now, I wouldn't understand it
of course digital servos just have a microcontroller in them
usually a PIC
but I am thinking that there were servos way before IC's, so there was a simpler analog circuit. There were RC airplanes way before IC's.
hmm ```
Adafruit CircuitPython 3.0.0-rc.0-27-g91427b0 on 2018-06-28; Bluefruit nRF52 Feather with NRF52832
import adafruit_sdcard
import busio
import digitalio
import board
import storage
import sys
spi = busio.SPI(board.SCK, board.MOSI, board.MISO)
cs = digitalio.DigitalInOut(board.D27)
sdcard = adafruit_sdcard.SDCard(spi, cs)
vfs = storage.VfsFat(sdcard)
vfs
<VfsFat>
storage.mount(vfs, "/sd")
Traceback (most recent c...
>>> dir(vfs)
['mkfs', 'open', 'ilistdir', 'mkdir', 'rmdir', 'chdir', 'getcwd', 'remove', 'rename', 'stat', 'statvfs', 'mount', 'umount', 'label']
>>>
Hmm, I'll try also on the feather52832, the previous try was on a pca10056, maybe it makes a difference.
@slender iron Any suggestions who I should also add to review to offload you from the mountain of my PRs? ๐
alao I am using SOFDEV 5.0.0 SD s132 in case it matters
@indigo wedge I mean to look today. just got distracted
I am supposed to be doing nRF stuff as well but am finishing up some other stuff.
so i haven't gotten very far in the self-education needed
No, of course you have every right to get distracted, I just don't want to put too many patches on just you.
I can take a look now. ladyada has wandered off ๐
I tried to make the PRs smaller this time around so they are easier to review one by one
np, I'm not the most thorough reviewer. we can always fix bugs after @solar whale finds them ๐
๐
@slender iron I'll be happy to do tome testing of the Blnka stuff on Raspberry pi. any caveats or special docs I should look for?
@solar whale @meager fog would know better than I. I'm just packaging it
ah -- I just saw a lot of stuff going into it. looks intriguing!
I actually do wonder a but about Adafruit's process, at work we have a Jenkins slave that has real HW connected to it so we run tests for each PR. Don't think this can be done with Travis. So I what I'm wondering is, for example with the coming 3.0 release, what is the testing process, someone sits with all the boards and runs python scripts with different modules, or is there some automated process, or no process? ๐
@tulip sleet found the website of Rue who did teardown of some servos: http://ruemohr.org/~ircjunk/tutorials/elex/hobbyservo/servo101.html
@solar whale Yup! She wants to get rpi crickit going
cool!
but that looks like the same block diagrams :/
@indigo wedge I've spent time on Rosie which gets webhooks from Travis and runs basic stuff on the boards
but its super flaky
we mostly rely on our testing and our community's testing
move fast and break things
and then fix them ๐
@smoky swallow https://github.com/adafruit/rosie-ci
ah you mean https://github.com/adafruit/rosie-ci ? I can have a look, I did a lot of work on the Jenkins config at work ๐
thanks Dan
@indigo wedge yup thats it. not related to jenkins at all though. it only knows how to load code through uf2 atm
yeah, I'm just using Jenkins as a example of CI system, anything that can execute scripts and take commands remotely would do
@indigo wedge Does your build have all the new stuff - being merged in now in it -- could that impact SDCard. I can retry after the dust settles.
No, I tested on what was master as I wrote the comment, which I think was same commit as you used.
oh well
@tulip sleet ok, looks like pre-IC the servos just looked at the energy of the PWM signal, not at the pulse width
But I'll test on the feather52832 tomorrow, closing shop for today ๐
No rush - thanks and good night!
@slender iron ๐ Do you know how fast you've been merging, sir?
๐
Scott's a merging ninja
@indigo wedge is that a Heisenberg joke?
The config struct is interesting. Its very ASF3 style. They moved away from it because it encodes a bunch of data that's usually the default state of the peripheral once its software reset.
How does this impact code size?
Nope, just a police pull over joke
right and he answers "no, but I know where I am"
gave you a comment on the latest ๐
@fading solstice Unless you're actively going through the guide, I'm going to submit it. If you're looking at it, I'll wait for your review.
Actually, I don't think it's that much of an overhead, as the config structs are not that large, they only have the fields that are really needed and I'm not sure if we can trust the peripherals to always be in a known state, so probably best to init the bare minimum always. The benfit of using the drivers instead of the hal is that (in addition to being easier to use), they also have fixes/workarounds for known silicon bugs and and general error handling that we don't have to think about.
Oh no I realized I wrote a "Well, actually" response ๐คฆ
heh
I think we will have to come back to the BLE API discussion again, but not today, have a nice TIME_OF_DAY everyone!
thanks @indigo wedge !
later @indigo wedge!
@tulip sleet is there a new release for the seesaw on the crikit that I should load? I'm still getting I/O errors.
You should measure it. :-)
I looked at the data sheet and there isn't a reset register like the SAMD peripherals have. So it makes sense to set everything.
In general I like this library and using it. I'm just giving you a heads up about our similar experiences with ASF3. Error checking is good but can add overhead if we know a given state but the compiler doesn't recognize. We have plenty of space now so starting with this is fine.
@solar whale no new seesaw release. how are you producing io errors?
I never have seen any
moving the servo --
intermittent or you have a consistent example?
the green light on the CRICKIT goes out and I get an Error 5
what kind of 5v power are you supplying to crickit
so maybe you are drawing too much power with your testing and activating the electronic fuse
@idle owl no reviewing at this time.
@fading solstice Ok np.
or otherwise causign the power to sag and crickit board to reset
even happend at 1000 - 2000 limits
so you are just running the servo for minutes at 1000-2000?
I can switch to batteries.
many servos or just one
only if you were hitting the limits maybe
I'll keep trying an put in an issue if I can make it reproducible. with 1000 2000 I would not have expected it. I also have a 4A supply - not sure I want to give it too much!
yes, make an issue, but in https://github.com/adafruit/seesaw, maybe. Dean made some kind of PWM fix a few days ago, not sure what it's about
ok -- I'll poke at it a bit more first. Thanks
oh yeah - there was a new release 3 days ago. I'll check the commit
The analog out page says "Express boards like the Circuit Playground Express, Metro M0 Express, ItsyBitsy M0 Express, Metro 4 Express, or Feather M0 Express have more code space and can perform audio playback capabilities via the DAC. Gemma M0 and Trinket M0 cannot!" I know the Gemma and Trinket use the E18 version of the chip and the Metro uses the G18, but I thought that was a package difference, not RAM. Then again, the Metro also has the SPI flash chip, maybe that's the reason?
@main meteor it's the flash chip. we don't have room on the small boards for the code, because the 256kB of internal flash on those boards is also used for CIRCUITPY (a 64kB filesystem). On the express boards, we can use the entire 256kB of flash for code.
only 192kB for code on the non-Express boards
I'm still intrigued by the SAMD51's built-in microSD card support. There's room on the Metro for a microSD socket. That would give Circuitpython a ton of room!
I'd be tempted to make my own board and try it (and write the microSD support for Circuitpython), but I'm not set up to solder BGA chips!
we don't use BGA chips ourselves
Whoops, when I asked about an M4 Trinket, LadyAda said it would be tricky because it's BGA.
you can just use regular SPI to talk to the uSD card
that's what we do now
because only BGA will fit on the narrow width of the trinket. no 32-pin SAMD51
Ah, that's the thinking! I had it, um, not backwards, but sort of sideways. Now I understand!
np, yeah we don't do BGA for anything because it's tricky to manufacture and get good yields
I was integrating a resource-hungry peripheral and an ordinary ATmega328 wasn't even close to managing it. The SAMD51 didn't even break a sweat.
@tulip sleet I think I am losing it -- whne I command the servo on pin 17 - I am movin servo 4 -- pin 14 povew servo 1 - isn't that backwards?
I wondered about that: BGA requires a lot of process support, and while I know there's a bunch of very cool gear in use at AdaFruit, I didn't know if BGA was practical there yet.
i'm not sure of the manufacturing issues, but also rework is hard. We have a high yield, though, right now
@solar whale that's the numbering I have in the Crickit library. They were numbered in reverse for a while. Are you looking at a guide?
ah - yes
SERVO1 14, SERVO2 15 ,etc
so SERVO1 corresponds to Servo 1 on the board?
guide says OK that was fun but you want MORE servos right? You can control up to four! The servos are on the seesaw pins 17, 16, 15, 14 in that order after demo using 17 for servo 1
so what worked for you? is 17 terminals 4 or 1 for you
now it is terminals 4 -- was 1 before.
so the guide is wrong, right?
is SERVO1 defined somewhare?
from adafruit_crickit.crickit import crickit
from adafruit_crickit.terminals import *
servo1 = crickit.servo(SERVO1)
servo1.angle = 30
that's how the new library works
ah - I am using Seesaw
the library hides all that boilerplate. It is doing the same thing, but hiding the I2C and seesaw devices (though you need seesaw if you are using the digital I/O pins)
crickit.seesaw is the seesaw object
yes, the library is brand new and not in the guide yet
right but teh guide does not use crikit version --- that clarifies things!
thanks!
ok - I'll clean things up before generating any issues....hard to keep up!
hardly anyone has used the library yet - Mike B added as an alternative example in one guide so far
I also need to check my path to make sure which version of the libs is getting used but on this system I deleted seesaw from the /lib folder
on CPX's I usually remove all the libs that are "built-in"
to avoid confusion
@solar whale when you said the servo pin mapping reversed, do you mean you were using 17 for SERVO1 (as labeled on the board) before my new CPy .uf2?
yes
but not today, ok
Am I not the only one confused? was there a consious effort to revers the ordering?
i am really confused. I just tried with the seesaw library (not my library) and 17 is servo4, so how did that work for you before, with 17 as servo1
can we get in voice chat for a minute
just listening for possible future support
more feather m4s in the coming days
we sold out fast!
oh wait we ahve 22 left
GET EM WHILE WE GOT EM
๐
omg featherzz
@solar whale ok, turns it that the seesaw library really does do pin mapping, in an obscure way. I am fixing it: 17,16,15,14 is correct. I accidentally changed the mapping and "fixed" it. WIll change it back.
sad we lost Harlan Ellison today. I have a vivid memory of him guest lecturing in my spring 1985 university English course
@tulip sleet are you sure it should be changed back. 14-17 makes a lot of sense. It does not matter to me.
@solar whale the correct numbering is 17-14. I made an accidental change in the seesaw library which made me think it was reversed, so I reversed it in the crickit library as well. Just went over this with Limor
I'll have a new .uf2 for you in a few minutes after I test it
@solar whale
Adafruit CircuitPython 3.0.0-rc.0-7-g6908eed7e-dirty on 2018-06-28; Adafruit CircuitPlayground Express with Crickit libraries with samd21g18
>>> from adafruit_crickit.crickit import crickit
>>> from adafruit_crickit.terminals import *
>>> SERVO1
17
>>> servo1 = crickit.servo(SERVO1)
>>> servo1.angle = 70
>>> servo1.angle = 0
>>> # works!
@slender iron disabling interrupts below a certain prio level is implemented only on M4, not M0+ ๐ , so looks like I need busy-wait loops at least for M0. Also since no true open-drain outputs, can't use pulseio for OneWire.
how did it work before?
because in 2.3.1 i think the common_hal_mcu_delay_us() impl didn't use systick interrupts, so it busy-waited itself and was not subject to interruption. Disabling interrupts and then doing a delay is not done anywhere except in onewire.
ah, because it uses asf?
no, it's the tick_delay impl; just checking that
common_hal_mcu_delay_us() eventually calls delay_cycles(), which actually just uses SysTick as if no one else is using it (which I think is true on 2.x?)
did you start using SysTick for timekeeping in 3.0?
no, I see we had systick interrupts even in 2.x. But delay_cycles just overrode that and used systick for its own devious purposes.
it would just load it and count down (the delay was broken up into 10us chunks)
i know the busy-wait loops work - i tested that already, so i'll go back to that
main issue is that calibration assumed a fixed cpu freq, I can probably calculate that anyway without losing too much time. tick_delay does such a calculation and it still has ok accuracy even for small times like 6us
@tulip sleet Sorry, I'm not going to be able to do any more servo testing tonight. I'll set up some systematic testing tomorrow to check the range and see if the I/O errors are reproducible. Thanks for the help today.
Thanks!! np, we can always revise the ranges. I really appreciate your looking at this more thoroughly than I did.
@tulip sleet yup, systick switch was with 3.x
how did time.monotonic keep time in 2.x?
ok, I see you were using TC5. So you gained a timer by using systick.
and saved a timer peripheral
Hi everyone, can an itsybitsy M4 Express with CircuitPython drive a servo and sound fx board and neopixels or leds?
OneWire didn't work at all, just sending one long pulse. common_hal_digitalio_digitalinout_switch_to_input() was buggy, actually failing to change the port direction. Fixed, and cleaned up DigitalInOut.c a bit, using hri_ calls to save a bit of time in certain cases, and avoiding some redundant operations.
After that fix, OneWire was sort of working, but acting erratically, sometimes getting a CRC error. This problem was not present in 2.x. OneWire does bit-banging with precise time ...
@tulip sleet you mentioned doing a cpu frequency calculation. would it be better to store that in board details, or compute something akin to the linux bogomips at cpy startup?
I don't actually calculate the frequency. I just call common_hal_mcu_processor_get_frequency(), which right now returns a constant (it could look it up in the clock details, but not really necessary now).
ah okay, using an abstraction like that is ideal anyhow ๐
i missed some context by not looking at code
once my next order arrives i'll have 3 m4 boards ๐
more to test with ๐
what does this mean?
File "main.py", line 22, in <module>
File "adafruit_hid/keyboard.py", line 74, in __init__
File "adafruit_hid/keyboard.py", line 123, in release_all
OSError: USB Busy
line 22 in main.py just does this:
kbd = Keyboard()
and i wasnt having this issue yesterday
i unplugged it and plugged it back in and idk if this is better or worse:
File "main.py", line 35, in <module>
File "adafruit_hid/keyboard.py", line 100, in press
File "adafruit_hid/keyboard.py", line 135, in _add_keycode_to_report
File "adafruit_hid/keycode.py", line 305, in modifier_bit
TypeError: unsupported types for __le__: 'int', 'list'
line 35 in main.py is:
kbd.press(Keycode.A)
whelp, its fixed now, idk how tho
i think im just running out of ram tbh
i need me a feather m4 express, but theyre already out of stock ๐ญ
my M0 has 32kb of ram and the M4 has 192kb!
i needs it
Nordic has a new dev kit coming in the form of a usb dongle, there is no jlink chip, the usb is connected to the nrf usb peripheral, so it's perfect for running CP with Adafruit bootloader:
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52%2Fdita%2Fnrf52%2Fdevelopment%2Fnrf52840_dongle%2Fintro.html&cp=2_0_4
Ah also on their website, https://www.nordicsemi.com/eng/Products/nRF52840-Dongle
Ultra Low Power Wireless Technology Solutions from Nordic Semiconductor
@scarlet fjord I was looking at your code
@scarlet fjord I think it will use less ram if you don't use so many global variables, but instead put the values in a list directly
so instead of doing a1 = 1 a2=2 a3=3 and as = [a1, a2, a3] simply do as = [1, 2, 3] if that makes sense
that would make a lot more sense yes o:
can i still do that if a1 = [1, 2, 3] and a2 = [1, 2, 3]?
like, is there a way to nest arrays inside arrays in that way?
like a = [1, [2, 3]]?
yeah, does that work..?
yes
cool ๐ฎ
I edited your code, but I didn't try it
oh wow, thanks!
ill give it a shot
wow, i see what you mean about too many variables ๐
you made it look so clean
it errors out though:
File "main.py", line 1, in <module>
File "mcpsetup.py", line 7, in <module>
File "adafruit_mcp230xx.py", line 266, in __init__
File "adafruit_bus_device/i2c_device.py", line 62, in __init__
AttributeError: 'tuple' object has no attribute 'try_lock'
you are passing a tuple instead of a i2c object
ah, there is an extra comma in mcpsetup.py
sorry, I added the commas with search-and-replace
three extra commas, in fact
ah i see them
ooh ooh there were a few more issues, but the compiler told me about them and i fixed them and guess what โ
it works ๐
awesome
thanks a bunch ๐
I'm glad I could be of assistance
#958
connected change in ASF4 to circuitpython master
@mental marsh it can. doing them all at once may take a little effort though.
@tidal kiln thanks
@mental marsh servos: https://learn.adafruit.com/circuitpython-essentials/circuitpython-servo
neopixels: https://learn.adafruit.com/circuitpython-essentials/circuitpython-neopixel
and you'd control the sound fx board using digital io: https://learn.adafruit.com/circuitpython-essentials/circuitpython-digital-in-out
Thank you so much!!
np. good luck. don't try to do it all at once. work up to it piece by piece.