#circuitpython-dev
1 messages · Page 409 of 1
so it's like (2.5 to 6 V) ---> [AP2112K] ---> (3.3V)
Ok got it
So that wouldn't be needed if a chip was able to take 2-6 on its own?
The chip would do the magic instead of needing the regulator?
yah. if the ADXL allowed for an input range, wouldn't need.
but it's pretty typical for the chips (like ADXL) to be fairly limited. it's expected there will be some kind of power circuity upstream.
Ok good to know
and just for general design - so the AP2112K helps "protect" the main chip
Ah right good call
or, as another example, people have zapped their chips by accidentally putting the input power on the 3.3V pin
Got it
in that case, they bypass the regulator, and, well, like datasheet says, 3.6V abs max
or typ max....looks like 3.9V is abs max
The datasheet I have up said 3.6 or something.
Oh
I see
typo.
Not sure which to believe.
?
absolute max is usually a "you can do this but not for long"
Fair enough.
Good to know.
I mean, it's ok because the board protects it from me doing something dumb. 🙂
I mean you could bypass the regulator and still do it, but now you have to work for it 🙂
Hah! A bit beyond me, I think. I could rip it off the board, but I doubt that bypasses it. 😄
sry. context switched away.
there's like two flavors of specifications "typical" and "abs max"
they can look similar - various things called out with ranges
the "typical" is what you would use to actually run the device
the "absolute max" are values you never want to apply
so you shouldn't go above 3.6V for supply voltage
Ok, I'll leave that as is in the guide
and at 3.9V you get blue smoke monster
Understood
use the "typical" range values for any kind of guide verbiage
Tested and confirmed much improved behavior. Should be fine for most typical use cases. As noted, it can still go into Safe Mode if really pushed (many very-fast sequential pings).
@tulip sleet Thanks for the httpserver! Quick test worked well -- now I need to come up with something to serve!
I was looking at the Adafruit CircuitPython Bundle drivers, I see some of them are set up to do I2C only, and then others have a class defined for I2C and SPI so it would work for both. I'm thinking about updating some of the sensors that are I2C only to SPI and I2C, is there a "gold standard" to design to for that or just use some of the other drivers as references?
@idle owl have you encountered this again ? (I do)
I don't think there is an issue open for it, is there ? (it's so hard to replicate)
#circuitpython-dev message
Not sure I've had it happen again since I mentioned it there, but it happened before that too. I can't replicate it, reset always fixes it, but every time it confuses me deeply because I think it's me not noticing it resetting or something, and keep doing it manually before realising I need to reset the board.
I don't think I filed an issue, and if I did, I feel like it might have been closed.
Again because it's fixed with reset, I think I didn't think about filing an issue for it. Or no one told me to.
Jeff seems to have hit it too, and it looks like it also impacts keypad
#circuitpython-dev message
maybe an issue with background tasks running
That or I assume my code isn't working because changes I make don't propagate because it doesn't reload.... that's the worst.
So I keep editing the code and nothing is working. And then I have no idea which iteration was going to work. Because I think I tried everything.
I add a print(time.monotonic()) when i'm not sure if the code didn't reload or it just printed out the same thing too fast
I'll open an issue, to at least document it
Sounds good.
I have to realise it's not reloading before I think to add prints to my code 😄
Drives me bonkers.
But it doesn't happen often enough for me to remember to think about it.
well, as long as the sensor actually provides SPI, you could try. But sometimes we didn't do SPI because it was flaky or something like that. If there is an Arduino SPI version, that might indicate we just didn't get around to it.
Since around 7.0 I have noticed on SAMD21 boards that sometimes the autoreload doesn't not happen.
It is hard to reproduce and seems to happen randomly. But once the boards stops running autoreload:
- saving files works, but does not trigger autoreload
- ctrl-C ctrl-D works, but does not bring back autoreload
Only a hard reset seems to bring it back.
I have seen the board enter that bad state:
- as soon as I plugged it in.
- after doing some file operations from the host side.
- aft...
FWIW, Unit 2 got the bug again
monotonic_ns JUMPED MORE THAN A DAY! 524287829284670 786431999938977 : 5503672 loop_count: 2486214 state_clock: 2486213
monotonic_ns MOVED BACKWARD! 786431999938977 524288017272958 : 5503673 loop_count: 2486215 state_clock: 2486214
In [47]: (786431999938977 - 524287829284670) / 1_000_000_000
Out[47]: 262144.170654307
In [48]: (524287829284670...
im struggling to get a good workflow going on the esp32-c3 (no usb)
super annoying thing right now is that i can't ctrl+c out of a loop or a sleep
I'm a fan of print(f"{time.monotonic_ns()} {some_other_stuff}", end="\r") so stuff doesn't go scrolling off into oblivion
While testing my new board I found out board.SDA and board.SCL are not yet defined.
To be fair I didn't also find them in the official pinout diagram from Lilygo.
ESP32 can use any output capable pins for I2C
We don't define board.SCL and board.SDA pin names unless there are pins labeled as such on the board, or there are very clearly defined defaults.
CircuitPython version
Adafruit CircuitPython 7.2.0-alpha.1-364-g2bf5a1ee4 on 2022-02-09; Raspberry Pi Zero W with bcm2835
Code/REPL
import board
from digitalio import DigitalInOut, Direction, Pull
import time
# switch
switch = DigitalInOut(board.D19)
# if I don't do this, it won't pull the input up
#switch.direction = Direction.OUTPUT
#switch.value = True
switch.direction = Direction.INPUT
switch.pull = Pull.UP
while True:
print(swit...
this is a good trick and I wish I remembered it more often.
(for those unfamiliar, the "\r" code sends the cursor back to the start of the current line, in most terminal programs)
so this will basically continually overwrite the same line of printing rather than make new lines and eventually scroll when there are "enough"?
yeah it's nice for a single line display
oh cool trick
there are interesting terminal codes too, that will work in serial apps and the other day somebody asked about clearing the screen, and since I test on a clue, I noticed it works even in displayio (when showing the REPL)
print("\x1b[2J\x1b[H")
(that is 2 codes, "clear" and "back to top", the second one is required in a terminal app or the cursor stays at the bottom)
Well, the title already says it. I.e. I'd like to have this for audiomp3 and other modules.
Patch for README Documentation section is done! I'll do a final passthrough on everything but I should have fixed all the bugged patches already
There's probably only a handful that escaped, as a basis, I managed to 100% inspect most patches
I see anecdata has a draft PR for the ESP32-S3 32/8 GB. Last week that’s the only version I could procure off the Adafruit store. I’m thinking of getting started trying out the new chip. Before that gets merged, do you know if the other flavors can run on the 32/8 board?
Happy to be on the review team 😊 just submitted my first review, but was hoping someone else could also review: https://github.com/adafruit/Adafruit_CircuitPython_VL6180X/pull/23
Thanks for the clarification.
@idle owl and @trim elm just 100% inspected, everything in the Bundle has that link in the existing Documentation section!
Thank you so much!
My absolute pleasure
@proven garnet Turns out Adabot can absolutely fix the readthedocs.yaml issue, so we don't need you to figure out automating that. We can't do it immediately because Eva's in the middle of something, but it'll get done soon. Wanted to let you know we tested it, so you weren't still wondering whether you were going to be asked to do it.
Perfect! Thanks for the heads up!
@idle owl this looks interesting for library work. Maybe you know about it already: https://github.com/mtoohey31/gh-foreach
Hmm, that is interesting. It's at least ringing some bells...
Do you have a GDB setup? Connecting over GDB and getting a backtrace is a great way to debug a freeze.
I imagine RP2040 is tricky because it's loading code, USB data and audio data all from the flash.
@tulip sleet Do you know what would cause this error on a Feather TFT with simple code for the battery monitor on 7-alpha? ```Connection lost (read failed: [Errno 6] Device not configured)
Use Stop/Restart to reconnect.```
I've never seen it before.
I wonder what the state of these variables are: https://github.com/adafruit/circuitpython/blob/main/supervisor/shared/autoreload.c#L36
The code is SUPER simple. I mean, it's not "hello world" but there's very little to it.
This is someone else having this issue.
It's not posted, hold on, let me upload it here.
The conversation is in #help-with-circuitpython
that is not a CPy error, it looks like it's their terminal program or editor whatever that disconnected. Maybe CPy crashed
how are they connecting?
Ohhhhh.
Do you have any experience with C on the Pi? The code for setting pulls is here: https://github.com/adafruit/broadcom-peripherals/blob/08370086080759ed54ac1136d62d2ad24c6fa267/broadcom/gpio.c#L24
Called from https://github.com/adafruit/circuitpython/blob/main/ports/broadcom/common-hal/digitalio/DigitalInOut.c#L137
I'd love help polishing up this port.
Please subscribe to #4106 for updates.
Update, I tried flashing my ESP32-S3 version N32R8 with the N8R8 version but didn't get a CIRCUITPY drive.
pip install esptool
python3 -m esptool --chip esp32s3 write_flash 0x0 ~/Downloads/adafruit-circuitpython-espressif_esp32s3_devkitc_1_n8r8-en_US-20220210-c234d92.bin
Awesome! Thanks a bunch!
I tried the 8/8 8/2 and got nowhere. I suspect it's something more fundamental in accessing the flash chip.
Thanks, this is my first time trying this chip, so wasn't sure if it was my setup problem. Thanks for confirming.
last time I checked,
and mouser had the N8R2 --> mouser has N8R8; Digikey has N8R8 & N8R2
@idle owl @slender iron @onyx hinge I am make draft release notes for 7.2.0-alpha.2. It's been too long. alpha1 was Dec 28
Was just going to say the same, I just got a N8R8 last week but it's still in the box
The -S3s seem to be very compatible, and the extra internal SRAM is great for some features
This allows you to connect to GATT services on the other device.
It also adds connection initiation (GAP central).
More progress on #5926
This is the only time I’ll ever say that I ordered too much Flash RAM.
I did a proof of concept to get native modules to work in CP. There were a few changes required to get everything compiling properly and updated after all the MP merges. What is in this PR are basically bug fixes in code paths not ran during normal CP operation. They are not encountered unless the native mpy flag is enabled.
To enable the CIRCUITPY_ENABLE_MPY_NATIVE needs to be set to 1.
This change does not enable native modules in any build.
Thank you!
I'll look into getting GDB set up for RP2040. I assume someone's getting their interrupt missed.
@slender iron which PR's would you like in alpha.2? I will certainly add the PIO FIFO doc one, and can do a quick review of the S3 GATT support.
@onyx hinge anything you want in alpha.2 that hasn't already been merged? Initial floppy code?
Nothing I’m working on needs to be rushed in. Absolute newest is fine for my stuff
Docs don’t match releases anyway
@proven garnet If you're around, and up for it, I have a software-only quickfix for you to do.
Oof. I can't remember, do we need to automock micropython or is my local setup simply not right for building Sphinx?
No I think it's my local setup.
Ugh. Now it's throwing an error on bus device.
Which is definitely latest.
Oh, it's related to typing. Hmm.
hey all, I dont want to spam, I think I was in the wrong channel. Has anyone loaded the bbq10keyboard library for circuitpython?
@lone axle Is there some trick to making Sphinx find the typing or circuitpython-typing modules?
It's failing to build with bus device included because of a thing imported from those modules.
Locally, that is. I don't know if it will work remotely.
I'm into it!
I'm not aware of a trick. Don't recall seeing any failing for that reason. I think typing is built in to CPython starting at a certain version, but I'm not sure which. What version of python do you have locally?
For libraries?
3.6.8 apparently.
Relic from before we upgraded Pylint.
Yeah.
#help-with-circuitpython is probably best for general help with circuitpython usage and libraries. I have used that library successfully before though with the BB keyboard featherwing.
Yeah, it should just just pull it once it's exposed.
Oh is it before it was exposed?
thanks @lone axle , this is my first time working with the feather m4 / circuitpython at all, and I dont know how to load that particular library
I swear I sorta know what Im soing lol
*doing
This venv doesn't have latest Python. Is that the problem?
I think it used to be just documented but I don't know if anything in the _typing module existed beyond documentation but I don't know my way around the core
Or if it existed at all
I am on 3.8.10, this page seems to think that typing should exist as far back as 3.5 though: https://python.readthedocs.io/en/stable/library/typing.html
I can import it
Oh, typing or _typing?
What is the error you're getting?
autodoc: failed to import module 'adafruit_adxl37x'; the following exception was raised:
Traceback (most recent call last):
File "/Users/kattni/.virtualenvs/pylint/lib/python3.6/site-packages/sphinx/ext/autodoc/importer.py", line 154, in import_module
__import__(modname)
File "/Users/kattni/repos/Adafruit_CircuitPython_ADXL37x/adafruit_adxl37x.py", line 31, in <module>
import adafruit_adxl34x
File "/Users/kattni/.virtualenvs/pylint/lib/python3.6/site-packages/adafruit_adxl34x.py", line 34, in <module>
from adafruit_bus_device import i2c_device
File "/Users/kattni/.virtualenvs/pylint/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py", line 26, in <module>
class I2CDevice:
File "/Users/kattni/.virtualenvs/pylint/lib/python3.6/site-packages/adafruit_bus_device/i2c_device.py", line 65, in I2CDevice
self, buf: WriteableBuffer, *, start: int = 0, end: Optional[int] = None
NameError: name 'WriteableBuffer' is not defined
Oh, typing not the underscore version...
Yeah _typing not found from the regular Python prompt.
Keep trying to use CTRL+C or D to break out of the Python prompt. Does not work. 😄
For what it's worth the bus device library is seems to have failed CI for the same reason
from circuitpython_typing import WritableBuffer ?
Oh wait it is nevermind...
I'm not sure how to make that apply to this. I'm trying to build Sphinx docs, and it's not finding the imports. I can't find anything to install in the env.
circuitpython-stubs
Ohhhhh...
I added circuitpython_typing and _typing to mock imports
Same error. Bleh. with circuitpython-stubs installed
I'm am not sure exactly were _typing is coming from but that import does succeed for me in a CPython REPL:
from _typing import ReadableBuffer, WriteableBuffer
Oof ok.
I tried, it failed 😕
Beforehand I was getting the same error as you
Ok
Not sure why it's not needed everywhere though.
Tried from _typing import ReadableBuffer, WriteableBuffer in Python 3.9, same thing, not found.
So the version isn't the issue.
Sphinx wants this stuff installed locally. So If I can figure out where it's coming from, I bet it'll pass without automocking.
_typing was replaced by circuitpython_typing
_typing is the legacy circuitpython_typing library name, or am I misunderstanding
Where is circuitpython_typing?
Via the magic of ctrl+click inside of PyCharm it's looking like my _typing is coming from Adafruit_Blinka_Displayio
In the core?
Yup!
hmm I have that installed, let me update it
That got me past that error!
I force-reinstalled Blinka too, and it didn't fix it
it used to just be used in the core doc building, but all the annotations added recently started to need it
Now I have a fun new error.
Interesting. I would think we'll ultimately want to get it resolved so that the import can work from Blinka rather than Blinka_DisplayIO. I'm not sure why that isn't working for you.
/Users/kattni/repos/Adafruit_CircuitPython_ADXL37x/adafruit_adxl37x.py:docstring of adafruit_adxl37x.ADXL375:16:Inline interpreted text or phrase reference start-string without end-string.
At the beginning?
In the CI yeah
Wait, it's happening on the lib file though.
Oh maybe I did the link wrong
No, it's correct.
The change from _typing to circuitpython_typing was fairly recent right? At some point we'll go back and remove the fallback import in things like this?
try:
from circuitpython_typing import ReadableBuffer, WriteableBuffer
except ImportError:
from _typing import ReadableBuffer, WriteableBuffer
If so I wonder how long we need to keep the fallback? Until core and Blinka are both updated / published with circuitpython_typing at least, any longer than that?
Yes in another major version, we'll remove it.
Or thereabouts anyway.
That's how we usually do it.
What's the docstring look like for the library?
I think we could drop _typing now, if it depends on blinka, because blinka is fixed
`adafruit_adxl37x`
================================================================================
A CircuitPython driver for the ADXL37x family of accelerometers
* Author(s): Kattni Rembor
Implementation Notes
--------------------
**Hardware:**
* `ADXL375 - High G Accelerometer (+-200g) <https://www.adafruit.com/product/5374>`_
**Software and Dependencies:**
* Adafruit CircuitPython firmware for the supported boards:
https://circuitpython.org/downloads
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
* Adafruit CircuitPython ADXL34x: https://github.com/adafruit/Adafruit_CircuitPython_ADXL34x
"""```
Tried taking out the (+-200g) no change
I was guessing.
I'm not familiar with all of the different syntax characters. Are back ticks ` to denote code? maybe it doesn't like the URL being inside of them?
It's apparently supposed to have them? I'll try removing them. I think it's what makes the text be the link.
Versus displaying the text with the link next to it
Yeah I think text_ is a hyperlink
backticks with an underscore are links. sphinx syntax is ridiculuous
Indeed.
Thanks discord for formatting 
Google is finding nothing for this error. It's finding "inline literal" errors, which is not this.
maybe worrth trying without the entire line:
* `ADXL375 - High G Accelerometer (+-200g) <https://www.adafruit.com/product/5374>`_
If it works without then it at least tells us we are looking for something in that line.
No change.
wait
Nm. My Sphinx was way out of date, but that's not the issue.
Same error with latest.
maybe needs a blank line between these:
* Adafruit's Bus Device library: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice
* Adafruit CircuitPython ADXL34x: https://github.com/adafruit/Adafruit_CircuitPython_ADXL34x
total guess but they are the only ones without blank lines around.
Upload. It's not pushed yet in it's current form. That's what I was trying to do, heh.
It looks like every other library. So it's something stupid.
@proven garnet The software quickfix I was talking about earlier is that cookiecutter has some issues that need updating. And I guess watch for the last few libraries having the issues in them. We can discuss after I sort this out.
I get a different error running sphinx on that. Why does it have an import line for itself? import adafruit_adxl34x is importing the file that it's inside of I think?
No
That's three FOUR five, this is three SEVEN five.
Subclassed another version of the chip.
It's not importing itself.
Er, 34x and 37x, but yeah.
Sure thing!
Ahhhhh I am in the wrong repo in that case 😳
It's brand new, it's not pushed.
Well, the init is pushed from cookiecutter
but the actual code and todo fixes are incoming.
If I can get Sphinx to build, anyway.
I could push it not working and give you the branch name
Would that help?
What the..... if I delete the whole docstring it fails with the same error on the same line. Which is now into the code section without the initial docstring....
I'm thinking the docstring is a red herring. And it's something else making it fail. Sphinx is a giant jerk.
I think it would possibly. I'm attempting the build locally now as well. I am caught up now and seeing the same error so I may have everything needed (I copied your file from above into my local repo)
OK let me push it and you can get it from my fork.
Oh I may have found it
Also, just found this which may be of interest to people, haven't used it yet though:. https://github.com/tkellogg/dura
Found which?
Once this is done you can define your `board.I2C` object and define your sensor object.
If using the STEMMA QT connector built into your microcontroller, use `board.STEMMA_I2C().
Ooo that formatting is not the best, those lines are missing a tick
Needs doublecticks, because it's trying to use it and can't find it.
PASSED
@lone axle Nicely done!
🎉
Thanks for the super clear error, Sphinx. Uff.
Thanks all!
Lib still runs on the board too! 😄
@proven garnet Ok, about cookiecutter. First: In that initial docstring in the library.py file, this section ```Software and Dependencies:
- Adafruit CircuitPython firmware for the supported boards:
https://circuitpython.org/downloads``` - the URL is still to GitHub releases in cookiecutter. It should be circuitpython.org/downloads as in my codeblock.
Second: the README has the Documentation and Contributing sections backwards.
So we want it to match all the changes you made, but right now they're swapped.
Those are the issues I found in creating this library.
It's an Adafruit library, so I think it only needs to be changed for Adafruit lib generation, not the other options.
OOF. lol. All that, and Sphinx failed remotely.
It's failing on not finding circuitpython_typing.
We need to fix it so that comes with Blinka, and not the DisplayIO version.
@lone axle Why isn't it coming from Blinka? Feels like that's the first step before removing the try/except in all the libs.
Sounds good to me! I'll take a look when I get a chance and ask probably a few questions to make sure I understand
I can automock it for now, but this should work.
Sounds good! I'll get back to you when I can if it's over the weekend.
That's what I had to do for Bus Device, but it sounds like there should be another way to address it
Blinka is updated. Latest release was 5 hours ago. So the circuitpython_typing module should be in it.
I think only a handful of libs use it for typing so far so it'll be easy to fix if we do
I'm confused, but I don't get Blinka super well.
I'm not sure I would think it would find this one: https://github.com/adafruit/Adafruit_Blinka/blob/main/src/circuitpython_typing.py
Right that's what I'm thinking
I can try to tinker with it some tonight to see if I can understand what is going on. I'll set up a test env to start fresh. My main python environment is all sorts of crazy because I tend to use it rather than venvs for most things and always just install everything I need.
sometimes I'm still amazed at how things can just work in CP
Wait....
Latest is 6.20.2, I did a force-reinstall, and it's still at 6.15
circuitpython_typing is in 6.20.0
pypi.org has the right version
maybe pip uninstall Adafruit-Blinka then install again?
Remotely it is using the right version though.
Downloading Adafruit-Blinka-6.20.2.tar.gz (155 kB)
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 155.9/155.9 KB 11.9 MB/s eta 0:00:00```
Still 6.15....
weird... you were python 3.6.X right? I wonder if this line in setup.py is preventing it from grabbing the newer ones? https://github.com/adafruit/Adafruit_Blinka/blob/main/setup.py#L48
That was what I was starting to wonder....
Give me a bit to fix that issue first.
Oof. Have to recreate the env. Oh well.
TIL how to remove a virtualenv made with virtualenvwrapper.
Blinka is happy now.
Now I get to fight with this pip freeze file I made, apparently. Failed on one lib.
OK, so.... I uninstalled displayio.
Ran sphinx now that everything is updated.
And it passes.
So I'm back to being confused.
wait
Yeah. It passed. I was in the wrong directory, but it's passing in the right directory as well.
Glancing through CI, my versions match the remote versions. This is frustrating.
@lone axle I'm up to date, and passing locally without adafruit-circuitpython-blinka-displayio installed.
Nice, glad to hear because that was quite a puzzler to me.
Remotely isn't passing though
But at least it's coming from Blinka as it should locally
@lone axle I guess it's reaching time to put it off until next week. Can we dig into this again on Monday?
Yep, I'll take a look at the actions log and poke around some as well.
Ok, thanks. I'm going to comment on the PR, and tag you in.
@lone axle Today is Thursday, not Friday.
🙄 I mean tomorrow, not next week.
All day I thought it was Friday. Oof. Even had a repeated Thursday thing today, and still it didn't click.
it's actually Friday in here already ;-)
😂 Well played.
way ahead of you
@idle owl what is the range of inputs for rainbowio.colorwheel? 0-255?
I believe so yeah.
256, so 0-255.
cool cool. and it works ok if I give it something larger
I'm using it to give a reasonable color for broadcastnet bridge flashes
so it flashes a *hopefully unique color for each sensor it hears
Ah nice.
neat, very handy
I tried just using some bits from the address and the colors weren't very distinct
colorwheel is working nicely for it
CircuitPython version
Adafruit CircuitPython 7.1.1 on 2022-01-14; Adafruit Rotary Trinkey M0 with samd21e18
Code/REPL
import rainbowio
i = 250.0
while i < 258:
print("i:%3.2f h:%6x" % (i, rainbowio.colorwheel(i)))
i = i + 0.5
Behavior
code.py output:
i:250.00 h:f0000f
i:250.50 h:f1000e
i:251.00 h:f3000c
i:251.50 h:f4000b
i:252.00 h:f60009
i:252.50 h:f70008
i:253.00 h:f90006
i:253.50 h:fa0005
i:254.00 h:fc0003
...
is @devout jolt snooping on our conversation?
I'm on esp trying it
Hey, Tod 🙂
That's excellent.
I honestly didn't see this. I was trying to figure out why this morning I was getting flashes of white when doing simple color cycling. Took me a while to characterize and test out a fix.
Wait.... on which board? Is it that bug I found ages ago that we never managed to figure out?
oh I guess don't use it with floats ?
>>> hex(colorwheel(255.5))
'-0x1'
>>> hex(colorwheel(255.9))
'-0x2'
Or something totally different.
No it doesn't like floats 🙂
then perhaps its method signature should not be mp_float_t
Oof. That's my bad. That was the first real C I ever wrote.
This is the bug I'm referring to: https://github.com/adafruit/circuitpython/issues/3835
do those examples use colorwheel?
Nope, didn't exist at the time, afaik.
I think it's a different bug then
Ah ok.
@devout jolt do you have a fix already?
depends: should the fix be change the method signature to mp_float_t or keep it float input and put the guard in?
I'd switch it all to int
Ah Tod's on it. I will not fix it then. 😄
I can do that if you want. Easy fix and get me into submitting PRs to CirPy
Sure!
okay on it
what is this supposed to do? pos = pos - ((uint32_t)(pos / 256) * 256);
I'm uncertain. I am pretty sure I had help with this. I don't know C. Heh.
ah! is that getting the remainder?
I translated from Python, obvs.
the python was in pixelbuf right?
right, it was split out
Maybe I copied from that, not translated from Python.
yeah pos is like a remainder into a 3 sector space of hues
ranges from 0-85 (1/3 of 256)
right.
I think it's 0-255
modulo?
Right, but 256 options including 0.... right?
oh yes sorry , I was referring to the post-math pos that the conditionals act on
👍
pos = pos - ((uint32_t)(pos / 256) * 256); has the benefit of keeping pos a float
does % work on floats?
@idle owl you moved that code but didn't write it
I believe that to be correct. I may have modified it with help though. Jeff was helping me at some point with something related to it, may have been the initial move.
But also remember Limor wanted me to try adding color constants to see how big it would get. Jeff helped with that, so that might be what I'm thinking of.
modulo (%) is a more common way to get a remainder
(Spoiler: it wasn't worth the extra space.)
ah I think that method of doing remainder was for some tricky reason
For sure, I use it for solid colors all the time. But Limor liked the idea of RED and BLUE etc. I did too, but it added more space than was worth it, we decided in the end.
ya, strings take up a lot of space
no
Also pretty sure I lost all that work in one of my many redos of the local copy of the repo, heh. So I'd have to redo it if we ever decided to add it. Which is actually ok with me, because it means learning all of that again.
@slender iron https://godbolt.org/z/4qoaqYKKn
maybe add -mfpu=fpv4-sp-d16 -mfloat-abi=hard
Automated website update for release 7.2.0-alpha.2 by Blinka.
New boards:
- diodes_delight_piunora
- raspberrypi_zero
- raspberrypi_zero_w
- espressif_esp32s2_devkitc_1_n4r2
- unexpectedmaker_pros3
- espressif_esp32c3_devkitm_1_n4
- espressif_esp32s3_devkitc_1_n8r2
- adafruit_qtpy_esp32s3_nopsram
- unexpectedmaker_tinys3
- unexpectedmaker_feathers3
- adafruit_esp32s2_camera
- espressif_esp32s3_devkitc_1_n8r8
- espressif_esp32s3_devkitc_1_n8
- waveshare_rp2040_zero
New languages:
- tr
Of the two fix options described in https://github.com/adafruit/circuitpython/issues/6015, this seems like the more-compatible fix. It guards against the overflow that was happening but doesn't change the method signature. (Which would break all existing code that is sending a float, something I do a lot with stuff like colorwheel( time.monotonic() * 20 )
esp-idf 4.4 improved internal SRAM memory allocation from what I could see. Pre-4.4, applications would run down the largest free block by powers of 2, and due to fragmentation it could quickly get down to into 3-figures (e.g., 256 bytes), and would sometimes run out of memory. Post-4.4, allocations seem to be more finely-grained, and largest free block stays in healthy 5-figure territory even for demanding applications on the ESP32-S2.
Here's an example of idf memory used by a wifi `Mon...
I have not had a lot of success getting gdb to work well with the RP2040. I have tried mostly with the J-Link.
I have a question about circuit python memory. How much stack does it require? I am guessing it uses a lot of heap memory. What is the min required?
32k ram is the smallest mcu we're on now
the stack varies by cpu too
the rest is given to the py heap
Hi!
I'm going to use a few neokey boards, controlled through a controller (duh) (thinking magtag since I already have one) and I've got a few thoughts;
1, how would you deal with sticky keys? Such as making a keypress register as a non-resetting latch? Would be nice to set profiles, have the controller profiles be set by a rotary encoder and have the layout changed based on the profile. The non resetting latch behaviour would be used in one of those profiles as a controller for a game I like playing.
2, I know this isn't really in the scope of Circuit python but, I assume the i2c protocol can't handle more than 1 keypress at a time, correct? Or does the controller on the boards make this possible? Just going through the possibility of making a fully i2c controlled keyboard... For reasons :D
https://learn.adafruit.com/neokey-1x4-qt-i2c?view=all
Link to make it make more sense^
@valid badger I think you might get better answers if you move this to #help-with-projects or #help-with-circuitpython
Ah, so this is the circuit python dev as in developing circuit python, not developing solutions USING circuit python! Sorry and than you so much for the help! <3
So, if I just say 16K for the stack that should do it? I am guessing my configuration changes things slightly also. Is there any kind of documentation or historical profiling I can look over?
@idle owl okay I think I understand the goal here. I forked the cookiecutter and I'll tag you in the PR!
Hello devs. I'm trying to put together a PR to resolve the issue for adding type hinting in the mcp9600 library. Pre-commit is killing me on something that I can't understand to actually be a problem. Specifically:
adafruit_mcp9600.py:36:0: E0611: No name 'unpack' in module 'struct' (no-name-in-module)
I haven't found any clear solutions for this in my reading. It happens with a newly forked and unaltered repo, so I assume it's environmental, somehow. It doesn't occur if I run pylint directly (rather than as part of pre-commit). I also tried the MAX31855 library and got the same error on that module. Anyone have advice for getting past this?
Weird that it's a fresh clone
struct is the standard library too... is there another module or something named struct that its importing instead?
sorry should have tagged you @broken hawk
You can try this to see where it's grabbed struct from:
import struct
import os
print(os.path.abspath(struct.__file__))
That will print the filepath of the struct library its importing
@proven garnet @idle owl I did a PR for https://github.com/adafruit/Adafruit_CircuitPython_BusDevice/issues/77, which just showed up after yesterday. Basically, adafruit-blinka was not in requirements.txt . I did some other cleanup too, though.
Sounds good! Looking at it now, some things got moved out of the typing try block, are they being used for other things now too?
I think that we can actually not have to add things to autodoc_mock_imports if we add adafruit-blinka to the pip libraries that are brought in via https://github.com/adafruit/actions-ci-circuitpython-libs
that will define busio, circuitpython_typing, etc. for sphinx's purposes.
or perhaps the scripts in that repo should use the library's requirements.txt: that would solve the problem
@idle owl i can talk to you about this later
they did not need to be conditionally imported. You always need busio.I2C for instance; that should not have been conditional. And we don't need _typing: it is replaced by circuitpython-typing in adafruit-blinka
there is still a problem that the docs are generated in a different pip environment than the rest of the build, hence the comments above
hi there. Question about CPY support on ESP32-C3. I see a few references to the C3 e.g. https://circuitpython.readthedocs.io/en/latest/ports/espressif/README.html#connecting-to-the-esp32-c3 and I've found a board/build that has similar features to one I am using, but definitely not identical. I'm running a nightly MicroPython 1.18 build because they recently made some RMT fixes for this particular board I'm using. I've blogged about it here https://dev.to/andypiper/bringing-the-bling-with-micropython-hn1 and I am interested in potentially running CircuitPython, but I'm not sure where to start. I get the impression that such a board wouldn't be able to be used as a USB drive with CIRCUITPY showing up, is that right? and is MicroPython sufficiently up-to-date in sync in CPY?
apologies if this is the wrong channel - I can take the q elsewhere if you give me a hint
we are just getting started with the C3. Correct, it can't present CIRCUITPY. The RMT code in MicroPython may or may not be used in CircuitPython: we may have our own version anyway.
we are working on a BLE workflow for the C3. It's very early for C3 support now.
Per the way @lone axle has suggested doing typing, I've been putting imports only used for typing in that typing library "protected" try block so microcontrollers don't import code that isn't functional. It looks like I2C, SPI and DigitalInOut are only used in method argument typing still. Or are you saying that by the time we get to this library we're gonna need I2C/SPI already anyway?
that's great info, thank you. If you are interested in this specific board, I've done some investigation and documented on GH -> https://github.com/andypiper/fivebyfive/blob/main/notes.md
good to know where things are at in CircuitPython, happy to try things out in time.
It looks like I2C, SPI and DigitalInOut are only used in method argument typing still.
Oh, I thought it was actually using the constructor. OK, yes, I'll undo that.
Looks like that branch got merged already, just a heads up!
Sounds great!
tnx for immediate review
Just glad to help!
- Looks like
CIRCUITPY_PYSTACK_SIZEdefault is set inpy/circuitpy_mpconfig.h, and could be changed inports/espressif/mpconfigport.h, conditioned onCONFIG_IDF_TARGET_ESP32S3. CONFIG_LWIP_MAX_SOCKETS=4is set inports/espressif/esp-idf_config/sdkconfig.defaults. I'm not sure how to cleanly make that conditional on ESP32S3. Maybe override it inports/espressif/esp-idf-config/sdkconfig-esp32s3.defaults?- Max connections to an Access Point I think is easy. I'd propose maki...
CircuitPython version
Adafruit CircuitPython 7.1.1 on 2022-01-14; Adafruit Feather M4 Express with samd51j19
Adafruit CircuitPython 7.1.1 on 2022-01-14; Adafruit Feather M0 Adalogger with samd21g18 (2 different devices)
Code/REPL
#boot.py
import usb_cdc
usb_cdc.enable(console=True, data=True) # Enable console and data
Behavior
When connected to a Windows machine sees the microcontroller as "Unknown USB device (device descriptor request fail...
Could you upload your code.py that is no longer working? If it is large, if you have a minimal example, that would be great.
I think the best approach would be to just try it. It's easy to change and will generate a python exception so it is recoverable.
On the host/computer I used:
import serial
import time
import adafruit_board_toolkit.circuitpython_serial
comports = adafruit_board_toolkit.circuitpython_serial.data_comports()
device_COM = 'COM6'
if not comports:
raise Exception("No sensor modules found")
try:
device = serial.Serial(device_COM, baudrate=115200, bytesize=8, parity='N', stopbits=1, timeout=1, xonxoff=0, rtscts=0)
device.write(b'hi!')
response = str(device.readline(), 'utf-8')
print(respo...
When it does not work, see if there are any errors in boot_out.txt in CIRCUITPY. I haven't heard of this happening. Does this happen on all the boards?
You are always using COM6, but it might not be COM6:
comports = adafruit_board_toolkit.circuitpython_serial.data_comports()
device_COM = 'COM6'
There is no usbl defined elsewhere:
usbl.write(data)
When I boot in safe mode, the boot_out.txt is clean (see below). When the device is not able to connect, I don't know how to access the file that would have generated.
I has happened to all those I've tried: 1 Feather M4 and 2 Adalogger M0. I will test more devices as able.
'Adafruit CircuitPython 7.1.1 on 2022-01-14; Adafruit Feather M4 Express with samd51j19
Board ID:feather_m4_express
boot.py output:
'
I'm a little concerned about making spaghetti conditionals criss-crossed over so many files.
Ya, agreed. I haven't split out an S3 with RAM bucket yet. Maybe just increase max sockets on all S3? Hopefully we still leave enough room for it after the increased heap size for boards without RAM.
The sdkonfig ordering comes from here: https://github.com/adafruit/circuitpython/blob/main/ports/espressif/Makefile#L317
Thank you! CI failure is a network error not related to this PR.
Just a suggestion to use a macro.
I thought about suggesting that
I was a little slow on the commenting. it's fine
but decided it wasn't too important
I think this is due to 7.0 loading the peer keys for resolving addresses. IIRC the soft device only has one key store and we load different keys depending on whether we are a central or peripheral. Maybe we can load both sets at once to allow concurrent scanning and advertising.
@awgrover Do you have devices bonded to you when you are doing both scanning and advertising?
FYI I've added more info about element size here: https://github.com/adafruit/circuitpython/pull/6011
Closing in favor of #5331
This would allow for loading data into the state machine using run() before the state machine is actually clocked. We can't do it now because write() blocks until the FIFO is empty.
When this is False, write() needs to ensure that the length of the data is less than or equal to the FIFO size because it won't be able to queue more data up later.
what's the trick for blinka/pi people to get around issues with libraries breaking due to the type checking stuff?
You mean when creating libraries?
Ah, @tulip sleet should have just patched that
either there's still something or the upgrade didn't work for them?
The patch happened in two pieces, looks like they're at the point where they only got one of them
Wait
@tulip sleet we do have a way to do usb hid boot keyboard now right? This guide could be updated for it: https://learn.adafruit.com/customizing-usb-devices-in-circuitpython/hid-devices#boot-keyboard-and-mouse-3096612-11
@tidal kiln my guess is that Blinka isn't updated
It's probably failing to import circuitpython_typing and because of that failing to import busio?
dunno. they say they updated both.
I think I made sure the typing module(s) were importable, but someone should double check I guess: https://github.com/adafruit/Adafruit_Blinka/blob/main/setup.py
I just updated my Blinka on my PC to 6.20.2 and I'm able to import circuitpython_typing... let me see if I can import the library.
Yeah I'm not having an issue :/
are you doing it in a venv ?
Me? No, regular environment
do that then, you might have missing dependencies that are already installed
ah, good point
I get:
File "/Users/spyro/Desktop/temp/venv/lib/python3.9/site-packages/circuitpython_typing.py", line 33, in <module>
from numpy import ndarray
ModuleNotFoundError: No module named 'numpy'
(by using traceback.print_exc() in except ImportError)
or I guess I could just import circuitpython_typing
installing numpy it then works
ah, now I'm getting the error
OH YEAH
The buffer protocols require numpy
I specifically did that, because the microcontroller versions allowed for ulab.numpy.ndarray so it seemed like allowing numpy.ndarray made sense
But @jaunty juniper is right, it'll error out, and that isn't currently a dependency I don't think
Is the correct fix to require numpy in requirements.txt or to remove it from the Buffer typings?
Happy to patch that ASAP since I imagine it'll be a potential big problem for importing libraries on Blinka
I see you ended up automocking the bits that were failing on busdevice? I was hoping to avoid that. But I guess it is what it is.
@lone axle Can I tag you on a cookiecutter PR so you can test it to make sure the changes happened in the proper place? Since there are so many options going on in there....
yep sounds good ping me on it and I can take a look in a bit.
also FWIW I am able to build the docs for BusDevice even after removing the mocked circuitpython_typing I think it's leftover and no longer needs to be mocked with the fixes from Blinka. (though I have not tested a fully clean env).
Good to know.
Any ideas on the ADXL PR failure?
I think I lean toward removing numpy as a requirement if it's used only for a typing class. There is benefit to it, but outweighed by needing that as an extra requirement. I could be wrong but my sense is that numpy is sometimes troublesome for folks to get installed so avoiding the need to troubleshoot that sounds better to me. But I am also open to input from others on it.
Oooh.... wait. My PR is failing on something new.
It's using the latest busdevice.
The CI is.
This is the same failure as @tidal kiln
Well that's good and bad. 😄
Just to fix the issue, I can submit a hotfix to remove that from the Blinka typing module
Wait... how does that fix it?
not mine. i'm just a messenger 🙂
Oh sorry, I should be specific haha
Suuuuuuuure.
I'm gonna remove numpy from the Blinka circuitpython_typing module
It seems like a lot is breaking, and there's no harm to figuring out how to add it back later
I don't follow how that leads to this failure.
I'm clearly missing some pieces here.
And, for what it's worth, a numpy.ndarray should actually still work
Should this be busio.I2C or because of the from busio import I2C it shouldn't need the busio..... https://github.com/adafruit/Adafruit_CircuitPython_BusDevice/blob/main/adafruit_bus_device/i2c_device.py#L55
This is so frustrating because I can't test it locally. It passes locally.
the latter is my understanding because it's imported with from you don't need to add the module and dot.
It seems what's happening is that when circuitpython_typing is imported on Blinka, it will try to import numpy because circuitpython_typing needs it for allowing numpy.ndarray as a ReadableBuffer and WriteableBuffer. But numpy currently isn't required to download on Blinka installation, so the circuitpython_typing import in adafruit_bus_device will fail AND ANYTHING AFTER IT. For adafruit_bus_device it means that busio.I2C won't be imported, hence the error.
Yeah that's what I thought.
Ohhhhhhhh
Missing pieces found.
So let me ask you this
why is the from busio import inside the try?
Shouldn't it be outside it and work regardless?
Do you have a preference between requiring numpy vs. removing the type that is specific to it?
because the import is only used for typing. So we want it to not happen when runs on Microcontroller to save RAM.
I don't, but I don't have a huge grasp on Blinka, so my opinion is dubious at best.
Ah ok.
Welp. Submit the hotfix to Blinka. @lone axle you pick which you want to do.
Let's try pushing this through to see if it does what we think it does, and we can always revert it if needed. Huzzah version control.
Wait...... Did Dan's PR get reverted or something?
We'll remove it for now. I'm curious to see how the docs HTML turn out. After things aren't breaking in CI we can try it out locally somewhere to see if the value it adds to the docs is substantial.
Because Dan moved the import outside the try.
It got moved back in after
OK
there was a follow up one that changed it back I think.
Confusion averted.
I'll submit now
Thank you. Ping me and I can review promptly.
Thank you both!
@lone axle ping!
I had it open and ready to patch 😅
whoops, I'll fix that CI error
@idle owl ✅ actions passing now on your PR. I think we are good now.
YES! Thank you!
@idle owl @lone axle @proven garnet sorry, I was at the grocery store.
As I mentioned this morning, I think we can get rid of the mock imports if we import the right typing things in the doc build (as opposed to the regular build)
Does that mean we wouldn't have to mock import things like digitalio anymore?
Since that's in Blinka
right, the problem is that adafruit-blinka is not in the doc build dependencies, in https://github.com/adafruit/actions-ci-circuitpython-libs
that build pays no attention to the requirements.txt of the library, if I understand correctly. Also there is some Travis stuff in the README and perhaps elsewhere that is moot now.
@idle owl, right we don't use travis for arduino any more?
I don't think so, but check with Carter or Limor on that to be sure.
I was able to build the docs locally without the mocked circuitpython_typing, but the CI build failed, because it doesn't install adafruit-blinka for the doc build.
It only works on some PC BIOS's. It doesn't seem to work on Mac.
but the capability is in the API
I found an issue that described it so I thought the info could go in the guide
hmm I see. It's odd, it does seem to install Blinka further up in the Install Dependencies section: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice/runs/5157594557?check_suite_focus=true#step:8:133
I think my bios is happy as long as I don't have other types of classes going
Maybe that was failing due to the numpy missing issue? possibly if the same action ran again with Blinka 6.20.3 it might succeed?
yes, I'm confused by that, but https://github.com/adafruit/actions-ci-circuitpython-libs has its own build instructions. ... Maybe that is irrelevant??
it is installing the correct version of blinka; I thought it might be being held back by some python version thing, but that wasn't it
This is showing 6.20.2 but we have a 6.20.3 now (as of just an hour or so ago) that resolved an issue with numpy being needed, but not getting installed. 6.20.3 removed the dependency on numpy and allowed it to succeed building docs for a driver library.
ah, so the dependency on numpy was hidden. It wasn't that it wasn't finding circuitpython_typing, it wasn't finding something that circuitpython_typing was importing. numpy is not mentioned at all in that build log
I will do a test PR that removes all the automocks for busdevice and see if it builds
yep that is correct I think. numpy was needed (and most of us that ran it locally coincidentally had it already) but missing from requirements.txt.
busdevice is the first library that needed WriteableBubffer and the like. Previously we were only mentioning that in the circuitpython core doc
I translated CPY's ulab.numpy.ndarray to numpy.ndarray for Blinka's version of the module, but it never got added as a dependency 😅
@lone axle @proven garnet it worked! without any mock imports: https://github.com/adafruit/Adafruit_CircuitPython_BusDevice/pull/80
No other changes needed?
Nice!
No, as long as adafruit-blinka is a requirement. I am still confused about whether adafruit-blinka needs to be mentioned in both setup.py and requirements.txt
but I have been confused about that for several months
Even the documentation didn't help me much haha: https://packaging.python.org/en/latest/discussions/install-requires-vs-requirements/
my understanding is that requirements.txt is not used by anything, you can pip install -r it, or you can have setup.py read requirements.txt and add its contents to the requirements which seems to be somewhat common (I used to do it with discotool but not anymore, because my requirements are platform dependent)
yes, stackoverflow has given me conflicting info. I thought setup.py was obsolete, but it may only be in some cases
but we use requirements.txt in our CI scripts, so I guess that's why it works?
yes
I updated the guide
I guess technically it's the setup for installing a module with setuptools, which is one way to install a module with pip, and is used by pypi, along with other methods, like a pyproject.toml file
it seems there are too many different ways to do it 😛
it appeared that pyproject.toml is now favored, but I was not sure it did everything we wanted it to do.
my impression too
i went down some websearch rathole and decided it was too early to try to switch
If anyone has a moment: https://github.com/adafruit/Adafruit_CircuitPython_Bundle/pull/368
i can review; just want to check the ADXL34 dependency thing that i saw go by
Check how?
that it depends on adxl34x
i am kind of uneasy why these are not all in the same library
Limor told me to do it this way?
ok
¯_(ツ)_/¯
I'm not sure it would work because you could import the wrong one.... but I don't know. Also the library name is wrong for the 37x family which causes confusion. Though needing the 34x lib might also cause conffusion.
So I'm not sure what's better.
Would have had to do 3xx a long time ago for the name to not break things.
just what I was going to say: a 3xx library, with multiple possible imports. Eventually this could be refactored that way, oh well
Not sure how we could make sure folks weren't importing the wrong one though.
Because there's no differentiation between the chips.
Maybe it doesn't matter.
it's already the case they might use the wrong library, it just pushes the wrong decision to a different point in time
Hmm. Good point.
I guess we could make a new library 3xx, and move to it and leave the 34x library alone.
I would need to talk to Limor about that though.
Whether she wants time spent on it.
Since this is what she told me to do for it.
I noticed, thank you. Appreciate it.
Changes to convert-release-notes.py, which is used to convert the markdown release notes to HTML and BBCODE when we make a new release:
- add
finalize()toAdafruitBBCodeRendererdue to a library now requiring it - fix
strong()andem()to do bold and italic, respectively - don't include the notes in a blockquote (my personal style preference)
@lone axle I'm still navigating reviewing, but I tagged you on a typing PR, looked good but want a second opinion 🙂
Is it possible to increase the file system size in the linker script? Like move sector 4 to the FLASH_FS https://github.com/adafruit/circuitpython/blob/main/ports/stm/boards/STM32F412_fs.ld#L10-L11
I guess I'd expect the FS size to be 48KB currently based on what's in that linker script, but windows always tells me the CPy Drive is only 32KB
Check the other STM boards that use internal filesystems and see whether they do something similar
it might be the filesystem metadata overhead
I got CPy down to 306KB and I have 1 MB on chip flash
one reason is that the big sectors cause big erases whenever you write in that sector, so that may be why we chose 16k sectors. This is not our favorite chip for on-chip filesystems anyway.
I'll bet that was the original motivation
What do big erases cause? Are they bad?
most other chips have smaller flash sectors. On STM, is that the minimum erase size, or am I making an incorrect assumption?
I'm not sure
they just use up a lifetime erase cycle
e.g. SAMD21 has 256kB erase size, SAMD51 has 4kB. STM are really large
Sectors 5-11 are 128 KB each
oh, here's a better reason: you have to save a sector you erase in RAM. You save it, erase and then rewrite. So you need a big RAM buffer to save the sector.
yeah, that's the reason
ah
so I moved sector 4 over to the FS, but windows is still telling me 32KB for the drive size
the FAT metadata might be assumed to be a certain value
there is a "flash fileystem size" constant somewhere
also you will need to check the flash writing code to see how it figure out what size buffer it needs
I see some BOARD_FLASH_SIZE in the boards, but don't see where it is actually used in cpy
that is different
INTERNAL_FLASH_FILESYSTEM_SIZE
gotta go out, sorry
@fiery fossil storage.erase_filesystem() to create a fresh filesystem whose size matches what circuitpython thinks is the configured amount?
just a guess
I got it to work by setting INTERNAL_FLASH_FILESYSTEM_SIZE in my mpconfigboard.h
and also adding ifndef to supervisor/internal_flash.h
#define STM32_FLASH_SIZE 0x100000 // 1MB
#ifndef INTERNAL_FLASH_FILESYSTEM_SIZE
#define INTERNAL_FLASH_FILESYSTEM_SIZE 0xC000 // 48KiB
#endif
#ifndef INTERNAL_FLASH_FILESYSTEM_START_ADDR
#define INTERNAL_FLASH_FILESYSTEM_START_ADDR 0x08004000
#endif
#endif```
Now I have 90ish KB available on the drive
This PR changes the max socket limit from 4 to 8, implementing one of the improvements enabled by the 192KB increase in internal SRAM in the ESP32-S3 compared to the ESP32-S2, as discussed in issue #5915.
Sockets are memory-intensive, and memory use appears to be somewhat non-linear, and somewhat variable based on the socket use.
ESP32-S2
On ESP32-S2 (Adafruit CircuitPython 7.2.0-alpha.2 on 2022-02-11; ESP32-S2-DevKitC-1-N4R2 with ESP32S2), fresh memory stats on reset are:
My FWIW if this is to be prioritized: We need to show demonstrable instances where a real project, preferably with publicly posted code, that can't be made to work with the current circuitpython, but could be done with multiple core support. Or, ones that could be made to perform meaningfully better with multiple core support.
So far there have been a lot of what if kind of requests here, including one of mine, but none that meet that standard. Adafruit has limited resources and many dema...
Hmm, CircuitPython for 68000? CircuitPython for Mac SE?
I don't have an ESP32-S3 without external PSRAM. I would not expect that you could run many sockets with only internal RAM for everything, but can someone who has one of those boards please test that this PR does no harm?
@mortal mica https://github.com/tannewt/keebloop
bloop!
🙂 keeeeeee - bloop
Bloop bloop! I'll start it and share every time I get asked about QMK...
We've given them examples and they've been discarded, just because something isn't compute intensive doesn't mean it doesn't need multithread access or couldn't benefit from it. Without interrupts its pretty hard to make something with tight timings and just because someone thinks that isn't possible just because of a GC still doesn't mean it can't be worked around and still perform better.
I've never seen this one before Assertion 'block_size(block) >= size' failed, at file heap_tlsf.c:447 in USB serial, not the debug console
(occurred in a place I would typically see a rare safe mode) ...oh, but it is a debug build
@idle owl @lone axle Just FYI, I've created several PRs for open issues about adding type annotations to the libraries.
https://github.com/adafruit/Adafruit_CircuitPython_ADT7410/pull/20
https://github.com/adafruit/Adafruit_CircuitPython_ADXL34x/pull/33
https://github.com/adafruit/Adafruit_CircuitPython_AHTx0/pull/11
https://github.com/adafruit/Adafruit_CircuitPython_AMG88xx/pull/35
https://github.com/adafruit/Adafruit_CircuitPython_AS726x/pull/19
Fix for issue #18
Added type annotations
Also changed the Exception raised by the setter for hysteresis to a more specific ValueError
Thank you!
Also a question - do I need to individually fork the library repos, or if I fork Adafruit_CircuitPython_Bundle and then create branches in the subdirectories, will Git do the right thing?
I did the first option for these 5, because I wasn't sure. 🙂
I'll be doing some more reviews this weekend so I should get to some of these, but any leftover I'll get on Monday.
Awesome, thank you!
AFAIK option 1 (individually fork the repos) is required... But I'm not actually sure how submodules work. My instinct is that when you create branches in those subdirectories you will only have the adafruit remote so you wouldn't be able to push to it.
you could use git remote add <your fork url> inside of them and then you'd be able to push but in order to get that URL you'd have to fork the library repo anyhow as far as I know.
Hmm. I was wondering if Github is smart enough so that if I added the remote to the parent repo, it would "cascade" to the iindividual repos, but I'm not confident it is.
¯_(ツ)_/¯
Thank you!
You should fork the repo on GitHub. If you add your remote to the repo in the bundle, it will work. But you need to have forked it in the first place to have a remote to add. It won't cascade if you add something to the parent repo. Git is confined to individual repos. Check "gh" command line tool though, it might have something to help.
Ah. Thanks! That’s what I suspected, and I think there is a way to do the fork from the GitHub command line. It’s just too bad that GitHub isn’t smart enough to cascade the remotes like that.
That would make it easier!
I bet it would really make things waaaay easier for folks like you guys! I’m not trying to work with every single submodule in the bundle. 😂 (At least, I don’t think I am…If I keep doing these type of annotation PR‘s, I may end up forking a lot of repos.)
If you recursively clone the Bundle and use the gh command line utility, you can fork it that way and I think point the repo there to your fork.
It's basically what I originally planned to do to PR for the README patch
That said, I've still forked and cloned individual repos and found the organization to be worth it, plus my git GUI has an easier time letting me know where I've been working that way so I can come back after long periods of time and resume more easily.
I see I'm late to the party on mentioning that though!
This PR is somewhat independent of #5915, though extra internal RAM never hurts. Each Station connection to the Access Point uses an additional ~1.5KB. Even on an ESP32-S2-DevKitC-1-N4R2, A simple AP running with 10 connections should have about 50KB of free espidf memory (a simple AP with no connections has about 65KB free).
This max_connections value was hard-coded to 4 in the released code, which was Espressif's default setting. Now it can go from 0 to 10 (Espressif's full supported ran...
@dhalbert bad news, I think. It looks like the 1.3 version of the MicroMod SAMD51 is not fixed for external flash. They haven't published the new schematic, so I could have this wrong, but in toning out the module, it looks like the CIPO pad was corrected, but the CS and COPI are still swapped in a way that won't work with SERCOM 2. So it's a 50% fix, which is a 100% fail to get the flash working.
I'll be sure I haven't made a mistake once the new schematic is up, so I will try again. Bu...
It's not a party with just me anyway, so you're welcome to chime in!
While looking into the external flash issues with this board, I noticed the board.SPI() was not working correctly. The reason was the wrong port pin being assigned for the default CIPO on the board.
Just tested this repo and tested it, should be good to merge. Still navigating reviewing, and wanted to ask what standard operating procedure is for who should be actually merging and releasing changes (anything beyond reviewing). Thanks in advance! https://github.com/adafruit/Adafruit_CircuitPython_VL6180X/pull/23#pullrequestreview-880893813
Would it be ok to increase the polling rate for HID? People making daily driver keyboards would probably appreciate it
currently it's 8ms, making it 16ms for a key press+release
Generally if I'm unsure of myself I'll tag/ask someone else to look. But I have been told that worse case they can undo merges so try not to worry about it too much. If it will break an API that is kinda the line where I know I'll want others feedback too
That's very helpful (and reassuring), thank you!
Is it okay for us to release or do other do that periodically?
I will do merges, but I think any tagging is set when they do a release (like 7.2.x) so everything is on the same page, if that's what you meant?
Yeah, I guess I'm asking who handles the release process - maintainers?
yeah I believe so.
Perfect thank you!!
I did take a quick look at that PR (didn't test) so if you think it is good to merge, go for it
I will now deny saying any of this if anything goes wrong 😂
Issue18 type annotations by tammymakesth...
@lone axle Took a look at that PR and the uzlib stuff that exists. Probably not too hard to move it to CP. Then can always look for improvements after. Do you think there is a use for it from what you saw?
Yes! having it enabled in the core for the non-small devices would be great I think.
is that what limits how fast a macro made of multiple characters can be 'typed in'?
means we don't need to have a library for it and should make it easier if we end up wanting requests to try to handle it automatically.
Yes, but mainly just for general response time (gamers)
cool just checking. I'll take a run at it - probably tomorrow. It doesn't look too hard (famous last words)
Thank you
we don't own one, and a PR to add support would be welcome!
https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython
not tested, but seems like a likely typo :)
Yeah. I tested it before and after. board.SPI() works now, but given that the board has other issues right now thanks to the external flash, it's not easy for others to confirm.
hiya folks, lets keep comments positive so they cant be misread - we're here to solve issues, sometimes we can solve issues without waiting for the circuitpython team to do a lot of work.
we recently added asyncio, working with micropython team so that our codebases and libraries could be compatible. there is work happening with adding more advanced features: circuitpython has a lot of async stuff going on and as we gain more dual
core processors, there'll be more work on it.
we wan...
Just following up on the ESP32-S3. I tracked down an N8R8 flavored board. I used the “UART” to flash the CircuitPython.bin file and then had to swap the cable to the other port “USB” and the CIRCUITPY drive showed up there. I thought the “USB” port was just for USB Host “on-the-go” but I was mistaken. Mu (maybe a way old version) doesn’t recognize it on my Mac, but screen works. Got to REPL. Yay!
I think if you want to meet coverage of end-user usecases, you might want to look at how Python handles that in their unit tests.
CircuitPython version
CircuitPython 7.1.1 on a QT Py RP2040.
Code/REPL
# Write your code here :-)
import board
from adafruit_onewire.bus import OneWireBus
ow_bus = OneWireBus(board.D2)
devices = ow_bus.scan()
for d in devices:
print("ROM={}\tFamily=0x{:02x}".format(d.rom, d.family_code))
print("Correct ROM[{}]:".format(len(d.rom)), list(map(lambda x: "0x{:02x}".format(x),d.rom)))
Behavior
I copied the OneWire example directly from ...
what do you mean by 'garbled'? note that the print output will convert valid ascii chars to printable characters. you dont get hex data if its valid ascii
For comparison, here's how the same data displays on a host computer:
Python 3.9.2 (default, Feb 28 2021, 17:03:44)
[GCC 10.2.1 20210110] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> b = bytearray([0x28, 0x54, 0x45, 0xff, 0x00, 0x00, 0x00, 0x3c])
>>> print(b)
bytearray(b'(TE\xff\x00\x00\x00<')
Doh, I would've totally used MIN() but for some reason thought it was disallowed or not available.
What's the process for doing tiny cleanup work like this? Another PR?
My bad. I tried a separate sequence on my host that spit out all hex and thought that was the intended output form. I see now that it's a mix of ascii and hex.
Use non-blocking HAL call to allow reception of data over UART while transmission is active.
@tannewt No devices are bonded. I tried ble._adapter.erase_bonding() which had no effect.
man, ST, what is this!? Supposedly this is what ST did to get half-duplex SPI working correctly for this board. Not so clear what the exact purpose is of all the DSB's (which I think are like NOPs)
{
/* In master RX mode the clock is automaticaly generated on the SPI enable.
So to guarantee the clock generation for only one data, the clock must be
disabled after the first bit and before the latest bit */
/* Interrupts should be disabled during this operation */
__disable_irq();
//GPIOA->BSRR = (uint32_t)GPIO_PIN_8 << 16U;
__HAL_SPI_ENABLE(xSpiHandle);
__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");
__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");
__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");
__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");
__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");
__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");
__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");
__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");
__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");
__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");
__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");
__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");
__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");__asm("dsb\n");
__asm("dsb\n");__asm("dsb\n");
__HAL_SPI_DISABLE(xSpiHandle);
__enable_irq();
while ((xSpiHandle->Instance->SR & SPI_FLAG_RXNE) != SPI_FLAG_RXNE);
/* read the received data */
*val = *(__IO uint8_t *) &xSpiHandle->Instance->DR;
while ((xSpiHandle->Instance->SR & SPI_FLAG_BSY) == SPI_FLAG_BSY);
}```
@fiery fossil it probably ensures a precise number of CPU cycles elapse between __HAL_SPI_ENABLE and __HAL_SPI_DISABLE. It does seem awfully arcane, but hopefully not needing to actually care about it is one of the rewards of using their sdk
that's assuming it works anyway
Yeah, I think they are using this SPI_Read instead of the HAL SPI driver read function...
@onyx hinge I think you are right, but a comment on how 67 was derived would be very helpful
especially since it seems like it could depend on SPI baud rate since it must be "after the first bit and before the latest [last?] bit"
Yeah, depends on sys clk rate and SPI prescaler
you could also look at the errata sheet for that mcu if available, sometimes that gives a little more info about the weird workarounds that are used
another example of DSBs https://github.com/STMicroelectronics/STM32CubeL4/blob/f93a2f74f8e9912405dbf1a297b6df0c423eddf2/Projects/NUCLEO-L496ZG/Examples/SPI/SPI_HalfDuplex_ComPolling/Src/main.c#L246-L270
5 != 67
different sys clk and spi prescaler probably
good luck making it work for a range of spi clocks in circuitpython. 🤯
I think I figured out the 67 is 2 SPI clks, but not sure how waiting 2 SPI clks aligns with their comment about clock must be disabled after the first bit and before the latest bit
// APB2 CLK / 16 (spi prescaler) = 42MHz/16 = 2.625 MHz
// 2.625 MHz = 380.95 ns period
// *67 NOPS at 84 MHz (sysclk) = 797.62 ns
// 797.62 ns / 380.95 ns = 2 clk periods```
and by latest, do they mean last?
That's my guess
so you could wait anywhere between 1 and 7 spi clks
When the master is in any receive only mode, the only way to stop the continuous clock is to
disable the peripheral by SPE=0. This must occur in specific time window within last data
frame transaction just between the sampling time of its first bit and before its last bit transfer
starts (in order to receive a complete number of expected data frames and to prevent any
additional “dummy” data reading after the last valid data frame). Specific procedure must be
followed when disabling SPI in this mode.
"it's awful, we're sorry"
yeah, their HAL SPI Driver definitely doesn't do that... but I suppose that isn't surprising, I don't think half-duplex is used often... I wouldn't chose to use it but that's what's on this board
Weird they only use 2 DSB there in SPI_Read_nBytes but then the 67 in SPI_Read
unless __DSB(); is different than __asm("dsb\n")
You can also memoryview(buf).cast(type), or use a ulab array with an associated type.
Part of this is right, and part I am unsure about; it seemed to cause problems for me.
this is probably correct for us. It looks like this is an incorrect trace of my work to split type objects into a main part and an optional part; the 'parent' field ended up in the main part, but this code was to help adapt for the case that it was in the optional part.
Does raising exceptions from a native module actually work with these changes? I expect that it doesn't, because there's no way for the string to be entered in the list of translations that is baked into the core, and the translate() function is not available to call from the dynamic runtime either.
Ah, because SPI_Read_nBytes is never called, probably meaning it doesn't work
This is a possible alternative or supplement to #6014; it checks that all natmods build on x64, and runs the available tests.
Closing because I'm not likely to find time to make the requested changes anytime soon. If you found this and are interested, please consider taking this branch and adapting it with @tannewt 's suggestions!
Closing because I'm not likely to find time to make the requested changes anytime soon. If you found this and are interested, please consider taking this branch fixing the likely bugs mentioned above.
@tannewt This is what the terminal output gives us on a typical 64x32 display panel.

Do we have common ground in this discussion that this is not what anyone wants to see?
@onyx hinge you are registered as online, so I thought I would ask now. I am of a mind to move circuitpython_typing to its own repo. I would like to add some protocols from adafruit_requests, and get them out of the actual adafruit_requests code.
I think it makes sense to have circuitpython_typing be independent of blinka. Blinka can still depend on it, but eventually type-annotated libraries can depend on circuitpython_typing as well.
I was not sure what to call the repo: adafruit/Adafruit_CircuitPython_Typing, or whether it might be in the circuitpython organization. things there are not named circuitpython_... in general
if you have any opinion, I am interested
anyone else can opine as well
My $0.02, for whatever it's worth, it seems reasonable to me to have circuitpython_* modules for things that are CircuitPython-related but otherwise platform agnostic.
On another note, does anybody here have an AS-7341 (10-channel light/color sensor breakout) board handy who would be willing to test something really quick?
Together with https://github.com/adafruit/Adafruit_CircuitPython_PIOASM/pull/35 this adds support for .wrap and .wrap_target pseudo-ops in pio programs. I've only compile-tested this code, though; it should be put through the paces before being used.
@tulip sleet hi, sorry I missed your mention -- I was in a call. I'm not sure how it would work to move circuitpython_typing to its own repo, since it consists of autogenerated files from the circuitpython build process...
stubs or typing? I am talking about https://github.com/adafruit/Adafruit_Blinka/blob/main/src/circuitpython_typing.py
I would like to move https://github.com/adafruit/Adafruit_CircuitPython_Requests/blob/9e28b6b82e048cab10b363a74b94c5da72da9f5d/adafruit_requests.py#L55-L148 to circuitpython_typing, since it takes a lot of space in adafruit_requests.py.
Tested this with CircuitPython 7.2.0-alpha-1 and (after adding the necessary libs like adafruit_portalbase) everything ran successfully. I changed the frequency to every five minutes and let it run for 1 hour with no issues. @axelmagnus - can you retest with the latest build?
@tulip sleet oh I completely misunderstood. nevermind my objection.
🙂 still interested in your comments about the name and location of the repo, if you care
if the python file is called circuitpython_typing, so too should be the pypi module I suppose
adafruit_circuitphyton_typing seems fine as a repo name, even though some pedantic case could be made for adafruit_circuitpython_circuitpython_typing (🤯)
Does anyone know offhand what tool looks for .circuitpython-skip files to exist for determining behavior?
adafruit_circuitpython2_typing 😂
But also, does that mean it would be moved out of the core?
Because that would mean microcontrollers and Blinka would potentially have to agree on typings, right? Currently, they technically do not.
Thanks! I'll try to look into this in the next few weeks.
@zestyping I agree that's not ideal.
It takes time to change things and this isn't a priority for me.
I'm happy to give pointers on how to change it and then review the change if anyone does have the time and motivation.
Thanks for adding this! One request
This is an implementation restriction so please put it in common-hal. shared-bindings checks should apply to all possible implementations.
Doh, I would've totally used
MIN()but for some reason thought it was disallowed or not available.
This MIN() is provided by py/misc.h iirc. It isn't a C thing.
What's the process for doing tiny cleanup work like this? Another PR?
Yup, another PR is welcome.
Makes sense. Fixed, and re-tested.
The Russian translation is now the largest one, even though it's perhaps only 20-25% done. I think this may be due to this issue.
Here is the complete documantation with shematics
https://github.com/Xinyuan-LilyGO/LILYGO-T-display-RP2040
Am So., 13. Feb. 2022 um 00:45 Uhr schrieb ladyada @.***
:
we don't own one, and a PR to add support would be welcome!
https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython—
Reply to this email directly, view it on GitHub
https://github.com/adafruit/circuitpython/issues/6024#issuecomment-1037582569,
or unsubscribe
<https://github.com/notificatio...
Pylint. It was from when we upgraded Pylint on Learn, and did not have the cycles to update all of the existing code. It's not something to be used moving forward. https://github.com/adafruit/Adafruit_Learning_System_Guides/blob/main/pylint_check.sh
Ahhh, thank you. I had wires crossed my memory thinking we set up the project screenshot tool to check for them. It turns out there is are similar concepts used with a frew variations of .circuitpython.skip-screenshot that have slightly different effects depending on which one is used.
Ah. Fair enough.
But the screenshot tool was not previously checking for it in subdirectories which is what I ultimately needed. I made a PR for that last night.
Good to know. Thanks for the fix.
I'm still not 100% certain all of the things that setup.py causes with different values used inside of it... Does the line here mean that Adafruit-Blinka requires 3.7.0+ in order to install and use? https://github.com/adafruit/Adafruit_Blinka/blob/9a9e9e1671a0d7cbd805172e71f7bda2ce170f3a/setup.py#L48
Thank you. One of the alerts in the blinka learn guide needs to be updated to 3.7 I think:
I can change the guide, but unsure if there are other places it needs to change or if there are any other ramifications of updating it here.
I wonder what versions are included in the stock rpi OS images these days. It's been a while since I loaded one up.
there are other issues where bus device was changed to use circuitpython_types without changing the minimum version of blinka required for example
tracking dependencies is complicated
Ah yeah, I think that is the root cause of an issue someone posted in the LIDARLite repo that I am trying to help troubleshoot, that is what led me to start poking around the learn guide to see if we specify required version there.
similar issue in the help channel earlier
the thing is pip doesn't say "there's a newer update that requires python 3.7" or something as far as I know
so it's hard to know if you are missing something by just pip updating or installing
yeah, that is true. it just silently installs whichever version came before the requirement changing I think.
Okay, I've updated the guide to indicate python 3.7 or later and I changed "Buster" to "Bullseye" which appears to be the new current version of RasPi OS. Buster is now marked as legacy on the OS download page. I am uncertain which version of python is included by I would assume it's best to point them to current version of the OS.
What's the problem this feature will solve? I'm the developer of a package whose current version requires at least Python 3.8. This is reflected in python_requires in setup.py. The ...
Ooo nice, would love to see a warning as proposed by that issue.
I thumbs-up'd it.
@gilded cradle Feedback on this page is that it doesn't work with the latest CircuitPython: https://learn.adafruit.com/adafruit-pyportal/internet-connect If you get a chance, can you test it? It's mirrored into a lot of things. Not sure if maybe they were using an older version of a lib, or if it's legitimately not working.
@idle owl seems fine on 7.2.0-alpha.2 and on latest S3
Ah keen. Thanks. They specified "7.1" but said "Python" so I assume they meant CP? There's no interaction with guide feedback, so we have to do the best we can.
Thank you!
I had 7.1 running previously, not running the example, but doing plenty of connections and requests.
Ok, keen.
@tidal kiln So this means that the ATTiny817 breakout, the default I2C address is 0x49? https://github.com/adafruit/Adafruit_seesawPeripheral/blob/3b8050e8ebd54f285e62e15ed42eb80e832d0c3e/examples/example_pid5233/example_pid5233.ino#L4 So the address pins would increment off of that?
yep
I'm still confused about it having an I2C address to begin with, but that's beside the point. Someone wanted it in the guide, so I'll add it.
Thanks!
oright.
think of it like an i2c sensor breakout
Right right. I knew this when I did the guide. But I keep getting confused later.
yah. it's confusing. all the other I2C libs are written for running on hosts, so you don't typically run into this kind of code.
99% of the time, you're thinking in the other direction
Our CI for release on the libraries is still building mpy files using the older 6.3.x version of mpy-cross... Is that something we still want to continue with for the time being? or would it be okay to remove that so that only 7.x ones get built automatically?
The reason I ask is that it turns out the older version of mpy does not support adding type annotations to "plain" variables (as opposed to function arguments or returns). But the new version does seem to support it successfully. So if we want to keep the 6.3.x versions building and functional then we'll need to hold off adding any "plain" variable types for now.
@tulip sleet ^^ Where are we at with this?
I thought I updated that. Do you mean we are still building 6.x bundles, or we are building 7.x bundles with a 6.x mpy-cross.
still building 6.x bundles is my understanding. But now that you mention it, that does ring a bell about having updated it. Let me double check my local environment.
Sure Kattni
Skipping the meeting one more time as I did nothing with/for CP this week. But I enjoyed a lot the Deep Dive that was one of the more dense I have seen. So maybe an informal Hug report for that.
Awesome, thanks for letting me know
Ahhh, okay my circuitpython-build-bundles is out of date. I think the newest version does not actually build 6.3.x any longer.
So I guess my followup question would be are we okay with breaking compatibility for 6.3.x mpy in the libraries or would we rather keep that working even though we don't automatically build it any more.
Having similar issue, I can tell its a PinAlarm on wake, but it doesnt tell me which pin...
import alarm
from alarm.pin import PinAlarm
import board
import time
if alarm.wake_alarm is not None:
print (alarm.wake_alarm)
# print (isinstance(alarm.wake_alarm, PinAlarm))
print (alarm.wake_alarm.pin)
print (alarm.wake_alarm.value)
print ('this is my app')
time.sleep(3)
p = PinAlarm(pin=board.GP0, value=False, pull=True)
alarm.exit_and_deep_sleep_until_alarms(p)
I lean towards going ahead and breaking the compatibility with 6.3.x. The older releases of the library are still published on the github releases page so if someone really wanted to keep using the library and are unwilling to update their version of CircuitPython they could still do so with some manual fetching an older version and copying it over.
There are several libraries that we had to update for 7.x (a while ago) in a way that was incompatible with 6.x. We save the last bundle for each discontinued version: https://learn.adafruit.com/welcome-to-circuitpython/frequently-asked-questions#faq-3105289
Thank you!
does anyone else ever run into an issue with the docs pages where searching for a keyword seems to get "stuck" and will never finish, but the elipse dots on the word Searching keep going which makes the user think it could still be working?
@tulip sleet I have some guide feedback that I think you can address. Someone requesting some info in the Adding a Board to CircuitPython guide - I think it might work on this page, but I don't know how to word it. https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython/initial-configuration
I think it would make sense to mention the `_INVERTED` convention for pin naming for active-low pins, like power control.
i will try to add something
Thank you!
@lone axle How acquainted are you with pre-commit? Other than using it within the context of libraries...
Question stands for anyone who might have more familiarity with pre-commit.
Not super familiar, the circuitpython repos are the first / only place that I've used it. I watch the author of the library stream on Twitch sometimes, but beyond that and the experience from using it CircuitPython repos don't know much else.
Ok, thanks. I want to make sure I understand it properly before doing a giant thing with it, but even Scott doesn't really remember for certain anymore. Figured I would check in with you.
All the time...
<@&356864093652516868> [apologies if this is a double ping, I didn't see it earlier] Just a reminder that the weekly meeting is happening today -- shortly. Add notes at https://docs.google.com/document/d/1HcUFNYPTx1fZ8TWwLsuALFoRbo8RT9tB5Dz_Xq6VliU/edit?usp=sharing if you hadn't already, and we'll see you in the voice channel if you can make it.
CircuitPython Weekly for February 14, 2022 Welcome to the CircuitPython Weekly meeting notes! Feel free to add your Hug Reports and Status Updates early. During the meeting, we go through them as a round robin sorted by username. If you can’t make the meeting and would still like to participa...
I haven't experimented more thoroughly yet, so I'm not certain. But I'm thinking that any keyword in which it doesn't find any results might lead to this? Does that match what you've seen? I'm not sure exactly what powers that search though so I'm not sure where to start digging to figure out the root cause.
can you explain why multicore is so hard?
The more I look into multi core type stuff the less I see it having a ton of value for what CP tries to do
I haven't paid close attention, but that does seem to match up... It only seems to happen when I'm looking for things I'm not sure exist, like looking to see if something exists or if the documentation is written a specific way anywhere. I don't think it ever happens when I look for thing that I KNOW something is in there.
garbage collector is one part
even CPython has it but not in the way a lot of people would imagine
perhaps you could borrow so notes from java's garbage collector as they have a multi threaded one
It took 5 years for Linux to implement SMP, and 6 more years to do it well.
@slender iron I’m in the voice chat for the meeting, but I have a work meeting in 57 minutes so I need need to drop early. I’ll let you know here if I do. Just FYI…
@minor plume that's absolutely fine. We can cover your status update earlier if you need to
@minor plume You'll need to cut and paste your notes in the document so they are after Scott's in the list. So between tannewt and anecdata in
Hug Reports, and between tannewt and danh in the Status Updates section. Does that make sense?
thanks for explaination on why
@idle owl Yep. I 'm okay for Hug Reports, but I moved my status update notes. Thank you! (I had to swtich computers to do the edit because Google Docs works weirdly on my iPad.)
Perfect!
https://raw.githubusercontent.com/adafruit/adafruit-circuitpython-weekly-meeting/master/meeting.ical [to add to calendar app] https://open-web-calendar.herokuapp.com/calendar.html?url=https%3A%2F%2Fraw.githubusercontent.com%2Fadafruit%2Fadafruit-circuitpython-weekly-meeting%2Fmaster%2Fmeeting.ical&title=CircuitPython Meeting Schedule&tab=agenda&tabs=month&tabs=agenda [to view online]
For some reason, when I’m working in split view mode on my iPad (Discord on one half of the screen, Chrome on the other), the Google Doc becomes non-editable. Strange. 🤷♀️
sorry that was me
oops
ow
CTRL-A BACKSPACE OH NO WRONG TAB
I have no idea how I did that.
Whew , I thought it was me
[which reminds me, the ability of Pi 4 / 400 to boot from a USB disk, including an SSD, is amazing and can give big performance benefits vs the read/write speeds of an SD card. Cannot recommend it enough]
🎉 Welcome!
@viscid pine I'm curious, is your nick intended to be interpreted as "pull request, please", or something else?
purples
@onyx hinge I can help you with the submitting to someone's branch thing! (Finally something I can teach you!)
that would be great!
[meow]
any hug reports from your cat, or just feed / door opening / pat requests?
@lone axle there is uzlib aka zlib which is in MicroPython but we don't have turned on. https://docs.micropython.org/en/latest/library/zlib.html?highlight=zlib
we could turn it on in builds
I noticed that, one of the potential options forward is to get that enabled. There was a PR for it at one time but it needed some further shuffling around before being ready to merge I think.
I was poking through that Saturday/Sunday so hope I can get it moved from extmod to shared-bindings/module. Doesn't look too hard to do and I'm hoping to find time for it this week
She considers herself above hug reports. She'll accept food, entry and pets when she desires.
For the record, that bug caused CI to fail in my new ADXL37x library.... claimed to be failing on something in Bus Device.... and turned out to be a problem in the circuitpython_typing module. 🤦🏻♀️
wild, glad it got sorted
I stream electronics,, CircuitPython, and other maker stuff. Computer geek, electronics/space nerd, singer/musician, writer/novelist. LGBTQIA+ rights are human rights. Black lives matter. Down with racism and fascism. Feminism must be intersectional. Just say no to hatred and bigotry.
Ooo neat, I'm interested what you come up with for playing cards! I just set up my PyPortal to use it as the reveal for a very rudimentary "magic" card trick.
The announcement channel can't be posted to except by admins
I’ll definitely keep you posted - CircuitPython magic tricks is my application too, and I’m using it as an excuse to get really good with displayio.
@minor plume do you want to say [in text] a little bit more about what kinds of things to anticipate on your stream?
Oh man, we missed out on the ability to jump through time using SAMD chips!
nice work on the samd time bug
262144 seconds. belated hug report for dan for grabbing that issue
@onyx hinge I’m still figuring that out (tonight is my beta test stream, and then I won’t start streaming regularly until I’m back from my trip). But my hope is to focus more on working with CPY rather than working on CPY…I have some fun projects in mind, I think. We’ll see.
@minor plume It sounds good, I hope it is fun for you to do! So many people love streams like that.
Thanks! I think it’ll be fun…and I’m hoping for a sort of chill, low-pressure vibe, so chatting and projects and not so much mini-pair-programming sessions. 😉
a high level of feline involvement in this week's meeting
spook is slacking. he's just sleeping through it all
you have a lot more line items, I have a lot more free association typed in
@solar whale pip3 install -e . (-e for "editable
) will install, pointing directly to the repo, so you don't need to reinstall when you make changes.
there's also some pip incantation to install directly from a branch or tag of a project on github
no that's not the right info
do a pip3 list after doing such an install, and see how it tells you where it came from.
I need to drop from the meeting for a work meeting. Have a great rest of your day, everyone! 👋
Thanks for coming by!
@mental nexus feel free to ping me on here with any questions about the touch/touch API and that. I can probably dig out some of the game dev examples I saw/did if needed
It feels like a really full house today. I'm so happy to spend an hour (and change?) with you all.
@mental nexus I like the DisplayIO_ScrollBox library name. I also realized the conceptual overlap with the ScrollingLabel I made after the fact. I considered maybe changing ScrollingLabel to use Marquee in the name because I feel like it implies horizontal scrolling rather than vertical paragraph scrolling. and it may help to distingquish them.
Gotta "run" to another meeting!
not me
I didn't end up making any changes yet though. Interested if other folks have input on the naming.
Thanks, I looked at keypad and I like it’s got a ring buffer and interrupt reading. For my touchpad I also need to trigger an I2C read. Here’s a concept: 1. Interrupt received store the time in the ring buffer, turn off interrupt, flag the core to queue an I2C read into the time-associated ring buffer. 2. Whenever cycles are available, go run the I2C read. 3. Restart the interrupt.
General question: Can we come up with a generic way of making an Interrupt-initiated I2C read?
do we know what the problem "is", or just that a non-CP program with newer esp-idf works?
it could also be a certificate missing from our certificate store, which is different than what esp-idf uses
Polling may actually work for what I’m doing but I’ll need to get further into the touch and display response to see how the response “feels”.
I don't know the specific issue, only that we get a SSL handshake error.
I don't know the specific issue either
NASA does not always play by the rules of mere mortals...
that's not NASA this time 😉