#circuitpython-dev
1 messages · Page 293 of 1
@mubes Does that include the Teensy 4.0?
I'm trying out the ads1015 tonight but none of the examples from github seem to work. The module is incorrectly capitalized but once that's fixed I get an attribute error: module 'adafruit_ads1x15' has no attribute 'ads1015'. Can someone help me get these examples working?
Oh I was looking at the deprecated examples, never mind
How do I get continuous readings from the ads 1015? I've looked at the examples but I'm having trouble understanding how to get updated values from a pot without reading the current value every few seconds
@gaunt glade You can set up your main loop to be as fast as practical and read .value or .voltage often. There's not an interrupt facility for changes. There seem to be a couple of modes where the ALRT pin will trigger... maybe you could catch that like a gamepad button press (not an interrupt, but it would buffer until next check). It's in the datasheet but I don't see it explicitly in the library.
Reading . value ended up working out ty
Now I'm trying to run the neopixel_rpi_simpletest but I get an import error: no module named board. But I'm able to import board in the ads1015 programs so I'm confused. Is there something that I can do to fix this?
@gaunt glade you are using this simpletest code here? https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel_SPI/blob/master/examples/neopixel_spi_simpletest.py
No I'm using this one: https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel/blob/master/examples/neopixel_rpi_simpletest.py
Should I be using the spi approach instead?
No, sorry I misread your first message
I thought it said spi instead of rpi 😩 . Time for bed soon
My only thought would be to make sure you have installed / updated blinka. I don't have much experience with the pi and circuitpython though sorry.
very odd if import board works in other scripts but not that one.
@timber mango it should, but afaik noone has actively tested on that yet. I have a couple here if any issues are reported, but I wouldn't expect there to be any problems with core functions, uart, rs485, spi or i2c (famous last words!)
@mubes I would love to help test the Teensy 4.0 with CircuitPython. 😀😉
Go knock yourself out :-) your efforts would be appreciated. Knowing what doesn't work makes it easier for everyone because then we don't waste time on the stuff that is already good. I don't have that much time spare and @indigo wedge is already campaigning for 48 hour days and the abolition of sleeping.
Greetings, anyone know of useless box program written in circuitpython?
If not, it shouldn't be too tough to write one: it's a fairly simple program.
Returning to https://github.com/adafruit/circuitpython/issues/2667 - is that "just the way things are" if one is using displayio ? I'm wondering if it's problematic to introduce these long pauses between any python statements if that's how it's working? I put a comment in there about i2c code in python. I'd assume that the previous "background" tasks like GC introduced delays in the 1-10ms range? Hundreds of ms sounds trickier. Is there a way of slicing that up or letting the application programmer choose where it can happen?
@slender iron ^^ any comment on the above?
the LSM6DS makes some sense but since we wont be getting the WiFi working, we don't know that the ATECC/binascii makes sense to include, there's not a lot of space on these SAMD21 chips :)
the LSM6DS makes some sense but since we wont be getting the WiFi working, we don't know that the ATECC/binascii makes sense to include, there's not a lot of space on these SAMD21 chips :)
Hello @ladyada, not sure if it's the best way to do multiple firmware is the best, but it's the simplest I found.
ATECC is a cryptochip, it can be use for others things that securing WiFi, like.. a cryptokey :-)
OK - we don't have U2F support at this time
@idle owl @slender iron Sorry - I have to miss the meeting today -- group hug and nothing special to report.
@solar whale Thanks for letting us know. Hope all is well!
Thanks -- all well - just some last minute "life"
I have the Circuit Playground. Where can I find documentation for everything that i can use from 'cp' in 'from adafruit_circuitplayground import cp'? It's hard to find where everything is in one place that isnt a drawn-out tutorial
Thanks!
@fallen anvil I'm hoping to look into WFI this week.
@slender iron Would be very interested in this. I'm going to try to bring up a nrf52840 which is really only too useful to me if I can get it to be properly low power 🙂 I'm at the office so don't have too much time available but will try to help where/when I can
cool cool. ya, I'll be starting on the nrf
Just a reminder: the CircuitPython Weekly meeting is just under an hour away here on Discord in #circuitpython-dev and the voice channel. <@&356864093652516868>
Here is the notes doc. Please add your notes even if you'll be attending - it's super helpful! Thanks! https://docs.google.com/document/d/1Lw_aT4nXU4RpuuiQophR502XjFh7n-YcI9xUG6JFY_o/edit
@slender iron won't make the meeting but will look to see if I can bring the nrf up in my hotel room this evening 🙂
@slender iron I will be text only while in class until 2:20ish
I keep seeing references to uLab, just wondering what that was.
@meager fog considered a prop-maker update with i2s? it would work better with nrf feathers... (but is a pretty big compatibility break vs dac)
I keep seeing references to uLab, just wondering what that was.
@inland tusk A numpy lookalike for micropython: https://github.com/v923z/micropython-ulab
Could somebody give me a voice check??
@timber mango I would like to have that, too.
@lapis hemlock Thats great. I could use something like that
@lapis hemlock hop in the voice chat, there are already a couple of us here
@lapis hemlock Thats great. I could use something like that
@inland tusk Charles, I have to go off-sound for the next ten minutes.
@timber mango I would like to have that, too.
@lapis hemlock i'll be needing that too 😛
I can't hear you at the moment.
@lapis hemlock Ok that's cool
@slender iron It looks like the entire notes doc got tabbed over somehow.
Happily lurking today 🙂
lurking
lurking sporadically
lurking
My comment from discord:
Returning to [this issue]- is that "just the way things are" if one is using
displayio? I'm wondering if it's problematic to introduce these long pauses between any python statements if that's how it's working? I put a comment in there about i2c code in python. I'd assume that the previous "background" tasks like GC introduced delays in the 1-10ms range? Hundreds of ms sounds trickier. Is there a way of slicing that up or letting the application programmer c...
lurking. recursively
😁
lurking today
Just kurking
I am voice for the first time, using my tablet.
PyCon still on as of now:
https://pycon.blogspot.com/2020/03/march-2-update-on-covid-19.html
The coronavirus (also known as COVID-19) is a new virus that causes respiratory illness in people and can spread from person-to-person. Sin...
CircuitPython 5.0.0 Release Candidate 1!
https://blog.adafruit.com/2020/03/01/circuitpython-5-0-0-release-candidate-1-adafruit-circuitpython/
With the CircuitPython 5.0.0 Release Candidate there are also some new boards (116+ total) in circuitpython.org/downloads, including:
NANO 33 IoT.
CircuitBrains Basic.
CircuitBrains Deluxe.
Feather M7 1011.
SAMD51 Thing Plus.
Feather Bluefruit Sense Takes Flight, Launches with Full CircuitPython Compatibility:
https://www.hackster.io/news/adafruit-feather-bluefruit-sense-takes-flight-launches-with-full-circuitpython-compatibility-e1d5023512db
those green ones will be collectable, y'all
Command Line Heroes by Red Hat, hosted by Saron Yitbarek (Hardware coming up!)
https://www.redhat.com/en/command-line-heroes
CircuitPython powered big honkin button sampler by Thea Flowers:
https://twitter.com/theavalkyrie/status/1234317748496293888
IoT Design Week with Microchip's "Wizard of Make" Bob Martin and Adafruit. We'll be on 3pm to 4pm ET on Tuesday March 10th, 2020 (lots of CircuitPython):
https://events.microchip.com/website/7565/home/
https://youtu.be/fu37Uf-CXNE
Day 2 - Machine Learning and Artificial Intelligence – Afternoon with Guests from Adafruit
Register for IoT Design Week at www.microchip.com/IoT-Design-Week
Join us for a special afternoon session to talk about artificial intelligence with Adafruit.
Cloud
https://io.adaf...
Thank you Morgan Stanley Makerspace Program for your work with Women in Need (CircuitPython workshops and more):
https://blog.adafruit.com/2020/03/01/thank-you-morgan-stanley-makerspace-program-for-your-work-with-women-in-need-win-morganstanley-winnyc_org-msgivesback/
Discord Discover is a GO!
https://blog.adafruit.com/2020/02/29/adafruits-community-discord-server-is-now-in-server-discovery-join-16000-makers-adafruit-discordapp-discord/
All this and more in the DRAFT, thanks for the @s and # everyone!
https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2020-03-03-draft.md
almost time to retire the 4.x.x bug fixes milestone
i fixed the weirdo indentations in the notes
looks like blinka authors aren't included in the overall
Hmm. I'll look into that... 👀
thanks!
@tiny oriole your audio level is a tad low, bump it if you can
was there much noise or just quiet? (im on a weird boom mic thing)
just quiet
gotcha, thanks 🙂
txt only
@tiny oriole your audio level is a tad low, bump it if you can
@onyx hinge new mic :p
it's a tribble?
It's a hamster
tribbly
Normal status, can talk
I hear there's trouble with tribbles.
hehe
No problem, any time
@timber mango Are you lurking for status updates as well or will you have a status update? (Updating the notes)
You're safe as long as there's only one tribble.
I miss the Rockies. 🥺
Circuit python powered ho tub time machine in the works?
@kattni I am in for status updates. Cannot update doc.
@timber mango Got it. Not sure why you can't edit it though.
I am using my tablet.
This was just posted on YouTube by Hackaday: https://youtu.be/ycTFYb-9nhI
CircuitPython makes programming hardware easier than ever by bringing the popular Python language to modern, inexpensive 32-bit microcontrollers. This doesn’t need to be limited to modern hardware though. By pairing a modern microcontroller running CircuitPython and a vintage ...
@timber mango installing free google doc app will allow editing (prob not worth it at the moment)
(ah we're all saying it wrong, it's micro-lab 🙂 )
I wasn't saying it wrong 😄
Will do that later.
@onyx hinge Though I assumed I was the one who was saying it wrong. 🙂
Tesla coil...
@tiny oriole If you want to turn it into a CP lib, please let me know. We have a community bundle that you could add it to.
so the immediate idea i had was using a grill igniter and it turns out the SwitchDoc Labs AS3935 board is somehow smart enough to distinguish between a "Strike" and a "disturber" which seems to be its term for noise
I live in Kansas though, and we are approaching spring so... i figure soon enough i should have all the lightning i could want
(ah we're all saying it wrong, it's micro-lab 🙂 )
@onyx hinge Well, I am not certain at all... What the heck, I don't care! 😀
In this video, it was pronounced as microlab: https://www.youtube.com/watch?v=c0SMT1UY37M
Thanks to jepler's porting of ulab (numpy for micropython) we can now do FFT's in circuitpython really easily. Here's a demo of us piping mic data through to make a spectral waterfall. We love to test it out with our recorder, toot toot.
#circuitpython #adafruit #numpy
Visit...
Thank you, and thank you for the reading.
@idle owl I searched for it the other day, do you have a link ?
@slender iron Geekguy has a status update, yes.
kk
@cursive condor The community bundle?
yes
@cursive condor https://github.com/adafruit/CircuitPython_Community_Bundle
thank you very much
You're welcome!
There's a pronunciation difference between "microlab" and "micro-lab"?
'you lab'
@main meteor I was saying "ewe-lab"
or mu-lab
Ah, like the µDuino issue. Got it. 🙂
or "ooooh lab"
Not to be confused with moo-lab which is for dairy research...
or "ooooh lab"
@onyx hinge that doesn't sound good.
👻lab
That's much better.
ew-lab 🤢
@onyx hinge The slicing fix was actually awesome, thanks!
How does changing the wav file help?
Use NumPy directly?
I use glu-lab to fix my sink sometimes
@simple pulsar it's a looping sample. circuitpython pulls 512 samples at a time from a wave file, and the size of this particular wave file was 1 more than a multiple of 512. This meant that there wasn't enough time (1 sample-playing-time) for the first block to be read on repeat.
so we just corrected it to be an exact multiple of 512
Ah, I see, is that a workaround or a fix then?
@onyx hinge @slender iron we should move fft.spectrum to extra.spectrum, so that the core (everything except for extra)would be numpy-compatible.
That sounds like a lot of CLUEs to hand out
@simple pulsar tomato-tomato. I'd prefer that it work in any case but it was not super-trivial. It's a use case I'll keep in mind. (and this affects only wavefiles that loop, not rawsamples or non-looping samples)
@idle owl Do you have a link to the ESP8266 Feather issue?
mine should be arriving tomorrow i think
@crimson ferry Somewhere. It's simply that the schematic is a previous rev. And I need to update what's posted online. It's already been fixed on the hardware. I think it's on the forums that it came up. I can find that post for you if you're still interested.
@idle owl I have a bunch bought over a period of time... just wanting to know if it affects some. I can search the forums. Thx.
around but no voice - text only
@aidancuckoo do you have any additional details, link to more info, etc? You mention the Tomu (the ARM version) but this issue description is `Fomu' (the FPGA version)
If Fomu, this must be just regarding the hacker version, and not the production version that Adafruit sells, correct?
I'm certainly curious as to what @xobs has to say, as well.
@crimson ferry ah fair enough. I'll find you the link.
@crimson ferry https://forums.adafruit.com/viewtopic.php?f=57&t=16242 is what was sent to me. I haven't viewed it though.
Thank you!
You're welcome!
Does CLUE support C ++?
In the Arduino IDE, yes
Thanks.
Some examples in here https://github.com/adafruit/Adafruit_Arcada/tree/master/examples/full_board_tests - the ones with clue in the name
@idle owl That link was something else I think. Maybe this one: https://forums.adafruit.com/viewtopic.php?f=57&t=162422&p=799477
There use to be a zip file for Gemma M0 and Trinket M0 with updated example to new version.
@crimson ferry Hmm fair enough. Dan was involved, so that would indicate if it's the right one.
Long ago, I requested to be able to reset a Trinket M0 back to factory default (with demo).
stepping away for a moment
@onyx hinge you are not muted, btw.
And then, when a new version come, I would loved to have a new zip that match the new version.
But it is work to do that.
Tony had a new demo for the Circuit Playground Express. It was never fully release, but having something to "show off" is great.
As another anlge on this is there also an mpy compatibility issue there between major revisions of CP?
A rolling "starter pack" of sorts on circuitpython.org?
Question then is... are there examples that fail once CP & libraries are updated?
Those should be issued/PR'd
Maybe that relate to the ZIP with important library you would like to have on your board.
it's the example code that comes pre-loaded and it's also linked on the Downloads page.
@lone axle Got it, so when we recommend to update CP (and libraries), pull updated examples as well?
Sometime the demo code is Arduino, where it would be greater to have it CP. 😉
Oh, neat. Had no idea about that repo 🙂
@crimson ferry yep, once we have a link for it we would be able to recommend that. As of now I don't think the updated one exists yet, so it's kind of a "work through each issue one at a time" to get it back to working. Based on whatever APIs changed.
@half sedge Yes, most of mine have had compiled code on them, PyPortal is the most obvious one that came with CP
Trinket M0 and Gema M0 were native CP.
@lone axle If examples don't work with the libraries they are shipped with, then that points to needing more robust regression testing when merging PRs?
Maybe my topic can be skiped as I have no microphone...
@tulip sleet @slender iron did you want to talk about 5.0.0 schedule during in the weeds?
@crimson ferry sorry, the examples in the libraries do work fine. This is the example code that get shipped on the devices. Like if you buy a Metro M0 it will have a pre-loaded code.py file that demos a bunch of the functionality
dan did it, yay
Users update their version of CP and even many times they do get the libraries updated properly but the next issue is that there are API changes in some of the functionality so it might expect an extra paraemter, or get imported slightly differently now.
Blinka will only work with Raspberry Pi.
Even students at my college are using blinka for their senior capstones
So the code.py starts crashing, and at that point it's up to them / us helping them to get each issue resolved one at a time by updating the relevant lines to use the newer APIs
Ok. Talk 5.0.0
If we had a ready made current version we could point them to the new one and they could get it all at once along with new CP version and new libraries, then they wouldn't have to worry about fixing each thing individually (or just give up on the demo script or downgrade back to 3.x to get it back to working)
@lone axle Suspect there will always be some API breakage over time in user code. Best we can do probably is: ship self-consistent CP+lib+examples, and make sure Guides are showing consistent set of assets?
@crimson ferry In some guide, there was a link to a ZIP. The factory content, and then the updated content.
I think if an updated version of that demo script were linked on the Downloads page (same page where the original one is already linked) it would help out.
@crimson ferry @lone axle That repo we posted earlier can have the original example content and then updated versions that work currently. All can be linked from the Downloads page on the guide.
ive noticed this lag as well. ive seen the mag sensor get stuck once also
So maybe for 5.0.0 there is some review work needed on "old" board to see if original demo work and fix them if needed.
Dunno where is my Trinked, but my Gema is near me.
When I get home I will write something up about my robot and link to it.
Gotta drop off. 👋
@raven canopy later
I do too, later
I used a lot the previous alpha. But I am late on the RC.

😬
heh
For those refresh displayio delays I was surprised that rc0 was quicker than beta5...
There was an SPI speedup on the CLUE if I remember well.
And now there is a long term calendar somewhere.
4x speedup
We're still working on the calendar.
Vrooooooooooommm
@half sedge I tossed in a PR about a long term calendar, but it's up for discussion
Thanks y'all
Bye
thanks
thanks all 🙂
We don’t scare easily...
https://giphy.com/gifs/bchRqjm6Lc8p2
What's this about a calendar? Is this a CP roadmap?
We don’t scare easily...
https://giphy.com/gifs/bchRqjm6Lc8p2
@marble hornet looks like a job for Tim the Enchanter
It's interesting how many of your holiday are on Monday...
@half sedge if you're looking at that icalendar file, it only shows holidays that potentially displace meetings
Alright dropping off. Thanks all!
Faster refresh (272ms) with rc0 probably due to 4x speedup of SPI as mentioned on Discord.
Some photos as promised:
thanks @marble hornet
@half sedge we also like our long weekends 😉
👋
@lone axle Is there a place where you want to discuss the Patchwork? Issue? DM? Here?
@half sedge Thank you for looking into it 🙂 make an issue for now please. Won't be able to chat much more here until this evening.
I am on my way home from the hospital now!! 😁😁
@tulip sleet are you releasing now? we should update tomorrow's newsletter if so 🙂
i was soldering headers (just got UPS), but was going to get to it in a few minutes
kk
def put in the newsletter, and we'll remove it if some stumbling block arises
the lead story was rc.1 instead
🙂
@tulip sleet do you have draft 5.0.0 release notes? They should be relative to 4.1.2 ideally
@slender iron take a look at the draft. I merged the thanks list. We can't compare 4.1.2 directly in github. I didn't consolidate the change lists or new boards lists or like that. I looked at the 4.0.0 notes for guidance.

@slender iron ping me when you're back. I can merge the new boards lists now
@slender iron if you have the new boards list generated automatically, that's better than me pasting from each pre-release and sorting
is there a uf2 bootloader for stm32f405 feather yet?
@slender iron hunh, readthedocs has been failing all builds for a month. I reset the build env, but it didn't help. Also, we don't have a 5.x tag or branch, so I activate 5.0.x (which I think is more precise than 5.x anyway). Adding 5.x branch will just cause confusion, like it did for 4.x. People didn't know what to PR against.
@onyx hinge yes UF2 is ready, though you need to flash it since it's not included by default
Here's our fork https://github.com/adafruit/uf2-stm32f
Build with a flash offset by using UF2_BOOTLOADER: make BOARD=feather_stm32f405_express UF2_BOOTLOADER=1 relevant PR https://github.com/adafruit/circuitpython/pull/2568
@tulip sleet back
@slender iron let me know when you're done with the notes or if you want me to add something
I can get you the new board list. I have files.json loaded in python
then I'll tag and do the blog post and forum post
kk, going into the draft release notes
Hi All - we have our USB VID now and are ready to assign our first PID for a new board. It will be the first time we have contrived our own USB PIDs. Something of a milestone, I guess. 🙂
Adafruit clearly has a method to the assignment process, and I am curious if that is based on some general best practices or if it's born out of experience. Either way, I am open to guidance and your wisdom here. Thanks!
@ionic elk excellent! I went with a .bin build for simplicity and it's up and running
@onyx hinge I don't recommend it for anything other than the F405 and other Foundation boards, though. Since all the F4's have a dfu bootloader built in already, it's kind of a waste of flash, and is especially problematic on boards that use an internal filesystem.
what I like most about uf2 is the double click to enter bootloader. The jumper's a drag.
I read enough to understand that some people successfully enter the dfu bootloader via software means (support in the running firmware) but not enough to understand how to achieve it.
@old smelt we reserve 3 PID's for each: arduino, uf2 bootloader and circuitpython. Having multiple PIDs is a bit of a nuisance on Windows because each one gets its own COM port, but the advantage is that you can tell what mode it's in. And some OS's can get confused if a device with different capabilities has the same PID.
We have a numbering scheme but it's historical. It doesn't matter much what you choose.
Thanks @tulip sleet
like, we have 0x0nnn, 0x8nnn+1, etc.
Right.
I saw that pattern in the GitHub requests
Didn't know if that ended up working well for a specific reason.
...or if it was somewhat arbitrary.
( Somewhat Arbitrary would make an excellent name for a rock band. )
it doesn't mean anything except that we're consistent. We have an internal file with assignments. It was a little irregular for a while, and now it's regular enough that I wrote a script to generate new numbers 🙂
My Python experience is limited but I'm wondering if this could be tuned by having an optional list of __name__ values where displayio updates would happen. I.e. if that was set to just ['__main__'] then displayio would only refresh in code within the main application. Is the feasible/useful?
Got it. Thanks!
@old smelt arbitrary solo
@slender iron good list! I copy-edited that a teeny bit and bolded the main things. Only other change I made is "Spresence" -> "Spresense".
I have no idea why some of the @ names are links and some are not
maybe there's an upper limit
np, thanks!
ok, I think this is it! shall I click Publish?
sure!
@tulip sleet great job!
it's all of us!
Automated website update for release 5.0.0 by Blinka.
i'll wait on the circuitpython-org PR until the builds are finished. Will now copy/paste and convert this to forum and blog
For terminalio.FONT, what's easiest way to see all the glyphs?
@raven canopy Where are we with making the build.yml include the versioning and installs?
oh. that was on me? i though you said Dylan was starting. lol 😄
Dylan's updating the libraries to use the new version of Pylint and implement Black. Not make the change to the build.yml. Apologies for being unclear.
all good. i'll toss it on my short list!
@raven canopy Thanks much! The update has begun so the sooner we can get a simple way to change the version being used on an individual library, the better.
is Dylan also updating the build.ymls, or just the lib files?
Ooh, I believe he is updating the build.yml file to include the Black implementation, as here: https://github.com/adafruit/Adafruit_CircuitPython_BLE_BroadcastNet/blob/master/.github/workflows/build.yml
@raven canopy I can have him hold off so we can patch across the board.
@raven canopy Nevermind, PR just came in, build.yml not changed.
Which is better for you?
just looked.
Which is better for you?
Well, if we patch everything with Black from the jump, it will start failing on whichever PR is submitted next...
Right.
Which is not how we want to do it.
So, hmm.
Ok, here's my thought.
@raven canopy We patch it so the Sphinx and Pylint installs and versions are in build.yml, and then have Dylan add Black properly as we go.
@madbbodger Easy for you to say, lol. I'm painfully studing Python, till then it's cut and paste. I want to add sound effects to the useless box but don't see that option on the Ardunio boards used. I figure the mechnics will be easy with CPX and Crickit, but ohhhh the programming.
@idle owl sounds good to me. let me wrap up my current debug, run my lib updater/cloner, and I'll start working the patch. I'll start with TestRepo and PR there for everyone's review. Once that is clear, I'll update cookie, and then patch the rest.
Perfect, thank you.
Hi all, next week's CircuitPython Weekly meeting is the normal day and time, Monday the 9th at 11am Pacific / 2 pm Eastern, here on Discord. Everyone is encouraged to attend and participate. The notes doc is here: https://docs.google.com/document/d/1kB6iS2NCVJH3PPK1s7JlGY7L57boeBb2KYHyZr4-aaY/edit?usp=sharing <@&356864093652516868>
Create a new document and edit with others at the same time -- from your computer, phone or tablet. Get stuff done with or without an internet connection. Use Docs to edit Word files. Free from Google.
@slender iron or @idle owl could you reviewhttps://github.com/adafruit/circuitpython-org/pull/417 ? I'd like to get that in before the 5.0.0 PR for circuitpython.org
got distracted
Why does Google docs need access to my contacts??
it doesn't. I accidentally made the copy of the doc with my adafruit.com account
I always make the notes doc with my adafruit.com account... I've never had an issue.
i think @timber mango is installing the google docs app on their tablet
how do you share it with people outside of adafruit.com?
you can get a sharable link, and use the dropdown to share with anyone instead of just in adafruit
^^
Yes, I am
ah, under more
I set sharing on the template, then when I create the copy, I "share with the same people" and never have to deal with it again.
ha
I created a template file and work from that.
@timber mango notes doc link should work now
blog post is sked for 7pm ET
I have it now.
Does Adafruit have any USB-A (male) that have heavier gauge wires??
s/) /) cables
- Mixer moved to audiomixer and now supports per-voice volume 🤩
🎉 2️⃣ 0️⃣ 0️⃣ 🎉
rosiepi_node_server.local:nnn n.n.n.n - - [02/Mar/2020:18:05:32 -0600] "POST /run-test HTTP/1.1" 200 266 "-" "python-requests/2.23.0"
first successfull push notification from Azure to RosiePi. 😅
i really should update the user-agent. haha
@raven canopy nice!
now to figure out why it told github that it wasn't accepted. but that's later... library updater script is running in prep for real work. 😄
lol
208 Updated Forks
15 New Forks
things around here move soooo fast! 🚴
My Android tablet recognizes a Feather M4 Express as a USB device, but not for mass storage.
Correction. It says the mass storage drive is corrupt.
@timber mango I think it's due to the format of the storage. Most Android builds don't support the type of drive that CircuitPython represents itself as to the host.
A while back I created this app https://learn.adafruit.com/using-the-android-circuitpython-editor to allow some basic ability to edit code on Circuit Python devices from Android. It's not ideal because it requires making the drive writeable internally instead of via USB, but it can work in a pinch.
Why does CircuitPython use a drive format that can not be recognized??
I end up using the the REPL macros much more than editing actual code.py.
I'm not sure, the small amount of space required, and/or the ease of implementation vs. newer alternatives would be my guesses. But it's all a bit over my head to be honest.
I have run across a few Android devices that support it, but they've been weirder no-name type devices rather than phones or tablets.
My tablet is Android 7.0, but my phone is Android 9.x.
@timber mango It is not a choice. The drive is only 2MB, and only FAT12 supports such small drives. Android doesn't support FAT12 directly.
@idle owl i realized something to correct from my previous statement. we can go ahead and install black on each repo. it will only fail if we add the black --check step to build.yml. so, i'll go ahead and add black to the install portion. mini-🤦-moment. hehe
@raven canopy Sounds great.
If I forget, next week hug report will be to @tulip sleet for the 5.0.0 release work (and it's BLE content). Also that explanation on why it fail on Android had been a mystery for me since so long... Thank you!
@danh did you do undo the buffer size fix in BLE heart rate sensor? It was waiting for 5.0.0.
@danh Ah, OK. That does make sense.
@timber mango yes I updated the library: https://github.com/adafruit/Adafruit_CircuitPython_BLE_Heart_Rate/pull/4
@simple pulsar ping
We'd like to be able to do real time audio filtering with CircuitPython. Example: Read from mic, perform FIR filtering with ulab, output on speaker.
We would also like to process all data from the mic without interruption. Example: Waterfall FFT demo
One option to enable this is to allow Python classes to be samples, to allow Python code to retrieve sample data, and to make microphones into audio samples.
Either M4 or nrf52840 would get the initial (PDM)AudioIn DMA work, as this is...
@solar whale re: https://github.com/adafruit/Adafruit_CircuitPython_TinyLoRa/issues/27, do you think we should add the lora bonnet pinouts to https://github.com/adafruit/Adafruit_CircuitPython_TinyLoRa/blob/master/examples/tinylora_simpletest.py like how we have RFM9x breakout and feather pinouts?
@prime flower It won't hurt, but I was frustrated by that users refusal to think about what the code was doing ... Similarly, the use of the D13 LED should be noted as not being meant for the RPi.
would it be better to have a separate bonnet/RPi simpletest.
I feel it would, instead of explaining "comment out, add in" for the hardware.
We'd want to add some display code too, if it's specifically for the bonnet
@prime flower did you see this forum post? https://forums.adafruit.com/viewtopic.php?f=8&t=162912&p=801073&hilit=rfm9x#p801073
nope
it's a bit snarky 😉
tbh I should've named tinylora -> tinylorawan
yeah, might have been clearer.
I have not tried this, but is it possible to set up an RFM9x to use FSK and then if so, could it talk to an rfm69?
probably should have asked that in #help-with-radio
I remember talking with someone about trying to use an RFM9x for OOK and deciding it just didn't want to play ball. It may well not care to implement FSK either.
interesting,, the datasheet covers all the register settings, but there may be something about the board implementation that gets in the way...
I'll take a closer look when I get bored with other projects....
It could be the chip is capable of it and the libraries never bothered to implement non-LoRa functionality. I too haven't had time to take a closer look.
The libraries definitely don't do it, but "it's only software" 😉
I was unsure if there was a hardware reason too, but your mention of the datasheet implies there's at least register support for other modulation modes.
There is a new blog post about my Little Red Rover.
Robotics, Gadgets, Circuits, Toys, Radio, and other Tech
@hierophect Sorry I just saw this. I do like the vague stm32f4 since it matches the manufacturer name. I think that is where it settled anyway.
Interesting newsletter this week! Really excited for ESP32-s2 chip tinyUSB support
@gilded cradle when you have a chance can you reply here? https://forums.adafruit.com/viewtopic.php?f=60&t=162916
Sure. They probably don't have SPI enabled.
feeling nostalgic this morning, here's the 2018 adafruit order that started me with circuitpython ...
.. I wonder whether I actually did anything with the teensy 😬 I sure used the trinkets though
@onyx hinge My first CircuitPython board was Circuit Playground Express. (What a surprise.) First order was that and stuff for my RPi0W. It's on someone else's account though so I can't join in the screenshot fun.
You've heard that story though 😄
😛 also mid 2018
from 2018, asked a friend coming from US to get me these 😄
iirc, I got 1 extra Gemma and a perma proto board free with this order
This one was my first order and is from January 2014.
I was really a huge fan of Tony DiCola's show, especially the MP series
thanks for the reply @gilded cradle
yw
From summer 2013. Dug it out not long ago to test with Pi + Blinka
@sta-c0000 sit tight. We can re-release neopixel now that 5.0.0 is stable. We couldn't until then because the driver hard crashes on 4.1.2.
Is this time for exchanging first encounter with CP? I rarely order from Adafruit because of transport+import, so Pimoroni is my dealer. Exceptions are my CPX and CLUE.
@aidancuckoo I have a Nano Sense that I can test with and may have the other as well. No need to say untested.
I started MicroPython because of Tony Di on ESP8266 on Pimoroni IoT board for the Raspberry Pi. Then I tried CP when it started to exist(???).
I was late in the game to CircuitPython myself and only started using it at the end of 2018 and now I use it all the time. I like to say it was my gateway to learning Python even though I tinkered with python (combined existing examples) a few months before that.
@meager fog now that the release is out, should we mention that circuitpython support is enabled on the various STM32 boards on the store? Meowbit, Espruino, etc.
@tannewt sure ok! Mind you, it looks like some of the translated sentences with English and Arabic content written together don't retain the right order of wording for some reaon. I think I will need to figure out a solution for that as well. I am stoked that we took a nice big leap in the right direction though, so yay!!
Could you describe the issue? I don't trust my own computer to render your notes correctly. Here is a screenshot of VS Code, Sublime Text and the CircuitPython build in...
@jepler I think this is ready to merge.
2018 ?? wasn't that yesterday 😉
This was my first order (2014), must've been gearing up for something. Didn't order any micros until 9 months later though. No CP until late-'18, early '19.
One minor nit.
Testing performed: merged with ulab branch and:
>>> import ulab.fft as fft
>>> fft.spectrum
this added extern declaration may not be needed, I don't see where it is used.
This looks good to me! Thank you for the hard work!
Yup, I added it for debugging iirc. Thanks!
@jepler Removed! Please take another look!
@tannewt all good, this strikes me as a support/docs issue so I don't have a strong opinion either way. I'd say chat directly with ladyada or makermelissa if it comes up again.
Looks good to me! Thanks!
This all looks good to me! Totally fine to follow up for the Access line.
I didn't look at the code (add me as a reviewer or @ me when ready) but I think validate_pin_is_free would read better.
Could you give some background why you are wanting this? I really dislike multiple board definitions for the same board because it is confusing.
PulseOut is currently implemented with the internal basic timer T7, which is not present on ST's low end "Access Line" chips such as the F401 and F411. These chips will be forced to use a pin-tied timer, which will require communication with the PWMOut module so the peripheral can be properly reserved. They will also require a different register implementation to reflect the differences between the Basic timer register set and the General Purpose timers.
@tannewt sure ok! Mind you, it looks like some of the translated sentences with English and Arabic content written together don't retain the right order of wording for some reaon. I think I will need to figure out a solution for that as well. I am stoked that we took a nice big leap in the right direction though, so yay!!
Could you describe the issue? I don't trust my own computer to render your notes correctly. Here is a screenshot of VS Code, Sublime Text and the CircuitPython bu...
This all looks good to me! Totally fine to follow up for the Access line.
@tannewt could you re-approve after the CI clears? It cancelled some checks for some reason and I dismissed your review trying to get it to restart.
I remember when the original Circuit Playground Express was flying off Adafruit's shelves as fast as the new Blufruit version, and I could not get one.
@onyx hinge Jeff, if you have a bit of time, could you, please, cast a glance at the static-ndim branch? https://github.com/v923z/micropython-ulab/tree/static-ndim . Binary operators won't yet work, but I believe, I have figured out the subscription, iteration, views, and vectorised functions; these should be functional for arrays of ndim < 5. (It is not trivial, if you want to get rid of recursion.) I am not sure the stuff is circuitpython compatible at the moment (properties might be missing, if needed, could be called as functions). I think the binary operators can be implemented almost exactly as the subscription, but you might have better ideas. I can finish that tomorrow.
@tulip sleet WHen I build the current master is shows up as 5.0.0-rc.0 -- same thing with builds from the released 5.0 yesterday -- is that correct?
hmm but the version from circuitpython.org builds as 5.0.0 -- what did I miss?
when I checkout 5.0.0 I get ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0 on 2020-03-03; Adafruit Feather M0 Express with samd21g18
but with current master I getPress any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-rc.0-14-g2fea811c3 on 2020-03-03; Adafruit Feather M0 Express with samd21g18
I'm glad it's working! I'm happy to fix it up so no worries. I appreciate your help.
hmm -- the commit on my master build does not make sense either ...
@lapis hemlock modest recursion of 5 levels I would think would be okay .. gut check only. I'll try to take a look at the branch, but it may be tomorrow.
just re-cloned the repository and did a build of master ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-rc.0-19-g6468ca04a on 2020-03-03; Adafruit Feather M0 Express with samd21g18
does anyone understand the tag? I'm confused.
@solar whale the rc.1 and 5.0.0 tags aren't on the master branch
(they are on the 5.0.x branch)
OK -- so I am confused -- is master the current "bleeding edge" ? are the changes from rc.1 incorporated into master ? I never understood this...
looks
it doesn't look like changes from rc.1 have been merged back
makes a PR
I have been testing out 5.0.0 on an STM32F407 Discovery board and noticed I was unable to set any of the LED pins as OUTPUT. After setting the pin direction, it would always read back as INPUT.
I was looking through the source and noticed within the stm32f4_peripherals_gpio_init() function that only ports A,B and C are enabled.
ports/stm32f4/peripherals/stm32f4/stm32f407xx/gpio.c
void stm32f4_peripherals_gpio_init(void) {
//Enable all GPIO for now
__HAL_RCC_GPIOC_CLK_ENABL...
in general I just stick to master unless I want a specific build -- assuming it usually has the last relase + new stuff -- it that correct?
Thanks for the issue @louismdavis !
ya, that is best
ok - thanks
@slender iron with pr 2678 applied I get this from a build ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0 on 2020-03-03; Adafruit Feather M0 Express with samd21g18
hrm, I wouldn't expect it to be exactly 5.0.0
Merge: 752881461 898f67ac2
Author: Dan Halbert <halbert@adafruit.com>
Date: Sun Mar 1 15:39:26 2020 -0500
Merge pull request #2671 from dhalbert/merge-for-5.0.0-rc.1
Merge for 5.0.0 rc.1
commit 898f67ac2eb5fa895cb93bb81ec86999593e524a
Merge: 752881461 29e44721d
Author: Dan Halbert <halbert@halwitz.org>
Date: Sun Mar 1 12:22:18 2020 -0500
Merge branch 'master' into merge-for-5.0.0-rc.1
commit 752881461733263cae77db8c33a2da142a046f7e
Merge: 1b33cd11f 98a03fc93
Author: Dan Halbert <halbert@adafruit.com>
Date: Sun Mar 1 11:43:55 2020 -0500
Merge pull request #2664 from dhalbert/downloads-from-s3
Download links from S3; Do not upload release assets to GitHub
commit 98a03fc93534a22d11c0a6a50f9982c397232ad3
Author: Dan Halbert <halbert@halwitz.org>
Date: Fri Feb 28 21:18:48 2020 -0500
upload bin and uf2 for arduino boards; remove unneeded build steps
doesn't look there is another merge commit (which the pr will create when merged)
ok -- I'l let you and dan sort it out -- I'm not sure why I had to re-clone to get the latest master commit correct, but it looks OK now. Thanks -- sorry for any confusion...
Dang, thanks for spotting this! This was a testing oversight on my part, didn't go through enough pins! Should get this done today.
@meager fog pong
The arduino one, yep i spotted that on blog and PT mentioned in email too.
yah
I hadn't seen it before I started coding. It's funny how similar they are in places
ya 😄
I've not yet looked to see if displayio has built in line drawing
you dont need it
cause the lines are always horizontal
(or rather, 1 pixel wide so you can split the diff)
horizontal might be ok tho
Good point, thanks. https://circuitpython.readthedocs.io/en/latest/shared-bindings/displayio/Bitmap.html just appears to have pixel setting.
Oh, turns out there's a line in https://github.com/adafruit/Adafruit_CircuitPython_Display_Shapes/blob/master/adafruit_display_shapes/line.py but I'm not sure if that would be practical to use in this case and it's not implemented in C, it's in python in https://github.com/adafruit/Adafruit_CircuitPython_Display_Shapes/blob/master/adafruit_display_shapes/polygon.py
@simple pulsar you dont need to use line
its always 1 pixel wide
so draw a row of pixels
Sure, I thought I'd check if there was something implemented in C that would be faster.
I've not used any of the LCD screens before. I'd seen some notes on how it was challenging to do video (animated gifs) on them but hadn't realised how limited they are in terms of updates rates.
@simple pulsar ok please submit the draft PR once your code is ready to be tested 🙂
Ok, is that to adafruit/Adafruit_Learning_System_Guides ?
@simple pulsar yep
I have been working on this for a long time. It is almost ready to go.
It will be autonomous with the ability for me to take control of it.
I just bumped into this testing the new CP 5.0 release. I had to change code for to_bytes() and just did a global search/replace which made my from_bytes() calls fail.
Thanks for documenting it here, though. Didn't take me long to find this thread and see it's a known issue on the long term list.
Hi, before I open an issue, is it normal/ok that the uGame10 appear as TRINKETBOOT? No big deal, but it could be UGAMEBOOT or anything else.
that is a bootloader issue. not circuitpython
So it would be an issue, but on another repository?
was it shipped to you as TRINKETBOOT? Then that's just what was put on it. You could open an issue on adafruit/uf2-samdx1 if there's a ugame10 board there.
Maybe it has always been TRINKETBOOT and the that bootloader was just borrowed. I can live with it. I don't believe there are many uGame10 in circulation. I did not knew it was separate software.
ok, I think @stuck elbow just reused the Trinket bootloaders. There are no ugame boards in https://github.com/adafruit/uf2-samdx1/tree/master/boards
Don't you think the download page start to be "hard" to navigate? There are so many supported board... Maybe having some button to filter "M0" "M4" "NRF" or any other idea?
has the search box been useful for you? it narrows things quickly and dynamically as you type
just type "m0" without even an "enter", to see what I mean
There are filter, sorry I did not see it.
It's actually great, you can say the form factor such as feather. Thank you.
and the actual search box is dynamic too, even faster than the filter page
the filters actually don't seem to work that well, many show too few boards or none
i take that back, I must have had something extra checked. It's fine.
my CLUE bootname is FTHR840BOOT. (guess what, I am making an upgrade of all my board)
I just powered on a CLUE. Pressed reset about 2 mins after it running. Connected to serial console and got this: ```Adafruit CircuitPython 5.0.0-rc.0 on 2020-02-26; Adafruit CLUE nRF52840 Express with nRF52840
import board
from adafruit_clue import clue
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_clue.py", line 886, in <module>
File "adafruit_clue.py", line 172, in init
RuntimeError: SDA or SCL needs a pull up
sometimes an onboard i2c device gets stuck and pulls down the data line. power cycling
I did a control-D and the soft reboot immediately said the same ```>>>
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 46, in <module>
File "adafruit_clue.py", line 886, in <module>
File "adafruit_clue.py", line 172, in init
RuntimeError: SDA or SCL needs a pull up
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-rc.0 on 2020-02-26; Adafruit CLUE nRF52840 Express with nRF52840
We have an issue open to add some code to attempt to fix this (you toggle the SCL line 9 times or so)
it will remain stuck until you power cycle
Yep, it fits that pattern!
the makecode people found this happened very occasionally on the the CPX with the LIS3DH and they added code to makecode to unstick it. We'll do something similar.
Power cycle has restored it to good health
I just got this by pressing reset button on a CLUE (alpha) then trying to load clue object:
Adafruit CircuitPython 5.0.0-rc.0 on 2020-02-26; Adafruit CLUE nRF52840 Express with nRF52840
>>>
>>>
>>>
>>> import board
>>> from adafruit_clue import clue
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "adafruit_clue.py", line 886, in <module>
File "adafruit_clue.py", line 172, in __init__
Runti...
Refreshing the screen in the background even though it is slow is a trade-off I'm willing to make because it makes things easier. We don't make any promises about the speed of the Python execution because of background work. I don't know of any code that assumes that Python is fast and breaks when it is slow.
We can address any specific cases where we need more speed separately. This case isn't an issue because it is expected.
There are some examples where people are trying to do timed pulses with CP, e.g. https://learn.adafruit.com/controlling-a-classic-nintendo-r-o-b-robot-using-circuit-playground-express/programming but this is on CPX and there's no displayio involved.
@slender iron ok with you if i merge and release radio?
yup!
@tulip sleet indeed, I re-used the trinket bootloader
@stuck elbow i see no problem with that, unless you want your board to be uniquely id'd for some reason
it's out of production by now anyways, and the pewpew m4 has a custom bootloader
One trivial style thing, but I realize now there are still some things under discussion.
This looks good to me! Thank you for the hard work!
@tannewt I updated the locales only in this last update
How should I control a servo from CP5 on a TrinketM0? I can't find adafruit_motor in the bundle so I'm guessing there's a different library now?
@robust coral adafruit_motor should be in the bundle. It will be a directory with several files.
yw
Hi everyone. With 5.0.0-rc.0 and displayio, I found that creating a Label with a custom font can take several seconds. Bug?
Wondering if related to: https://github.com/adafruit/circuitpython/issues/2667
@spice crypt how much text are you doing and what is the font? Btw, I've noticed it's happy to take more text that fits on the screen horizontally. Depending on how that's clipped it could be both pointless and wasteful in terms of processing time to give it more text that fits on screen. If you look in the comments in 2667 it shows how to turn off the screen refresh and then manually do a refresh which allows accurate measurement of the time.
Is the feather bluefruit sense an "express" board -- the product page does not mention an external Flash, but it presents a 2Mbyte CirCUITPY drive.
ah -- guess it is https://github.com/adafruit/circuitpython/blob/master/ports/nrf/boards/feather_bluefruit_sense/mpconfigboard.mk#L8 might be worth adding to the product page....
Reading the product page, I was afraid the external flash had been removed -- nice to see it.
@solar whale it is, we're planning on phasing out the express part of the name because all new boards should have the external flash
makes sense -- I was just surprised it was not listed on the product page.
@slender iron How will you distinguish the two Circuit Playground boards?
The original and the M0 version.
Circuit Playground and Circuit Playground M0?
I think the original one is Circuit Playground Classic now?
@timber mango any existing products will still have the same name
I just meant new products will skip the "express" designation
"Feather M7 1011" for example does have spi flash
@meager fog just aheads up - when I try the CircuitStonks program I keep getting ```Adafruit CircuitPython 5.0.0-15-ge98991fd7 on 2020-03-03; Adafruit Feather Bluefruit Sense with nRF52840
import stonks2
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "stonks2.py", line 25, in <module>
ValueError: SCK in use
``` It works fine if I use board.SPI() instead of busio.SPI(board.SCK, board.MOSI, board.MISO) Dies it work as written for you? I am not running it as code.py buy from the REPL as import stonks.py does taht matter. I am using a feather_bluefruit_sense with and airlift featherwing and mini-tft featherewing,
i just run it directly
could be a change is needed for using board.SPI ()?
submit a PR if so 🙂
ok -- will try a few more tests then pu in a PR if I don't resove it
I've gotten this working (although I just grabbed USB VID/PIDs, so don't ask for the binary :) ). The UF2 portion is painless - just copy over a board_config.h from the Feather M0, change LED_PIN to PB_30 (and keep in mind it's inverted, so it'll be opposite whatever the Feather's does), change CHIP_VARIANT to SAMD21J18A, and build it.
The CircuitPython part requires fixes in the asf4 repository (this has an open pull request to fix it, should be merged soon I imagine) and the samd-periphe...
@lapis hemlock modest recursion of 5 levels I would think would be okay .. gut check only. I'll try to take a look at the branch, but it may be tomorrow.
@onyx hinge If we take recursion, then it is no longer scalable. We would also lose time/RAM on having to dispatch the function.
@spice crypt how much text are you doing and what is the font?
@simple pulsar The labels were ~14 characters in length. Font was "Arial-12.bdf" I found on another AdaFruit repo.
Is there a way to turn off the REPL to SPI display so I can factor out if that has an impact on the slowness? I thought disabling import of terminalio would do the trick but I was wrong.
@slender iron what's the smallest internal flash size we can reasonably support?
@solar whale Do you have time to test an ethernet lib today?
I've got strange behavior lasts days. when I save the lib I worked in, the CPB + TFT gizmo reboot (normal) and give me this error :
File "adafruit_gizmo/tft_gizmo.py", line 48, in __init__
ValueError: A4 in use
If I hit reset, everything come back ok. If I save code.py, everything works as expected. it's only when I save my lib...
if I was playing with the REPL, I can save my lib and then hit CTRL-D to soft-reboot without a glitch...
so it's not a blocking issue, but I don't understand what can trigger this each time.
@cursive condor If you're initialising something on A4 in two different places, it will do that when it tries to access it. So if you're using another lib that also uses that pin for something, you may only notice it when that particular feature gets used.
A4 is also SCL (i.e. i2c and the like)
my code :
import time
import board
import displayio
import gc
from random import randint
from adafruit_gizmo import tft_gizmo
from marius_turtle_french import Color, turtle_fr
is board conflicting with tft_gizmo ?
it's not each reboot, only if I save marius_turtle.py
There's no reason for board to interfere. Do you mean marius_turtle_french.py ?
the french one call the generic one
marius_turtle_french.py is after tft_gizmo also. In the error above it looks to me like it's not making it to the the import marius_turtle_french.py line. It's crashing on the line before.
yes ... my code is not even called...
What version of CircuitPython are you running? Worth trying the latest rc1 to see what that does if you're not using that.
There's latest prod version and latest "unstable release". It does sound like a bug in CircuitPython the way you describe it possibly related to pins not being free'd on a restart under some circumstances.
should a soft reset release an i2c lock?
Adafruit CircuitPython 5.0.0 on 2020-03-02; Adafruit Feather Bluefruit Sense with nRF52840
>>> import board
>>> i2c = board.I2C()
>>> i2c.try_lock()
False
>>>
@cursive condor Slightly random question, do you have anything weird in boot.py ?
no boot.py
I can reproduce with an unused file. if I save a 40Ko file, next reboot will do this error. and only a reset can get it back ok
Oh, i'm behind on versions, official 5.0.0 came out!
and the latest version do it : Adafruit CircuitPython 5.0.0-15-ge98991fd7
(from last night build)
@tidal kiln :
>>> import board
>>> i2c = board.I2C()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ValueError: A5 in use
(when the error occur, of course)
so ... when I save a (text?) file bigger than 35 748 Bytes, It trigger the error
@cursive condor sry for interjecting into your discussion, my question was general
np. I tryed to see...
well ... 35 308 Bytes crashes, 34 932 Bytes don't crash
35 001 crash 35 000 don't...
there is an arbitrary limit somewhere 😛
when I mean crash, I mean I get this error on reboot.
so "when saving a more than 35000Bytes file, the SCL pin is not released" is a good description of the problem ?
must be something with timing / sync ... with the soft reboot in the REPL there is no problem, whatever the size I saved
browsing the issues to see if something similar has been reported yet
@ionic elk what's the smallest internal flash size we can reasonably support? 192kB for the firmware + bootloader + 64kB for a filesystem is what we have on Trinket and Gemma M0
@cursive condor https://github.com/adafruit/circuitpython/issues/2590 ?
it's kind of the inverse problem...
if I reset it's ok. his problem occur only when he reset.
@simple pulsar could be related to https://github.com/adafruit/circuitpython/issues/2635
@solar whale I am cutting antennas for all my RFM69 modules. I have enough to set up a five node network. One of those is a Raspberry Pi 0 with the RFM69 bonnet.
@timber mango cool! Good luck! I am still struggling with the "reliable datagram mode" -- it's not very reliable 😦 I'lll be interested to hear how you make out with missed packets. I was also planning some changes to make it easier to set the node addresses but that is bogged down in the other stuff for now. Let me know if you have any problems with it.
One suggestion I have is that if you have a node responding to a message received, put in a small delay ( say 200 ms) before sending the response. Otherwise the originating node is likely to miss the response. Especially the RPi
@cursive condor I think that one occurs only or more often with particular i2c devices, but not too sure, as per comments I've seen it on CLUE
@solar whale I will! I need to get two RFM69 FeatherWings and two ESP32-SPI WiFi FeatherWings. I need two of each so I can add wireless to my robot and my PyGamer.
Ah, OK.
reading more I'm not so sure it's related...
This is good for now. Later we'll want to enable each GPIO on first use to save power. Thanks!
@kevinjwalters thanks for pointing that case out! The recommended way of doing it is PulseOut rather than in a loop.
@TheKitty Would you like to update the example to PulseOut? Did you have reliability issues?
I didn't look at the code (add me as a reviewer or @ me when ready) but I think
validate_pin_is_freewould read better.
The old assert_pin_free() did not actually check that the object was a pin, so I was trying to make that clearer. But I agree the name was a bit awkward. I think maybe validate_obj_is_pin() and validate_obj_is_free_pin() would be more grammatical and clearer.
validate_obj_is_free_pin works for me. Thanks!
@dhalbert How about isobject(object, Pin) like the isinstance() functions??
I'm guilty of it too. I took a very simple library and did minimum modification for the lego vll protocol in https://learn.adafruit.com/bluetooth-remote-for-lego-droid/circuitpython but the minimum delay and granularity of that is 20ms...
Hi i've been looking through circuitpython sourcecode for PDMin module and traced back to https://github.com/adafruit/circuitpython/blob/master/ports/nrf/common-hal/audiobusio/PDMIn.c . I'm still not exactly sure how it's able to sample 16kHz when there's only 1 multiplex ADC and analogRead on android takes 100 micro sec = 10kHz. I'm trying to just sample an analog pin (A0) at 30kHz, 16kHz is ok too but I can't figure that out either. I tried using the PDMin record function just to see what it picks up but it's a constant 32760. If i assign A0 to analogio.Analogin i can see that the analog microphone data coming into A0 is normal.
Using board nrf52840 adafruit feather express. I searched for sampling library, fastADC, and timing libraries but none worked for me.
I can't use SPI because i have an Adalogger attached which writes the data sampled from A0 into SD while values are being recorded/buffered
i also don'tunderstand why the C code for pdmin is also fixed at 16kHz and 16bit-depth
@timber mango that PR is for some C functions that validate args; it's not for Python use
what am i doing wrong here?
>>> struct.calcsize("B")
1
>>> struct.calcsize("f")
4
>>> struct.calcsize("fB")
5
>>> struct.calcsize("Bf")
8
>>>
why not 5 for the last line?
no idea
funny
oh maybe because all data must be /4 aligned
so second float, it cant be 1 byte packed against the B?
ok, yah, i think that's it
The ordering of format characters may have an impact on size since the padding needed to satisfy alignment requirements is different
(from struct docs)
12 ```
or better from here https://docs.python.org/3.7/library/struct.html#byte-order-size-and-alignment
thanks. yep. that's totally what's going on.
so will have to split this into multiple packs/unpacks
yeah ive never had to unpack floats
@tannewt maybe that would be best added as a new utility in microcontroller/Pin.c? Something like "port_on" and "port_off" that you'd call in every construct and de-init/reset function, respectively. "port_on" would check if no pins are active and turn the port clock on if not, "port_off" would do the opposite.
same behavior with different size ints ```>>> struct.calcsize("HHB")
5
struct.calcsize("HBH")
6```
could happen with small ints also
>>> struct.calcsize("BI")
8
>>> struct.calcsize("IB")
5
9
``` is 9 what you're hoping for?
always put the small ones at the end ...
@simple pulsar interesting. yes.
From the big python, ```>>> struct.calcsize("=fBf")
9
What's the purpose of your pack/unpack?
is there someone/forum i can get help with understanding the c level implementatino of circuit python?
@wild juniper this is probably the best place to ask. Responses may depend on who is around.
unpacking a data bytestring that has an int (1 byte unsigned) in the middle of several floats @simple pulsar
Where's the data coming from?
ah ok 🙏
from me, concat'd from several sensors
so i could totally change the pack struct if i wanted
Ok, I was just curious if it had a well defined endianess and/or was being stored or passed around with obvious consequences if another endian processor one day picked that up.
>>> data = b'd\x06\xf5\xbd\xd0NH?\x1c\xbc\x1dA\xb8\x85\x19\xc2\xd4\xb5\xaa\xc0p\xb3\xa2\xc2\x00@\xda\xceA`\xa3\xadA\xec\xff}D \xf5\xb5\xc1\xcc\xe4\xa5A'
>>> struct.unpack("<6fB5f", data)
(-0.119641, 0.782453, 9.85843, -38.3806, -5.3347, -81.3505, 0, 25.8566, 21.7048, 1016.0, -22.7447, 20.7367)
>>>
I wonder why CP doesn't support = prefix, presumably that's inherited from micropython?
@tulip sleet re: flash size, that's too bad. I've been looking at the H7 and F7 chips, and unfortunately the 100p LQFP size is the smallest layout they have if you don't use the "value" lines, which have very very small flash sizes (64-128kb)
The i.mx relies on external flash as well, right?
100p would be a challenge to fit on a feather layout, it's pretty big
@ionic elk the imx has no internal flash and runs from an external spi flash
@wild juniper i briefly flirted with writing the nRF PDMIn code, but stalled on it and someone else implemented it (better than i would have, too!).
i also don'tunderstand why the C code for pdmin is also fixed at 16kHz and 16bit-depth
the 16kHz/16-bit is fixed by the nRF52480 PDM peripheral on the chip itself. i can't speak for Nordic's decisions, but i imagine they didn't target higher-fidelity uses when making the design decisions for how to implement all of the Cortex-M4 peripherals.
I'm trying to just sample an analog pin (A0) .... I tried using the PDMin record function just to see what it picks up but it's a constant 32760.
have you tried another pin (say, A1) by chance? also, does the "simple example" code from the API docs give the same result? just trying to narrow down if its a code or documentation issue...
https://circuitpython.readthedocs.io/en/latest/shared-bindings/audiobusio/PDMIn.html
@slender iron do you think there'd be any interest in an H7 feather that does something similar? Thinking of the STM32H750 in particular - 480MHz, 1MB RAM, Camera and LCD driver
how small do the packages get?
64 pin on the 750
but it only has 128kb flash
I assume it can do xip from flash
this has HS
"USB regulator to supply the embedded physical layer (PHY)." is that an indication?
Oh darn it that one caps out at 100. But I guess if it didn't there'd have been nothing for NXP to one-up
The H743 has a TFBGA option that's 8x8mm
"A USB OTG full-speed and a USB OTG high-speed interface with full-speed capability (with the ULPI)" on the H743.
the only one I've found is the F723
@slender iron what do you mean
Well that sentence I posted above is right from the STM32H743 datasheet.
"with the ULPI" seems like what you mentioned earlier - is there something else that's needed too?
STM32H7A3 also has it - that one has the 64kb package but cuts to 280MHz
right ULPI is an external phy chip
Oh I see so they're implying that you need to have an ULPI, not that it has one - didn't realize ULPI meant an external thing by definition
It's kinda vague wording then I guess. Does "with the ULPI" mean the ULPI they provide or the one you have to install 😆
Yeah, you're right, the F7x3 series is the only one they offer with on-chip HS: https://www.st.com/content/ccc/resource/technical/document/application_note/group0/0b/10/63/76/87/7a/47/4b/DM00296349/files/DM00296349.pdf/jcr:content/translations/en.DM00296349.pdf (Table 3)
I'm just surprised they didn't fit one on any of the H7 series.
Looks like the NINA firmware sends an ICMP packet to servers it's doing HTTP with. I don't think that's in the ESP32SPI library. Not sure why it would do this... does behavior change if (ping) fails? It shouldn't, it's quite plausibe for a server to ignore pings or other ICMP types, and still serve HTTP[S] content.
LOL, oops, n/m, it's my code (a connection check I put in ages ago)
@crimson ferry HTTP Load balancers are often determining icmp response by their setup nowadays too. Plus firewall rules on top of that.
@crimson ferry are you taking a look at the NTP delay by chance?
I was just noticing the traffic in my router (and forgot it me)
ha
Do you mean the startup 15 seconds?
I set my router to always send NTP on the fastest (lowest latency) link, don't have much trouble with that. A lot of DNS failures though I haven't tracked down yet... that's buried pretty deep in NINA.
I do have an Ethernet FeatherWing, haven't done much with it since some Arduino testing long ago, but I'd love to test with CP... do you want me to look at something?
@crimson ferry PERFECT
Ladyada tested it today, she has a different network from me, it failed. Revised it since then.
You'll want a SAMD51 board for it since it uses longints and takes up a bunch of space
Feather M4... is DNS still manual?
Nopeeee
thanks! You may want to comment on the issue if its working/broken, I'll be off discord later tn
heya @slender iron is there a way to change the backlight pin polarity in a board definition? for the OHS2020 badge I currently have to set board.DISPLAY.brightness to 0.0 for it to be full bright
not yet @pastel panther
@crimson ferry Could you set debug to true in simpletest
In the initialization, so, eth = WIZNET5K(spi_bus, cs, debug=True)
yup, where do you want the output?
On the issue please
comment updated
you can append to what you have, it's odd that's happening b/c the PR didnt touch that method.
Do I have all the right pieces?
Yeah, the router's offer message seems large
but throwing your response into my code, doesnt seem to throw the same error you got
@crimson ferry weird, your router's response also doesn't seem to end in 0xff...
Is it supposed to? https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol#Offer
Is there a quick way to do a best-effort decode of that data?
@crimson ferry I just comitted a small tweak and some more debugging info
OK, I'll check after I finish eating 🙂
@crimson ferry I gotta eat too, fwiw you can use a python tool called dpkt to decode the buffer into a buffer-like object: import dpkt dpkt.dhcp.DHCP(buffer)
not sure if the end option (https://tools.ietf.org/html/rfc2132#section-3.2) applies to all packets? but both DHCP servers I tested use the end opt.
@onyx hinge I'm redoing internal tick timekeeping and think I'll change ticks_ms to 1024 ticks per second
since most RTCs are 32.768khz
OK, that might produce some shallow bugs but I don't immediately have another concern
_mis because it changes from si to powers of 2? (joke)
I was considering it 🙂
but ya, basically that
or I could go all the way and just track at the 32768 per second rate
which 30us resolution or so
does that help carry more resolution to user calls like monotonic_ns()?
though I think Dan improved that situation recently, yay
ticks_raw or something like that?
it could also be worse since we're no longer using the cpu clock
ya, looks it'll be worse since current_tick is currently used by _ns
but that's the tradeoff for sleeping
it's a fair tradeoff
but if so, users will feel happier with 1/32768 as the fraction instead of 1/1024
fbofw everybody (including me, when I "know better") gives into the temptation to try to do precision timing from python code.
on average you can do nicely
🤢
haha
I ran across my antenna and receiver/amplifier for WWVB (1 symbol per second modulation), should make good on my stated goal of writing circuitpython code for it
but the stuff Limor has me working on, ulab, sensors & soon LEDs, is fun too so I feel satisfied at the end of a day
should I store raw ticks as two 32 bit ints?
good question. I chose volatile uint64_t but 2 ints maybe gives you better control over updating it
I'm thinking for the API
our hw doesn't all support atomic accesses for any types, let alone wide 64-bit types; too bad
adding tick stuff to supervisor/port.h
I somewhat like the unix style { tv_sec; tv_usec } style but that might also be stockholm syndrome
I also don't know how much 64 bit types affect ABI, code size, etc..
(old unix did tv_sec; tv_usec because there were no 64 bit types yet, among other reasons)
uint64 everywhere is probably easiest to maintain
64 bit return values go in r0+r1; passed in values can go in r0+r1 or r2+r3, so that's relatively efficient (no stack addresses required)
on arm eabi I mean
👍
// Get the raw tick count since start up. A tick is 1/32768 of a second, a common low frequency
// clock rate.
uint64_t port_get_raw_ticks(void);
// Enable 1/1024 second tick.
void port_enable_tick();
// Disable 1/1024 second tick.
void port_disable_tick();
so that is all a port needs to expose
and call supervisor_tick every 1/1024 when enabled
changing supervisor_tick from 1/1000 to 1/1024 is nothing anybody will notice
ya, that's my thinking too. it's all coarse timing anyway
and we know we should revisit it
this is me revisiting it 🙂
I mean, background tasks, you said supervisor_tick
ah, ya
I jumped to the former topic because that was on my mind when I introduced supervisor_tick
I guess background_tasks may need to enable ticks as well
if playing audio still works when you're done it's fine. If not, we'll fix it.
I need to know if we can sleep for the whole time.sleep duration or whether we need to wake up
- every 1/1024 seconds
is entering these kind of sleep states while playing back audio something that makes sense? Or is playing audio "more awake" than sleep mode is for?
audio uses interrupts anyways right?
mmmmm not exactly
it does in addition to the background task right?
there is an interrupt register, but it ends up polled
ah
so background task -> check interrupt pending register. if set, clear it and load some audio up
so it wouldn't wake us because the interrupt doesn't reach the cpu
right, the interrupt is masked
changing that is part of what I think we should move toward
kk
effectively, background tasks for audio would become the "bottom half" of the interrupt, if I have my terminology right
interrupt sets a bit/byte/word somewhere as a side effect, but also it would awake the CPU from sleep state
right
then you get to "background tasks" and actually do the stuff. that's what the top / bottom interrupt distinction is, right?
void mp_hal_delay_ms(mp_uint_t delay) {
uint64_t start_tick = supervisor_ticks_ms64();
uint64_t duration = 0;
while (duration < delay) {
RUN_BACKGROUND_TASKS;
// Check to see if we've been CTRL-Ced by autoreload or the user.
if(MP_STATE_VM(mp_pending_exception) == MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_kbd_exception)) ||
MP_STATE_VM(mp_pending_exception) == MP_OBJ_FROM_PTR(&MP_STATE_VM(mp_reload_exception))) {
break;
}
duration = (supervisor_ticks_ms64() - start_tick);
// Sleep until an interrupt happens.
// Clear the FPU interrupt because it can prevent us from sleeping.
NVIC_ClearPendingIRQ(FPU_IRQn);
if (NVIC_GetPendingIRQ(FPU_IRQn)) {
__set_FPSCR(__get_FPSCR() & ~(0x9f));
(void) __get_FPSCR();
NVIC_ClearPendingIRQ(FPU_IRQn);
}
sd_app_evt_wait();
}
}
where evt_wait waits for any interrupt
I'd rather not wake every tick if I don't need to
but I can
"it shouldn't be hard" to re-work nrf audio to actually be interrupt based so that sd_app_evt_wait would work.
ya, changing it from polling the interrupt bit to a flag set in the interrupt wouldn't be bad
at a high level that's all I'm imagining. But I .. don't know how to actally write / hook up interrupt handlers for arm yet 🙃
it's not too bad you just add a Foo_Handler function that the boiler plate defines as weak
and then enable it in the NVIC which controls what the CPU pays attention to
which the sleep actually ignores so that you can sleep when interrupts are disabled
Is NVIC arm-general or nRF-specific?
@crimson ferry We also may want to break for the pad opt. in addition to the end opt.
each peripheral also has interrupt control out to the nvic usually to
I am excited to see this, I know you proposed me to work on it at one moment a few months ago but I demurred due to other stuff on my plate. Thanks for picking it up!
np, it's new for me and about time we supported lower power
which sleep mode is the (initial) target?
i wish i remembered which mode that equated to in the SAMD sheet. seems like soooo long ago when HappyDay was working on it. 😄
it's the least power saving
i don't think we have any OnDemand clocks, which should be a good thing.
opens the data sheet
ya, we're good about starting just the things we're using
(I think)
18.6.1.2 (in 51)
I shooting for Idle
lol. just need to scroll a bit more:
18.6.3.3.1
Entering Idle mode: The Idle mode is entered by executing the WFI instruction
i'm still thinking USB is going to be unhappy...
1/6 is better than 0️⃣ ! hehe
yup yup. I'm just trying to do the basics for now
kk, time to cook and watch aae
👋
👋
@prime flower I haven't gotten too deep into the code, cursory understanding only atm, but let me know what else I can do... any time
LOL, Ethernet FeatherWing MAC address is DEADBEEFFEED
@prime flower Wiznet5k looking good! I'll keep exercising it and let you know if anything interesting shows up.
@prime flower Now trying to get eth & esp working simultaneously, having some hurdles (maybe due to eth CS pin 10 is the esp GPIO0??)
now u're playing with something I havent tried 🙂
good luck!
oo yeah there's probably a pin collision with ESP/ETH. You can rewire the CS pin on the Featherwing, it's broken out on the bottom
I'll desolder esp pin 10, I've soldered all of my wings so I can keep NINA updated 🙂
Oh, yeah, I'll do on the eth. What are the Mode jumpers for?
ah... 10/100, duplex, & negotiation - that's nice to talk to some old 10baseT hardware that will not auto-negotiate
@prime flower That did the trick, GPIO0 on esp needs to be available for resets, so either it needs to be moved off of D10 or the eth CS does. So... WIZNET5K and ESP32SPI can both be working simultaneously (stacked Feather M4 + Airlift FeatherWing + Ethernet FeatherWing) with their own sockets. Nice! 📶 (gist: https://gist.github.com/anecdata/cc4f091cb50fdb665bfe6586dd079999)
@slender iron does 'ticks' generate an interrupt each time or is it just counted in a register? Sorry, don't know your architecture well enough yet...
If the former then we may be storing up a problem for later when we want to support low speed low power operation, cos a lot of those implementations run from the rtc xtal....which means potentially all the CPU would be doing is servicing the interrupt (unless we implement tickles operation, which would be the best solution I guess)
Granularity isn't the same as resulution though, so for the low speed case we could make the per tick interval longer...
It's not used and ends up being confusing for folks.
How does this actually work behind the scenes to create a faster library?
So excited to see ulab make it into circuitpython master. How hard would it be to wire it into the teensy40 port (asking selfishly because that is the physical hardware I have here) 🙂 Thanks!
@solar whale do you want to impl. the last_rssi attr. in rfm9x, too?
@raven canopy the mic im using is electret so analog, the data is not in pdm so it probably decoded the signal into some constant value of 32760. As i said, im trying to sample the pin and just thought maybe pdmin library might be a hack for it but didnt work.
@wild juniper ahh. yeah, that would need something new. i don't think a polling loop on the Python side will be quick enough. would likely need something on the C side, akin to PulseIn.
by any chance are you familiar with zephyr? i found this adafruit post https://learn.adafruit.com/blinking-led-with-zephyr-rtos perhaps i can use this?
@prime flower it behaves a bit differently. I’ll look more closely at it to see if it is needed.
Guess my PyCon plans and CircuitPython interactive poster plans needs to be cancelled, got visa rejection 😦 I was excited to PyCon
@obsidian compass 😦 sorry to hear that
@prime flower in any case it should be consistent. I’ll look at later today
@solar whale Sounds good - dya have time to test an ethernet lib (need to soak it across diff. networks to crop up bugs) today?
sure -- is it in the latest PR?
I'll give it a shot.
@prime flower is the simpletest sufficient for testing it or is there something else you want me to try
Simpletest is good
PSA: library patches are about to pushed. patch only affects .github/workflows/build.yml, so shouldn't cause any conflicts on open PRs (maybe a couple). apologies if any email boxes get flooded. 
@prime floweru ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-15-ge98991fd7 on 2020-03-03; Adafruit Feather nRF52840 Express with nRF52840
import wiznet5k_simpletest
Wiznet5k WebClient Test
Chip Version: w5500
MAC Address: ['0xde', '0xad', '0xbe', '0xef', '0xfe', '0xed']
My IP address is: 192.168.2.32
IP lookup adafruit.com: 104.20.39.240
Fetching text from http://wifitest.adafruit.com/testwifi/index.html
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "wiznet5k_simpletest.py", line 30, in <module>
File "adafruit_requests.py", line 280, in get
File "adafruit_requests.py", line 242, in request
File "adafruit_requests.py", line 194, in request
File "adafruit_wiznet5k/adafruit_wiznet5k_socket.py", line 149, in connect
File "adafruit_wiznet5k/adafruit_wiznet5k.py", line 520, in socket_connect
RuntimeError: Failed to establish connection.
@solar whale Requests should work as-is
@solar whale Could you enable debugging eth(...,debug=True) and post the output into a GIST for me to look at it?
That's odd, it can resolve/connect but fails on the 2nd IP...
I have an NXP iMXRT1020 EVK, and I have have the CircuitPython 5.0.0 “.hex” for it. How do I get the CP software loaded on the EVK board? It has an OpenSDA drive window. If I try to drop the binary on either the EVK mode or Maintenance mode drive window, I get
error: The interface firmware FAILED to reset/halt the target MCU
type: target
Do I need some application to talk to the OpenSDA programmer on the board to load CircuitPython?
@raven canopy wdym PulseIn, like you can modify that code to achieve high frequency sampling of analog pin?
@lunar crown follow the instructions at https://github.com/arturo182/tinyuf2
@fallen anvil Will do. Thanks
I'm not sure if there are pre-built images around for the 1020, perhaps @indigo wedge can point you in the right direction...
You're in luck, I've got one here, I'll PM it to you. This is the first stage loader that will give you a drive that you drag/drop the uf2 onto
@solar whale Does ctrl+d /reloading establish the connection or same thing?
same thing
no official tinyuf2 releases yet
No worries, I've PM'ed him one :-)
@wild juniper like PulseIn where an interrupt is created to handle the AnalogIn voltage reading and stores it in a buffer. its likely not a trivial solution...
@solar whale it seems that server is throwing a RST flag back to the device...
@prime flower Probably unrelated, but my router doesn't show the MAC address of this device in its active clients listing (just blank), haven't seen that before. I could do HTTP, I can ping it, so not sure why that is.
Mine shows it in the DHCP server?
patches completed... thanks
!
@prime flower I see it in DHCP logging, and in active sessions, but just not in an active clients list. Doesn't seem to affect operation, but it's different than other devices for some reason.
@solar whale figured it out, pushed a commit
@prime flower is there something I should do differently
We were reusing well-known ports, which caused the server to RST. I switched to dynamic port numbers, randomly assigned and I'm running a test against it rn.
same result for me 😦
@solar whale Could I have a trace?
with debug?
Yes please!
@solar whale pushed a commit, just to see what the SNCR register is up to... I'm . unable to replicate this problem anymore.
ok -- will grab and rerun
@prime flower latest log https://gist.github.com/jerryneedell/48367e4c0cc05fe11d4ce2be4d5ac104
@solar whale weird, it sent the SYN but didn't rx the syn/ack from the server. then it timed out.
Can you connect to that IP from your computer?
@prime flower I need to go walk the dog.... whwn I get back, I can try another MCU if you want -- what are you using?
Feather M4 + Ethernet Wing
I cn try taht right now
@prime flower same result on feather_m4 -- tried you latest comit -- same -- just a lot more ```SN_SR: 21
SN_SR: 21
SN_SR: 21
SN_SR: 21
SN_SR: 21
SN_SR: 21
SN_SR: 21
SN_SR: 0
*** Closing socket #0
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "wiznet5k_simpletest.py", line 30, in <module>
File "adafruit_requests.py", line 283, in get
File "adafruit_requests.py", line 245, in request
File "adafruit_requests.py", line 194, in request
File "adafruit_wiznet5k/adafruit_wiznet5k_socket.py", line 149, in connect
File "adafruit_wiznet5k/adafruit_wiznet5k.py", line 522, in socket_connect
RuntimeError: Failed to establish connection.
dog is pacing --- be bak in an hour or so...
I'm timing out and need to head to lecture, will look at this more when I get back.
@grim jetty I believe ulab is enabled on the imx port
oh I'm wrong. should be easy to enable: https://github.com/adafruit/circuitpython/pull/2583/files#diff-db4034e6d9744d9a010e009badc12211R72
@fallen anvil my goal is to not require an interrupt every tick unless something is "active" in the background. in that case I'll interrupt every 1/1024 of a second
every 32 "ticks"
@onyx hinge one thing I saw on SAMD was that with the RTC ticking at 32.768 it can't adjust itself for accuracy
Thats cool, so it's resolution rather than accuracy. No prob with that
@slender iron @grim jetty I think ulab is not enabled yet on the ports besides atmel-samd and nrf
it should be trivial to do, we would love to see a pull request. It is also probably not enabled on stm32 at this point.
Ok, yes just one line addition to ports/mimxrt10xx/mpconfigport.mk: MICROPY_PY_ULAB = 1
I tucked that at the end of the file, but I suspect someone somewhere has rules for how best to organize the contents of this file so maybe that person should insert this in the appropriate location? Anyway, ulab seems to be running on my teensy40 with that one line change (and make clean) Thanks!
Thanks!
On Thu, Mar 5, 2020, 6:31 AM Dan Halbert notifications@github.com wrote:
Merged #2681 https://github.com/adafruit/circuitpython/pull/2681 into
master.—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/adafruit/circuitpython/pull/2681?email_source=notifications&email_token=AAB5I44RPRZYGUUY42UVOU3RF6ZTNA5CNFSM4LCDSBMKYY3PNVWWK3TUL52HS4DFWZEXG43VMVCXMZLOORHG65DJMZUWGYLUNFXW5KTDN5WW2ZLOORPWSZGO...
For stable 5.0.0, os.uname() reports (sysname='samd51', nodename='samd51', release='5.0.0', version='5.0.0 on 2020-03-02', machine='Adafruit Feather M4 Express with samd51j19')but boot_out.txt has Adafruit CircuitPython 5.0.0-beta.5 on 2020-02-05; Adafruit Feather M4 Express with samd51j19. Is this a known thing, or local-to-me?
@slender iron I did a little write up about my Little Red Rover with a few pictures. It is on my tech blog at https://hybotics.tech/.
Robotics, Gadgets, Circuits, Toys, Radio, and other Tech
@timber mango awesome!
@crimson ferry I think we have logic to prevent writing boot_out.txt everytime that may be failing
As another data point I just flashed 5.0.0 onto an Itsy Bitsy M0 that was previously on 4.1.2 and I am seeing the correct version in bootout:
Adafruit CircuitPython 5.0.0 on 2020-03-02; Adafruit ItsyBitsy M0 Express with samd21g18
@grim jetty I don't know about best organization either. If you're on github, send us a PR for sure!
I don't think we have a standard organization. I'd just mimic the other port location
is switching from bash to zsh likely to screw anything up regarding my circuitpython development?
no, I use fish
the one thing I've found is that inline environment variables are different
Hello @tannewt, I completely agree with you, I don't like the concept as it's the same board.
But CircuitPython lacks a way to generate "flavors" of one board.
Why I need it for the Nano IoT is because its RAM and Flash limitations.
Not possible to import all the libs needed to use LSM6DS in RAM, we need them as frozen modules.
But frozen module take place in the flash with few space left for user code, so LSM6DS + ATECC libs could not be the best thing for everybody.
My "vision"...
Do we need it outside of DigitalInOut? The GPIO clocks are only used by it I'd think.
PixelBuf speeds up RGB pixels by using C to do math on all the pixels such as the pre-transmit application of brightness. The libraries need to inherit from PixelBuf in order to get this speed-up though.
@lone axle I just flashed two Feather M4 Express, an ItsyBitsy M4, a Feather M0 Express, and a Circuit Playground Express with 5.0.0 and the 0305 libraries. They all show the correct version, board, and chip in the REPL.
Hello @tannewt, I completely agree with you, I don't like the concept as it's the same board.
But CircuitPython lacks a way to generate "flavors" of one board.
It lacks flavors because we don't want to have different flavors for a single board. (The only one we do is the CircuitPlayground Express and it is hopefully the last one.)
Not possible to import all the libs needed to use LSM6DS in RAM, we need them as frozen modules.
But frozen module take place in the flash with ...
@slender iron @idle owl What is the easiest way to get into working on the lower level stuff in Circuitpython? I have this itch... 🙂
I do not have much hardware, so am not able to test much code. I will only work on what I can test.
@timber mango maybe here? https://learn.adafruit.com/building-circuitpython as a start at least, for the basic setup
We should load each library in the unix port and measure it's impact on the heap. Many of our drivers are larger than they need to be because they include functionality that isn't used.
One example is the LSM6DS which has RWBit objects for bits that aren't used by the driver.
the building circuitpython guide is the best place to start
as you need to debug the internals you'll need a setup similar to: https://learn.adafruit.com/debugging-the-samd21-with-gdb
I tried stripped down the libs (by exemple remove spi_device.py from BusDevice as we just need i2c_device.py) , but we don't gain a lot, and will need to maintain and synchronize stripped-down lib forks just for this board, lots of work for tiny gains.
Did you try stripping down LSM6DS? I think there are a lot of unnecessary RWBits that can be commented out and merged into mainline.
@tannewt no you need them for anything that uses a pin, they're included in every ST msp function for every peripheral.
@ionic elk what do you mean by msp?
an ST acronym, sorry. microcontroller support package? Basically the default setup function they provide for every peripheral
we don't use them since they aren't very configurable
But yeah you can't use pins for any peripheral unless you turn on the port clock.
ok, looks like the GPIO manages functions
I think in some cases the mux is separate
Yeah that's why I need a GPIO setup function in every module
👍
You have to set the mode to one of the ALTFN options.
Ok, sounds good to factor it out into microcontroller/Pin.c. Could it be in claim_pin?
No I haven't tried it, as I'm not an Adafruit paid developer, I'm just looking for a working and simple solution
Probably? I can't think of any edge cases off the top of my head where that wouldn't be enough.
@slender iron want me to make an issue for this GPIO thing? It's a simple fix but I'd want to test it thoroughly.
"we can worry about sleep later" sleep is important, @slender iron
I'm still pretty hype for low power so I can port my alarm clock to the NRF52 on circuitpython
Ok, I've taken a glance this and I agree we need to freeze some of these libraries in. The SAMD21 is just too small to fit both ATECC and LSM6DS in memory.
I still don't want multiple versions for a single board. Multiple versions are a long term support burden that I'm not willing to commit to. So, my preference would be to always freeze these two libraries and bus device in because both chips are on the board.
There is no need to freeze the binascii library in because the built in ver...
@ionic elk I think "lower power" is a better term. it still won't be as low as it can go
