#circuitpython-dev
1 messages · Page 414 of 1
Yep
Did you mean to say "built-in"?
@slender iron Oof, it's worse.
Thanks. Looks like this needs to be updated with product info, but I can do that in another PR.
This time included the following amongst the normal reloads: ```Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
OSError: [Errno 5] Input/output error
Code done running.
reset 18286
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
OSError: [Errno 5] Input/output error
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
reset 19510
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Code stopped by auto-reload.
soft reboot```
But reloads more, and faster.
I see that too
Ok, I essentially ported this over to MatrixPortal to test how it would do on the ESP32 Coprocessor and in the process found a bunch of stuff that is creating duplicate references. So I think the root problem is caused by 2 things:
- The code creates a lot of the networking stuff outside of the MagTag library (while at the same time automatically initializing the same stuff inside of the MagTag library)
- The later CircuitPython versions don't handle the conflicting references very well...
I'm assuming the reset ### is a debug thing?
yup, the number is the internal time that the reset happened
☝️ seems better
I do still get a couple
Loading it now.
I'm still getting a bunch. But not as fast as the last firmware you sent. And no I/O errors.
how big of a file are you copying?
I'm not copying a file right now. I'm adding or deleting one line to or from code.py and saving.
I can find a tiny file to copy if you want me to try that too.
Yes. I just updated the gist as well.
Want me to simplify and try again? I mean, people are going to have files more complicated than this, so it's a good test, but I can try it with less code if you'd like.
nah. longer files may write more to the fs
Ok
I'm only really seeing one now
one reload per save
I don't have all of the libraries though
This time when I pressed a key to start the time.monotonic() timer, it reloaded on its own, did 4 reloads before settling back down again.
All pretty close to reset 324494
If that matters.
Figures I would pick the finicky board for this project 😄 Is there a potential bug? Doesn't matter. Kattni will find one!
ya, that's weird. mind posting the log for them?
(Key on the project)
the numbers should be at least 750 apart
You mean the serial output?
ya
Press any key to enter the REPL. Use CTRL-D to reload.
reset 324494
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Code stopped by auto-reload.
Press any key to enter the REPL. Use CTRL-D to reload.
reset 325672
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Code stopped by auto-reload.
Press any key to enter the REPL. Use CTRL-D to reload.
reset 326768
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Code stopped by auto-reload.
Press any key to enter the REPL. Use CTRL-D to reload.
reset 337816```I think they're about that far apart, I meant they were relatively close to each other.
Not identical.
are you using pycharm?
I am.
I wonder if it has special files on the drive
that shouldn't be new though
Also true.
I'm not seeing an issue from finder now
I copied all the needed libs over and got one reload per copy
Wait, it regenerates the .idea file on save. So it's not because of how I opened it specifically.
I can try opening it in something else, but I feel like this should still be fixed... There wasn't an issue with this before.
Atom: ```code.py output:
Code stopped by auto-reload.
Press any key to enter the REPL. Use CTRL-D to reload.
reset 761727
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
OSError: [Errno 5] Input/output error
Code done running.
Press any key to enter the REPL. Use CTRL-D to reload.
reset 762767
soft reboot
Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:```
Which created no extra files on opening.
I haven't seen an OSError yet. that's very weird
Right?
There's a NeoKey FeatherWing on it, but it's using keypad, so I'm not even sure what would be failing.
it could somehow be the import statements failing
Oof. In the time it took PyCharm to open, I got something like 13 reloads. No I/O error this time though.
have you tried a non-rp2040?
No. This is what I was working on. I can try TFT Feather ESP32-S2, sitting here. Or go get a SAMD51/nRF.
TFT Feather is likely running Arduino at the moment. So I'd have to grab some code for it too.
right. ok. hold on.
another feather rp2040
three reloads opening PyCharm.
1 reload editing code.
on TFT Feather ESP32-S2
Running a digitalinput button = red LED example.
that's still fewer than rp2040 right?
by a lot.
One reload editing code on RP2040!
Wait...
four this time.
😕 Ugh.
weird
1250 reload time for feather rp2
One reload again on save from simple edit.
I do remember seeing a second reload sometimes
rebooting now.
One reload. Takes ages (obvs), but only one.
Let me copy something
Small file, one reload
26k file.
ya, it feels a little slow to me
750
I can try that one again.
2 reloads after save this time, which yeah, I've seen that too. Let me try copying something.
One reload.
Still feel slow, but I'll take it over waiting seconds for a bunch of reloads to end.
Also, that was a file that probably copied in the amount of delay time
let me try something like a lib.
the delay should reset at the end of each write
since we're trying to ignore small delays between writes
One reload!
Was a relatively big one too.
(or glancing at file sizes, seemed like it)
the delay is a bit more noticeable now since we exit the code immediately
🍕
👋🏻
As the original creator of this issue, I'm looping back to close this issue and happily use the work of @kevinjwalters at https://github.com/kevinjwalters/Adafruit_CircuitPython_SPS30
Moving the timestamp calculation to only when you press the key fixed the flickering for me.
while True:
key_event = keys.events.get()
if key_event:
if key_event.pressed:
print(key_event.key_number)
if key_event.key_number == 1:
if START_TIME is None:
START_TIME = time.monotonic()
PULSE_TIME = time.monotonic()
elif key_event.key_number == 0 and START_TIME:
CURRENT_TIME = time.monotonic()
elapsed = CURRENT_TIME - START_TIME
elapsed_min = elapsed // 60
elapsed_sec = elapsed % 60
timestamp = f"{int(elapsed_min):02}:{math.floor(elapsed_sec):02} "
keyboard.write(timestamp)
if START_TIME:
time_pulse.animate()
This unifies the delay into the post-run delay that also waits
for user input and fake sleep. This ensures we always delay.
Previous code would only delay if the code.py was running when
autoreload was triggered. Now it will always delay.
We also now suspend autoreload when a USB write starts and then
resume on completion. This should prevent reloading in between
sectors of a single write.
We have a guide that uses it. It was removed in #6043 without
realizing that.
Fixes #6152
https://github.com/Xinyuan-LilyGO/T-01C3
I'm not sure where these creator/creation bluetooth IDs come from
Ooh nice. I also switched to LED animation library because of the limitations of the "manual" pulse code. But good to know since I might stick with the original code!
Force pushed to fix debug uart change (83593a1558c2e00be13a62e502fcb9ee923a9d6f)
you edited teh esp32s3 not c3
This looks excellent, and I see that you tested it with @kattni's help. Thanks for yet another iteration on this. I think it's in very good shape now.
The sole CI failure is transient and unrelated to the code.
Oops, I didn't know it had to be enabled in CircuitPython to use the coprocessor.
hi
I added a board with ISP1807 developed by our company.
https://www.switch-science.com/catalog/6454/
hi
I added boards developed by our company like Pro Micro.
https://www.switch-science.com/catalog/6939/
Is currently someone working on this? There are edits to remove blinka and, i guess, the terminal output.
https://github.com/adafruit/circuitpython/blob/main/supervisor/shared/display.c
@tannewt I'm happy to push this forward now 🙂
@slender iron @idle owl I have 7.2.2 release notes ready to go with the MatrixPortal and auto-reload fixes. Can push the button any time and do the release.
Can I play music using my Adafruit Metro M4 feat? I read on the adafruit website that the Metro M4 has audio input and output. I have a Adafruit STEMMA Speaker (Plug and Play Audio Amplifier), but all the syntax listed on the website for this speaker is for the CPX. Can I use this speaker with the Metro M4? What is the CircuitPython syntax?
@half pendant please ask in #help-with-circuitpython , this channel is more for development work on the circuitpython core firmware
Compiling mpy-cross with clang 13 currently produces a few warnings, which are incompatible with the -Werror flag configured in its .mk file.
TL;DR: Clang 13 adds a warning for "variable is set but its value is not used", which causes mpy-cross to fail to build. Adafruit's GitHub Actions use Clang 12, which does not include this warning.
This is reproducible on main, and mpy-cross in tags at least as far as 7.0.0. I see that there are successful builds in GitHub Action...
Thanks for the report. We try to avoid blanket disabling of warnings as errors, so that we can catch new unintentional errors. So in this case we could add void (n_pos_args); etc to the code at that particular place.
Good point.
Yes, adding this to all 5 variables would work; it might make sense to do it in the macro itself in case it's reused.
It doesn't looks like this board has been added to CircuitPython yet and I can't find anything new on the S3, so I'll just close this and stash away the images for a later date.
@tulip sleet go ahead with the release of you’ve tested the reload too and are happy with it. I won’t be at my desk for an hour and 20. We’re doing the car seat check this morning
I am really hoping this is not a bad place to ask this, because it is a bit more advanced and it involves the build and development side of Circuit python. I was going to create an issue on github but it suggest using dicord or forums first.
Basically I build a lot of custom boards, I have used Micropython heavily in the past and with Damiens help added some features that really improved this experience. I often use the clock input with an oscillator and not a crystal (bypass mode) and Damien made easier access to this. The SAMD51 and SAME51 chips are different because they also have two clock inputs that you can select from. I have dug in the repos and found references to the clock sources, but not how to config them in a board folder/definition.
Now if there is a good way to do this now, awesome! If not I would heavily suggest that more of the clock input sources and configuration should be easy to put into config for the board.
Again sorry I found myself between two worlds with this question.
We have support for no-crystal builds, but not general support for other clock inputs. If you see a straightforward way to add clock input selection, we would certainly entertain a pull request. Note that some aspects of the samd implementations are in a separate repo: https://github.com/adafruit/samd-peripherals. See clock.* in that repo.
Thanks for the reply. Yeah that is what I noticed was many example of just using the internal clock. I am running CAN and other peripheral that need higher accuracy clocks over wide temperatures. Ideally this would be in the board config and passing a value to change from crystal to bypass mode would hopefully be simple enough.
#if MICROPY_HW_CLK_USE_BYPASS #define MICROPY_HW_RCC_HSE_STATE (RCC_HSE_BYPASS) #else #define MICROPY_HW_RCC_HSE_STATE (RCC_HSE_ON) #endif #endif
I will look at that repo.
Is this a not so bad place to discuss implementation regarding this?
this is the right place
It's fine to discuss this in GitHub as an enhancement issue, too. See how far you can get with the code. We aren't so likely to add this ourselves because there is very little demand (sorry), but as I mentioned, we welcome contributions
No worries, I just want to make sure I can talk to devs, I work with another developer that can also help with implementation, he is just not familiar with the clock setup and wanted to know more for the core developers.
Very much appreciate your time, and the repo you sent me @tulip sleet looks like it might have what I need. Worst case I can make a docker of a of circuit python to house a custom build system until it can be pull requested.
you can just fork circuitpython and samd-peripherals and keep branches in the forks with your changes. A docker should not really be necessary.
Once you like your changes, you can submit PR's.
Sorry, yes overkill. I just will need to support a build system for a client during the prototyping phase, and I can share the docker with them and interact with it easily within VS Code. It has worked quite well with Micropython. I have a script that moves my custom board files (stored in the app repo) over to the docker image that VS Code mounts, and then I run the build processes.
But for the short term a fork makes the most sense
Automated website update for release 7.2.2 by Blinka.
Another questions that I hope is worthy of the dev chat. I am working with a client that want to have as big as a filesystem as possible with external flash and avoid SD. I have seen examples of up to 64MB flash being used with Circuit Python, is there a limit outside of FAT? I am looking to use 125MB, but see no examples and was not sure there is a deeper reason for this, or that most people just do not need it.
The code in CircuitPython can support large SD cards, so external flash should be OK too. 125MB should be no problem. I use it with 16GB SD cards all the time, and 32GB should too. ExFAT is available but is sometimes disabled (depends on the board).
Thanks once again. I figured but it was not clear after a lot of searching what was considered the limitations. It sounds like config of the flash chip is the biggest effort than.
we define flash chip config in this repo: https://github.com/adafruit/nvm.toml
Thanks, I saw that and plan on using an existing supported series, so it should be minimal setup. Just was not sure about any other limitations. Thanks!
@tulip sleet Regarding the reload issue, I'm not sure what Scott finally decided to do. I was still running into issues last night, but didn't test whatever the final PR was. I can test it now if you like. Obviously, the release is in progress, but still.
I copied a font file to an RP2040 on macOS, and it worked OK, with only one restart. I used the Finder.
as well cmd line
Fair enough. I need a new build anyway because I currently have a debug test build from Scott running on this. I'll grab something.
it's a lot better, maybe not perfect? we can always do another one, but I didnt' wnat to leave 7.2.1 out for long (also due to the MatrixPortal _bleio missing)
Right, I agree.
@tulip sleet Oof, reload is slow. But it's still faster than waiting for 5 reloads in a row. That's significantly better with the 7.2.2 build. Oh I see it says "Reloading soon." Good wording.
that was a good wording change. The reload time really reflects what's going on: it's safer than before. It doesn't wait more than 0.75 second after that last right.
macOS writes so many files... cp -X or whatever may make things more palatable for you.
It was doing it while editing code, was my real problem.
does pycharm store backup files on CIRCUITPY?
Copying files, eh, inconvenient. Waiting for multiple seconds, or it felt like it, for it to stop reloading and actually run the code every time I changed something was incredibly frustrating.
I tried it with Atom too.
PyCharm has that .idea folder it puts in your working directory
But I deleted that and tried Atom, and same results.
the old way, it didn't stop the program immediately, which means files might be changing out from under the program while it was running.
Ah.
i think it's really only 2 or 3 seconds, but compared with the old one, it does seem longer. Even 0.5 -> 0.75 seconds delay is noticeable
Yeah for sure.
If you're interested in stopping it from creating that .idea directory on the device there are some steps here: https://learn.adafruit.com/welcome-to-circuitpython/pycharm-and-circuitpython#creating-a-project-on-a-computers-file-system-3105042-4 that show how to set it up so that the "project" in pycharm is stored on your local PC (which is where the .idea dir will live) but the CIRCUITPY drive is added in as an extra content root which allows you to see and edit files on it.
Hmm. Weird but interesting. I always end up opening PyCharm from the command line in the directory I intend to work within. I guess that would be different?
That is different from how I generally start it up. But I think you could still do it that way. You would open the terminal in the project directory that is on your PC rather than the CIRCUITPY drive and run your start command. I would guess that will open PyCharm to that project specifically which should remember the content root configuration and still show you those files.
Ah fair enough.
Honestly I didn't realize you could start it from the terminal in a certain location. That is awesome and actually probably easier than my normal workflow of using either File -> 'Open' or 'Open Recent'. Because I can find stuff outside of pycharms file explorer much faster. I'm glad you mentioned this, I will probably start opening it this way when I am trying to get specific projects open.
I had to set something in PATH or some such, but now I can go into any directory and do pycharm . and open it.
oh nice, I should add an entry in PATH for it. I had to do the full path to /opt/somewhere.
PATH might not be right. I can't remember what was.
@ladyada Use Case: I would like to use one core for monitoring a Loconet (from Digitrax) communication channel and a DCC reception (using PIO for the low level work) and use the other core for managing 16 GPIO (servos/buttons/current block detection/IR sensors, maybe other uses later), updating a neopixel bus, i2c communication (RFID, eeprom, display, etc) and possibly a bit more. I want to keep the loconet and DCC on it's own core to help prevent data loss in the PIO I/O buffers. I'm just ge...
I think there are a few ways, maybe alias is another one. I've set up a few things like that. But I do it in-frequently enough that it hasn't gotten stuck in memory. I have some notes with the steps I've used before.
@dusk gull This is definitely the right place to chat about circuitpython development and we'd love to have you PR your changes so that you can use upstream in the long run.
With the broadcom port I put the "CIRCUITPY" drive on an SD card and it worked with multigig just fine.
One limitation to check is that the QSPI or XIP peripheral supports flashes of the size you want
CircuitPython version
Adafruit CircuitPython 7.2.2 on 2022-03-15; Adafruit Feather RP2040 with rp2040
Code/REPL
No code or input needed to reproduce the problem.
Behavior
Connection lost (read failed: device reports readiness to read but returned no data (device disconnected or multiple access on port?))
Use Stop/Restart to reconnect.
This message occurs shortly (<30 seconds) after connecting thonny 3.2.7 to an ```Adafruit RP2...
Fully understanding people are busy, which includes myself and why I am asking, but does anybody internally or externally to Adafruit have time to help me with some modification to Circuitpython for external clock support. I have more money than time at the moment. And somebody that is much more familiar would be a help as well .
@dusk gull If no one responds here, maybe try posting on the Adafruit job board?
Thanks Paul, I will try that next. I am hoping to catch the eye of somebody familiar with the clocks side of this. Basically a paid improvement to the ecosystem. But I understand that the people here probably are quite busy.
Is the CI acting up for anyone else?
Hopefully I'm not reposting 😬
Particularly on libraries, I'm having trouble in the "Install dependencies" step
that's usually an actions problem
Rerunning resulted in the same issue for what it's worth
I guess I can file an issue there, thanks!
¯_(ツ)_/¯
I don't think there is work to disable it completely. deshipu only added a flag to remove the Blinka logo: https://github.com/adafruit/circuitpython/pull/5298
Actually it looks like it links back to adafruit/actions-ci-cirvuitpython-libs
With install.sh
Do you see this on 7.2.1 or 7.2.0?
See https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/adafruit_feather_rp2040/en_US/ for previous versions.
@nicolasff Are you able to do a PR for this? You are in the best position to test and fix. Thanks!
And what is the host computer OS and version of Thonny you are using?
Ya, I didn't follow that. I'm used to seeing someones example code and the backtrace for the exception they are seeing.
The simplest thing is probably to switch this check to this shared checker: https://github.com/adafruit/circuitpython/blob/main/py/argcheck.c#L173 It includes the variable name and the expected range in the error.
Would you be willing to try and make a PR to do it? You've already found the spot to change. :-)
Creator ids are documented here: https://github.com/creationid/creators Please make one for LilyGo on their behalf and we could make a second repo to list the creation ids for them. We don't actually need them involved. It's just good to document them somewhere.
Further investigation shows that the ESP IDF function get_calibration_offset() is returning a different value than it previously did. This is used to calculate the returned voltage value, and is the cause of the change in CP7.2, which now uses a newer IDF.
It looks like there was a significant change in the IDF when it comes to calculating the calibration offset.
@tannewt, do we need to change our calculations in CircuitPython to adjust for this?
This looks good too. Thank you!
@aivarannamaa FYI. We switched our autoreload a bit and may have broken Thonny.
@DavePutz I have no idea. You are the expert at this point. :-)
This brings in the reload changes which will be good to test on main. It also brings in the removal of CIRCUITPY_AUTORELOAD_DELAY_MS definitions in each board that were never changed but copied everywhere.
ok, I think we could do a 7.3 release once 6160 and 6144 are merged
z00m
And also the espressif I2c pullup fix
oh, I am seeing a crash with wifi on main now though
do you want to do it, or if you want, I can. I could show you in screenshare how to use AWS Athena if you would like an example
I can do it. I want to look into this wifi stuff first
I think the httpserver library needs to go into the bundle
do you want me to make a release of the HTTPServer library? I was thinking about replacing it with Neradoc's library or https://github.com/deckerego/ampule
Seeing the problem on 7.2.2, not seeing it on 7.2.1, Thonny version 3.2.7, Ubuntu 20.04.4 LTS: Linux ub2004 5.13.0-35-generic #40~20.04.1-Ubuntu SMP Mon Mar 7 09:18:32 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux.
do you want to support it?
eh, I could, but it could be nicer. The routing is pretty weak. The other WSGI libraries don't do file transfer out of the box, though, it's part of the routing code
I thought it was going to be used for the wordle stuff, but that's still in process
I wrote it as a bespoke thing for the word game demo
do you have a use for it immediately, so you want it in the bundle?
I was trying to use it and noticed it wasn't in the bundle
it was because I wasn't really satisfied with it, but it works ok
I've got an idea on how we could do a wifi workflow and I was trying to start from it as an example
main thing is that it supports EAGAIN, which some other ones didn't
we can release it as 0.x.0, and the API will change
release is different from being in the bundle
ok, I will PR it to the bundle
lol
you can always bump a major version number
https://github.com/adafruit/circuitpython/pull/6144 is waiting for a final ok
ah, i missed your resolution
np, I can bug you more and more as needed
@onyx hinge I'm considering picking up your mdns work
@slender iron I think that would be great! You had a clear idea about some of the naming stuff, and I'd love to see it finished.
I'm wondering if we could use it so expose a rest api at circuitpython.local
for a wifi workflow
I wasn't thinking about wifi workflow pe se but that would sure help
I'm wondering if code.circuitpython.org could do requests to circuitpython.local
you can also (by going further than my patch set) actually define a service so that programs can enumerate just circuitpython-style devices
that I do not know
I'll rework your branch so I can test it
won't hurt to have a mdns module anyway
have you tried .local on your phone?
I wonder if android and ios do it too
on android, chrome and firefox can both browse to a "http://example.local" address. of course, you can never have an SSL certificate for a .local so https would bring up warning dialogs
I wonder what that warning looks like if you have json do a request
I'm picking this up. I want to experiment with MDNS.
apparently insecure websockets ws:// are basically not allowed. wss:// presumably requires a valid security certificate matching the name being used
@lone axle I updated the gist, by the way. jfurcean suggested moving the time calculation into the key event instead of outside of it, and said it eliminated the flickering. I wasn't seeing it using the LED Animation library anyway. I left the "manual" pulse code in there as well in case you'd rather do that. Let me know what you think and I can PR it to your repo. Or I can PR it and you can review it that way, if that would be easier.
- Install the Browser extension to test unsecure (ws://) connections
- Modern browsers do not allow connecting to an unsecure server from a secure origin.
[from some online web socket test page]
Either way, wanted to let you know it's working, you don't have anything to fix. It's now a matter of preference. 🙂
seems like they should have an exception for .local
we can do insecure websockets from insecure pages though right?
maybe circuitpython.local is the main page you visit
Nice! thank you. I did assemble one of my neo key featherwings today. I'll try out the latest version tonight after class (about 4.5 hours from now). I'll reply here once I've had a look, if you're already done for the night by then though definitely don't worry about PR or anything till tomorrow.
Yeah it's food time relatively soon, so definitely tomorrow. No rush on testing either. Simply wanted to make sure you knew there wasn't anything to fix anymore, since that was the last status.
I'm not sure of the full context of what you're discussing but I do know that insecure ws:// connections can be made from an insecure http:// page at least in my experience with modern browsers. I've mostly used http://localhost:8000/something pages for it and have successfully tested websocket stuff that way.
@lone axle I'm thinking we could have circuitpython devices editable that way
if the webpage is deployed and is under https:// protocol then the browser will not allow it to connect to insecure websocket though ws:// will not work in that case.
we use mdns to advertise circuitpython.local
each device checks for circuitpython.local before it takes that name
you could do a wildcard cert and dns trick like plex does
Interesting. So user would be able to open their browser on another PC on the same network to that page and it would be a basic code editor / file manager type thing?
That would be awesome
it can also run the detection for other devices and publish their hostnames
(this is what I'm trying to test to make sure it's possible)
@slender iron from a https page you can't request a http page via javascript, firefox says "Blocked loading mixed active content “<url>”"and links to https://developer.mozilla.org/en-US/docs/Web/Security/Mixed_content
Going https with a bad certificate also fails with no chance for the user to allow.
right, makes sense. so we can't have code.circuitpython.org do it directly since it's https
but circuitpython.local could be a stub that loads resources from code.circuitpython.org
trying to exlain this but i got censored haha
too many asterisks?
This week Plex, a self-hosted media server, announced that they now offer TLS to secure all connections, including those to the user's servers. This is actually pretty interesting. Background A quick overview of the Plex architecture to understand why this is different from the average HTTPS deployment. The server is
the xs I think probably got it caught by the bot.
yup
tldr: it allows the https site at app[dot]plex[dot]tv to request local addresses over https
haha, that's tricky
that's interesting but I doubt you'll get letsencrypt or other free and api-driven issuers to let us play that game
I'm not sure we need to either
as long as we're ok not encrypting locally
and anyone who cares could setup their own domain and certs
get something working, then find help from someone more sophisticated, isn't the worst way to do it.
though you have to go into that discussion with little attachment to your code or architecture
that's how I try to operate
my security cams at home are .local and have a self-signed certificate, works fine (once you allow the cert)
interesting...
@crimson ferry what's your feeling on doing a wifi workflow this way?
hadn't thought about it, not sure I know enough to have an opinion at this point
any objections to an iterator style of results for searching for services?
similar to ble scanning
@slender iron you could always look at what was done in this micropython lib, even if you don't directly adapt/adopt it https://pypi.org/project/micropython-mdns/ .. there's also this, but it's deprecated https://github.com/home-assistant-libs/netdisco and whatever this is .. at least it's actively developed? https://github.com/xlfe/radiale
ya, I'll take a look at those
I saw zeroconf for cpython but don't like the query method
I'm sure you can find some other ones. nothing I found seems super well adopted. maybe I was on the wrong search terms, I don't know how mdns, dns-sd, zeroconf, avahi, and maybe some other name all interrelate
I like the potential that circuitpython.local will "just work"
In the past I have done a lot of custom boards using Micropython, lately I have been moving to SAME51 chips and one client is wanting to use Circuitpython.
So far the main limitation I have found is support setting external clock inputs, and allowing them to be just a clock input (bypass mode) so I can use an oscillator instead of a crystal. There are two main clock inputs so having that selectable would be good also.
Ideally this would be just another value passed in the board config...
https://godbolt.org/z/sTPG4eoKv Apropos of nearly nothing, I was sketching out a ROM emulator for RP2040. I believe output enables can be handled from a PIO module, so this function just concerns itself with reading the address [12 of them at GPIO2..13], indexing into the ROM array, and sending the data back out the GPIO.
clang implements the bit trick I was thinking of when I chose to put address[0] on gpio2, while gcc needs two additional instructions to do the address calculation. Chalk one up for clang's optimizer. I still think it'd be neat to see if we could build one of our ports with clang someday.
My long-suffering friend whose workflow involves a DOS computer, a floppy, and a UV-eraseable EPROM needs something better... no, it won't be a circuitpython project 😁
I'd like clang too but the code size has always been more than needed
should be easy to do on a per-port level
@onyx hinge here is my mdns working branch: https://github.com/tannewt/circuitpython/tree/mdns
I got pretty far today
Looking at adding type annotations to adafruit_imageload, and it says in the functions that it accepts things using the Bitmap and Palette APIs. Does that mean there should be a typing.Protocol for those types in circuitpython_typing?
@idle owl I tried out your latest version. Nice job, I like the led_animation variation better than the pixel color manual fading. Looks good to me. When you have a chance PR it and I'll get it merged in.
can you point me to one of the ones your looking at? I'm inclined to think we'd use the class Bitmap or Palette from displayio rather than a protocol, but maybe I'm not thinking the right thing.
Seperate from that, I did have the thought the other day that Color would be another good typing protocol for us to have though. and it would allow tuple 0-255 values or hex i.e. (0, 255, 0) or 0x00ff00 lots of things support these interchangably.
Ah, I see. It could import them from Blinka_Displayio, but maybe separating it from that and having it exist as a protocol would be better than requiring it. I think those classes should exist in the stubs for the core as well. I wonder if we can reference those with our types.
Hi
I added board ssci_isp1807_dev_board developed by our company.
Hi
I added board ssci_isp1807_micro_board developed by our company.
Here’s a brief summary of what I did to make the bitmap redrawing work.
- Call
lcd_ll_startonce in an initialization step. - I hacked the ESP-IDF definition of
esp_lcd_panel_tto include a new function to do the bitmap copy only. This function checks the x,y bounding box ranges, takes the Semaphore, copies the bitmap into the framebuffer, flushes the cache, then gives back the Semaphore.
Note, the esp_lcd_panel_t Is the generic base class structure for a panel, and each d...
Some fixes with countio.Counter.__init__ typing:
- Parameter
pullwas missing its default ofNone, causing IDEs to falsely warn/error - Docstring was missing the name of params
edgeandpull.
A macro in py/bc.h declares five variables that are used to hold data temporarily, without their values being used after the assignments. This causes "unused-but-set-variable" warnings in clang 13. We mark these variables as explicitly ignored to avoid this new warning.
Initially reported in #6158; the fix with (void) var_name; was suggested there and I was asked to open a PR with this fix.
@tannewt opened! I noticed that the same issue had actually been addressed with other macros already, e.g. in cfd08448a1cba0040ad3c62bce02b5f8bd76dd1d.
I hit more warnings somewhere else while building mpy-cross (negative array bounds with sp[-MP_OBJ_ITER_BUF_NSLOTS + 1] in py/vm.c), I'll investigate and will open a separate issue once I understand exactly what's going on. I looks like clang being too strict and not recognizing a previous pointer increment.
CircuitPython version
Adafruit CircuitPython 7.2.2 on 2022-03-15; Adafruit FunHouse with ESP32S2
Code/REPL
import board
import time
from i2cperipheral import I2CPeripheral
from adafruit_dotstar import DotStar
dots = DotStar(
board.DOTSTAR_CLOCK, board.DOTSTAR_DATA,
5, brightness=0.2)
def dispatch(request):
print(request)
def service():
t=0.25
with I2CPeripheral(board.SCL, board.SDA, (0x42,)) as device:
while Tru...
I was able to reproduce this, but if I convert the mp3 to mono first, it goes away. Reducing the bitrate further didn't fix the issue.
Unfortunately I'm not able to reproduce this with the exact same setup: Thonny version 3.2.7, Ubuntu 20.04.4 LTS, RP2040 Feather with CP 7.2.2. I also tried Thonny 3.3.13 and RPi Pico with the same result.
I do get this error when I disconnect the USB cable, but this is expected.
With 7.2.2, ReloadException is printed when a file is written when code.py is not running or does not exist
>>>
ReloadException:
>>>
ReloadException:
>>>
ReloadException:
>>>
ReloadException:
>>>
ReloadException:
>>>
ReloadException:
>>>
ReloadException:
>>>
ReloadException:
>>>
ReloadException:
>>>
This is probably the cause of #6159.
I see this, noted in #6159:
With 7.2.2, ReloadException is printed when a file is written when code.py is not running or does not exist. Reported in #6165, and probably subsumes this.
>>>
ReloadException:
>>>
ReloadException:
>>>
ReloadException:
>>>
ReloadException:
>>>
ReloadException:
@slender iron @onyx hinge We need a 7.2.3 ^^. I am going to the dentist in less than an hour. Will see if I can fix it before then.
ooof thanks dan
(gdb) bt
#0 mp_obj_print_exception (exc=0x20002208 <mp_state_ctx+84>, print=0x6385c <mp_plat_print>) at ../../py/obj.c:204
#1 pyexec_friendly_repl () at ../../shared/runtime/pyexec.c:667
#2 run_repl (first_run=false) at ../../main.c:784
#3 main () at ../../main.c:890
backtrace, just documenting in case I have to stop before done; have to do non-work things now
I think this is because autoreload_suspend is not being checked before raising the exception in one or more new places
off to the dentist, back in 2-2.5 hours, prob
You could just remove the purchase section altogether since the board isn't available.
Section removed.
@fabaff, @makermelissa, my sincere apologies I missed this while it was happening. Yes - VINA-D21 is no longer for sale. VINA-D51 has always been a separate product, so it is not a replacement. And I apologies for not making these updates myself. :-(
Thank you!
@slender iron i think I have a a fix for autoreload issues from this morning. finishing testing
@tulip sleet ok great! I just got to my desk
Is there a way to redirect (or copy) sys.stderr to usb_cdc.data?
@tulip sleet are you sure we want to ignore triggers during all suspends?
I guess that matches the old behavior
I originally put a check for autoreload_suspend in the initiate function, but it didn't work quite right
initiate is used by supervisor.reload() too
so that needs to be thought of separately
I think there are some races, but in general, if you're suspended, you don't want an autoreload, even a deferred one.
there is something broken about the PR: it didn't start a build or post here
I'm opening an identical PR
I dunno. An issue posted. It looks like just that PR
reverting it all is an option, now that we know it's more of a can of worms than initially anticpated.
I like to think that we're close
Me too, each time
I think the new way is better, but it's not quite what people expect. There was a significant bug in 7.2.0
folks can always use old versions too
what we had was inadequate testing
@tulip sleet do you have a feather rp2040 build?
yes, I do, you want to try it?
ya, agreed
yes please
right after talk of inadequate testing 🙂
of course I don't use thonny anyway
Do not raise ReloadException if in the REPL.
Also undo autoreload suspend before triggering autoreload. This is not imperative, but if autoreload_trigger() were to check the suspend state (it does not currently), it would have the wrong value. This was originally necessary when I was testing a different fix.
- Fixes #6159
- Fixes #6165
Please test! I tested on macOS and Linux with a Metro M4 and a Feather RP2040,
modifying a running code.py, copying a 40kB file while running, and ...
@slender iron did you test with Thonny? I don't know how, but I could try
no I didn't
Do not raise ReloadException if in the REPL.
Also undo autoreload suspend before triggering autoreload. This is not imperative, but if autoreload_trigger() were to check the suspend state (it does not currently), it would have the wrong value. This was originally necessary when I was testing a different fix.
- Fixes #6159
- Fixes #6165
Please test! I tested on macOS and Linux with a Metro M4 and a Feather RP2040,
modifying a running code.py, copying a 40kB file while running, and ...
tested with Thonny, and I made release notes
you probably want to wait until actions is happy again
shakes fist at matrix portal build
in the PR, or locally? Maybe we should think more about what to remove
in my 7.2.2 pr
freezing stuff is so inefficient
@viscid pine https://github.com/creationid/lilygo-creations
I like the LED Animation option better too - the manual option limits the colors you can use. I'll PR it this week/weekend!
FYI - GH actions appear to be down right now, just did a PR and nothing ran
https://www.githubstatus.com/
Yah, see a lot of conversation above. It's been down for a bit. 😕
It is delayed. It eventually runs. I closed a PR and and opened an identical one, but that was a waste.
@tulip sleet cool. thanks. i'll just keep an eye on it.
No, usb_cdc.data is meant for user controlled output. What are you trying to do?
Tested with Thonny on Linux, seems to work as expected. I am not very familiar with a Thonny workflow.
You are accidentally changing the esp-idf here too. It was updated yesterday so you may have pulled without updating submodules.
The fix itself looks good. Thanks!
You found the right repo. We're happy to review and merge pull requests.
Us Adafruit-funded folks don't have the time to add this either though. Others can speak up if they'd like to help. The Adafruit jobs board is another place to get the offer out there.
It'd be awesome to have you available as a contractor for CircuitPython. You aren't the first person to want to hire someone to make additions.
displayio should only update pixels that have changed. However, it may do it multiple times if objects provide dirty areas that overlap. The computation result should be the same though.
Looks good. Works well on Linux and Mac with file transfers and code.py edits from Sublime Text.
And also the espressif I2c pullup fix
I am definitely still getting up to speed with circuitpython and developing on the build system. But I do work with others that are. I think with minimal pointers on review I can help get this developed.
I feel like github search in repo is less powerful than it used to be, as I am trying to search for references to function calls in the clocks section so I can continue to piece together how to modify this, both to test it works and to suggest implementation changes for a pull request.
...
CircuitPython version
Adafruit CircuitPython 7.2.2 on 2022-03-15; Adafruit CircuitPlayground Express with samd21g18
Code/REPL
import time
import gc
print(gc.mem_free())
import digitalio
import touchio
import busio
import board
import usb_midi
import neopixel
import adafruit_lis3dh
print(gc.mem_free())
from adafruit_midi import MIDI
from adafruit_midi.note_on import NoteOn
from adafruit_midi.control_change import ControlChange
fr...
PRs like https://github.com/adafruit/Adafruit_CircuitPython_SSD1322/pull/16 are competing PRs to resolve the same issue
I feel like github search in repo is less powerful than it used to be, as I am trying to search for references to function calls in the clocks section so I can continue to piece together how to modify this, both to test it works and to suggest implementation changes for a pull request.
https://cs.github.com is an invite-only codesearch beta that is very nice. You might want to get on the list.
@tannewt and I use ag or similar grep -r tools to search through the source tree.
Automated website update for release 7.2.3 by Blinka.
Dang I just install 7.2.2. 🤷
I reinstall 20 times a day 🙂
@tannewt want to pull in the latest autoreload stuff?
Oops, I caught that locally but never pushed. Thanks!
Confirming that Adafruit CircuitPython 7.2.3 on 2022-03-16; Adafruit Feather RP2040 with rp2040 fixes the bug. Thank you for the amazing turnaround!
@tidal kiln With three address pins (+1, +2, +4), and a base address of 0x20, is the max available 0x27?
And there's only 8 possible addresses that way?
MCP23017 I2C GPIO expander
Three address pins instead of the four I've been dealing with lately.
Ok.
I'm doing up another table for you. 🙂
Wanted to make sure I had done the math right.
you're setting these 7 bits. one is pre-set to 1. the others, A0 etc are set by the pins
>>> hex(0b0100000)
'0x20'
that's A0=A1=A2=0
the first three bits
>>> hex(0b0100111)
'0x27'
etc
yah, table looks correct
Thank you!
oh, and 3 of the bits are set to 0
basically, the first four are always 0100 and you only change the last three
Ok, that makes sense from the image you sent
@makermelissa Is the reworked library now working fine on MagTag and an M4 with AirLift (ESP32)? Should I retest both with the Google Calendar project?
@dhalbert, the examples were rewritten for both MagTag and PyPortal to make better use of resources. You can retest if you would like, but I still need to come up with a simplified example that causes the problems.
@lone axle In commenting my code, I realised something we missed. There's no hours conversion in the code! I'm pretty confused by how you did the minute and second math (Python magic!), so I have no idea how to make elapsed_hours happen, and I also don't know how to add it to the _time_str. Related, does _time_str need to be private? Seemed a little odd in this code, but perhaps there is a reason I am missing.
The meetings do top an hour from time to time, so I think it's worth adding hours to the timestamp versus using extended minutes.
There isn't a specific reason I made it private really, just auto piloted to that. we could drop the leading underscore.
Ok, will do!
@lone axle I added separate directories for the MacroPad and NeoKey versions. I think it's worth renaming the repo to "CircuitPython_Timestamper" once this is merged. 🙂
@idle owl Agree'd I will change that. RE the minute / second math:
elapsed = CUR_TIME - START_TIME # elapsed running time in seconds
elapsed_min = elapsed // 60 # total seconds divided by 60 in order to get minutes
elapsed_sec = elapsed % 60 # "remainder" of seconds past the highest full minute
I find it easiest to think about with a specific example in mind. So lets say that the counter has been running for 730 seconds.
elapsed will be 730.
elapsed_min will be 730 / 60 which is 12.16667. But it uses the double slash division to drop the remainder decimal portion so we end up with just 12
elapsed_sec is where we will get back that remainder decimal that we ignored in the previous step. I tend to think of % modulos as the very first way that I learned division in elementary school. We would divide and get answer and remainder (rather than exact answer with decimal). Modulous operator will find just the remainder portion and ignore the answer portion.
So 730/60 = 12 with remainder 10 so the modulos value is the 10
In this example we end up with 12 elapsed_min and then 10 elapsed sec. So our 730 seconds is equal to that 12 minutes 10 seconds.
Ah ok
So we'd have to do hour math, and then add logic that if it is less than an hour, don't include the hour in the string, or let it include 00:00:00 all the time?
Yep that is correct. I think I like leaving off the hour if it's not needed even though it's more logic in the app. it matches how youtube shows the time that way
Exactly! That's what I was thinking.
I'll add that functionality to it. I'll go ahead and put it into both of them after it's merged.
Oh, ok. That works. I super commented the code, so it'll need more commenting if new code is added.
I'll submit a PR now, it's ready other than the hour code.
sounds good. Thank you for adding the version for feather and all of the comments!
You're entirely welcome! I'm looking forward to using it.
@idle owl unrelated but interested in your opinion on this. What if we had an extra marking that got rendered on this page: https://circuitpython.org/contributing for PRs that are in draft status?
Hmm. That would be nice. I can see how that would be helpful too.
I'm not sure how it gets generated. But I am curious to learn more about how it comes together. I'll poke around in circuitpython-org repo a bit sometime to see if I can figure out how to add that.
Ok, sounds good.
Please keep me posted on the addition of the hour code. So I can pull it down, test it, and most importantly... use it.
I just pushed the change for hours to the NeoKey Featherwing one. I'm going bring the comments to the macropad one as well so it'll be a bit longer before that one is pushed.
I cheated by adding arbitrary extra time to CURRENT_TIME in order to test and it seems like it works as expected, but the true test will be in ~55 minutes when it's run long enough to roll over on it's own.
Yeah I thought about trying to add it myself, but had no idea how to test iterating when it only rolls over every hour. 😄
My other job has from time to time required programming things that rely on relatively long schedules before. After waiting for long timers to elapse only to realize some reason why something was broken a few times I started figuring out how to artificially raise things to get some basic sanity checks done more quickly. Occasionally something will still fail due to unforeseen real-world circumstances, but have saved so much time catching basic stuff this way.
Makes a lot of sense!
For reference, this comes from the MPLAB configuration, which shows that the basic config of setting enabling the XOSC0 or XOSC1 is enabled for both crystal and oscillator, just the mode is set to either external clock or crystal.

Whenever calling supervisor.reload() on my new, freshly updated Slider Trinkey, it just stops the code, forcing me to manually reset the device for supervisor.set_next_code_file() to take effect, which isn't the case for my other Trinkey devices running Circuitpy. I pasted the relevant code below:
`import time
import board
import analogio
import supervisor
import neopixel
import touchio
import gc
pixels = neopixel.NeoPixel(board.NEOPIXEL, 2)
analog_pin = analogio.AnalogIn(board...
oops. I meant to test that....
Lowering the sample rate of the mp3 down from 44100 to 16000 makes the issue go away. I think the noise i just stuttering because the processor isn't keeping up.
@idle owl It successfully wrapped to an hour and seems good 01:13:21
Great! I have it running here too. I'm only 14 minutes in though. 😄
Thanks, I make BOARD=??? clean after each build.
I restarted from scratch and managed to build the firmware with asyncio working. I had to tinker with circuitpy_mpconfig.mk which is not optimal (as opposed to a purely mpconfigboard.mk solution) but I understand you cannot easily serve all kinds of custom builds and the stock build types at the same time.
BTW make -j4 BOARD=trinket_m0 clean all doesn't work...
Please revert to 7.2.0 for now. We reworked the auto-reload code extensively to fix some issues, and missed some edge cases.
I just had a problem with a program that stalled/crashed when I had the console turned off. So it would have been nice to see the traceback in data. But I found the bug in the meantime (I queried usb_cdc.console.connected when usb_cdc.console didn't exist so I had to change the respective line to if usb_cdc.console and usb_cdc.console.connected: ...
@bd34n, thanks for the clarification.
CircuitPython version
Adafruit CircuitPython 7.2.3 on 2022-03-16; Raspberry Pi Pico with rp2040
Board ID:raspberry_pi_pico
Code/REPL
nothing
Behavior
nothing
Description
when i drag or copy .uf2 file in pi pico its not giving me all files in that i wan't
Additional information
nothing
anyone looking into the supervisor.reload issue?
(I just subscribed to github status here using a webhook)
@tidal kiln I managed to explain the address jumper concept to Liz, and blew her mind. She's never understood what they do, only that they change the address. Anyway, point is, you taught me well enough to teach someone else. Thanks!
@idle owl 0xneat!
This doesn't seem like an issue with the code. Please post here for general support: https://forums.adafruit.com/viewforum.php?f=60
CIRCUITPY_CREATION_ID = 0x00C30001
CIRCUITPY_CREATOR_ID = 0xC3C30000
You may be able to send it yourself. supervisor.get_previous_traceback() should return the last traceback string.
I did not have a chance to start that yet
Generally, I only clean if I get a QSTR error or change a makefile. The rest of the time, you should be able to do incremental builds.
@tidal kiln Still not comfortable explaining how it maps to bits, but explaining how to calculate the addresses, and what that part means is pretty clear to her now. 🙂
I can picture how it maps, but can't put it into words well enough to teach someone else.
Let's fix it in the libraries instead. We should not use str to send binary data.
ah. yah. with just words, tough. that diagram from datasheet should help though?
Oh right. Yeah.
it's a very simple mapping. there's not much going on.
Issue is, I at least have some experience with registers and so on, so the image makes sense to me.
We have to get that part clear first.
don't really even need to think about registers
No, I know
just binary notation for numbers
But I'm saying picturing how bits work is easier for me because I've worked with registers.
Yeah I tried to explain from that stand point too
To say there were eyes glazing over is an understatement 😄
fwiw - i'm constantly doing quick checks in python, things like hex(98) or print(0b100110)
me too
Yeah I mentioned how you usually show me the results in Python.
i don't have one of those brains that can think in arbitrary base. i'm base 10 only. 😦
Is there a learn guide that talks about binary (and even hex, and octal). It could be useful for a lot of concepts
for a long time I didn't even know how to convert between decimal, hex and binary, I just used functions for that, it was just enough for me to know they are different representations of numbers
no unary system :(
Here is what 4.1.2 has available in the REPL:
Adafruit CircuitPython 4.1.2 on 2019-12-18; Adafruit CircuitPlayground Express with samd21g18
>>> import gc
>>> gc.mem_free()
21168
And 7.2.2:
Adafruit CircuitPython 7.2.2 on 2022-03-15; Adafruit CircuitPlayground Express with samd21g18
>>> import gc
>>> gc.mem_free()
17808
I glanced at the map file and think this is a combination of TinyUSB updates and the switch to split stack (c and pystacks).
The difference...
I wonder if there was something that gave a practical example as to why you use them. Such as registers for binary, colors / addresses in hex. I know for me examples always help.
Hmm.
hex is mostly used because it's easy to convert to binary, and always has the same number of digits at 8 bits
well, ok, the latter is true of any system if you add leading zeroes
I'd suggest generating the code from MPLAB for the setting you want and comparing to what we have in samd-peripherals. Generally changing clocks means you need to ensure the dependent clocks (especially USB) are the correct value.
I always feel hex is a shorthand to binary. At least when it is 1 or 2 digits. Many more that gets tricky to picture
we put bytes at addresses that are multiples of 8, so hex maps naturally to that
it's easier to see 0xFF0000 as "red" vs. 16711680
Sure, I might as well since the CI didn't run on that last commit. Will look at the supervisor.reload issue first.
@tidal kiln then 0xff doesn't scream "blue" at me
I always guess my way through hex colors when trying to make colors other than red, yellow, green, cyan, blue, violet.
For colors I try to always use leading zeros (e.g. 0x0000FF for blue) for clarity
This is the way
I used to work as a web developer a few years, so I can look at a color and type its hex rgb
That sounds like a talent.
it's just repetition
I never got to that point, though I can do yellow, cyan, magenta, and infer shades of it
but if one of the components is not zero (or equal to another one), I'm lost
Agreed about this. Would be nice.
the absolute difference between components gives you the saturation, the balance between them gives you hue, and the average value gives you brightness
Then add the gamma stuff PaintYourDragon uses for LEDs and really make your head hurt 🙂 But it looks so nice
Uff.
it's easier to think about colors in terms of HSV
Not for me 😄
Never thought of it like that (or read it). That's really cool
you have to make the correction that blue doesn't add brightness
because of a bug in how our optic nerves are connected
this is why even blue light seems dark
We are super buggy.
you want bright blue, you have to add red and green to it
I was reading why we cannot make brown in LEDs that also was messing with my head
I want to object to the idea that blue light seems dark, after I put black tape on a billion electric devices with a piercing blue LED 😉
orange leds will look brown if next to other leds
Neat I should try that. For my game timer I have player color and brown is fairly common but could not get a good "brown"
I, too, have many devices with multiple layers of gaffers tape on them.
yeah, brown is orange next to something that makes it look brown 😉
I mostly tape the logotypes, because being autistic I can't help reading them each time I look at them
so it's very annoying when I think "DELL" each time I look at the screen
I mostly tape things headed for the bedroom, because I can't sleep with any form of light in the room. It's.... more than annoying.
Oof, that would be annoying.
in Pattern Recognition the main character is allergic to logos and excessive design
Now that you say it, I'm suddenly hyperaware of all of the names and logos on everything on my desk. I can't imagine dealing with this all the time.
Have I told you about the awareness of tongue? ;-)
Oh wow I remember reading that ( I think I read it vs saw the movie)
there was a movie?
right ? Asus, Samsung, Belkin, Plantronics, JBL... Clue
lol. I kind of deal with that... I get dehydrated and then my tongue starts to push into my teeth and cause pain and I have to deliberately hold my tongue off of my teeth to avoid it..... It's.. not easy.
IMDB told me when I googled it to see.
ouch, sorry for that
yeah, many bugs
🤷🏻♀️ I remember decades ago being told by my orthodontist to hold my tongue back because it was pushing my teeth out. I never mastered it, and my teeth now have huge gaps between them along the inside. Perfect for a tongue to fit into and kind of get chewed on. 🙄
I didn't realize tongue can be so strong
I agree, and that is what I started. One good thing about the external clock vs crystal is basically all the clock settings are the same except if you need to drive the crystal or not. I am hoping this could be a single flag.
One thing that is odd to me is CAN at speeds greater than ~125K wants a much higher accuracy clock, but the Feather M4 CAN only as the 32kHz crystal on it. So I am not sure if it actually fits into the expected tolerance for CAN at 250K and above.
Tested on Linux and macOS with Feather RP2040.
- Copied 40k file to CIRCUITPY while running.
- edited
code.py. - wrote a
code.pywith asupervisor.reload(). Works as expected. supervisor.reload()in the REPL does nothing (as expected, I would think).
All behavior is as expected. Thanks!
Tested on Linux and macOS with Feather RP2040.
- Copied 40k file to CIRCUITPY while running.
- edited
code.py. - wrote a
code.pywith asupervisor.reload(). Works as expected. supervisor.reload()in the REPL does nothing (as expected, I would think).
All behavior is as expected. Thanks!
(had to shrink a board build)
@slender iron my xhci driver gets upset too, and it's an Intel board with its own USB hw. I think it's Linux drivers. Every few days I lose all USB and have to reboot
ya, mine is an asus motherboard
ugh pylint and its:
adafruit_esp32spi/adafruit_esp32spi.py:389:26: E1101: Module 'struct' has no 'unpack' member (no-member)
@jaunty juniper As long as everything else is happy, it's ok to explicitly disable Pylint no-member for that line. Sometimes it's the nature of CP that Pylint can't find things where it expects to.
I believe that's an error that only happens locally, not in the CI, I'm just baffled since it's a basic built-in module in python
I had a case where it would not report 10 struct errors if there was another error in the code, but not if it's the only one, so it went away on its own 🤷
The CI often has more things installed than you do, so it is able to find things more easily.
I ran into that quite a bit, but the more libs and Blinka stuff that got installed, the less it happened.
I think that's part of the issue though, is that CP doesn't have struct bits where it should, so it's looking for it where Python would keep it, and it's not quite right.
Lowering the sample rate of the mp3 down from 44100 to 16000 makes the issue go away. I think the noise is just stuttering because the processor isn't keeping up.
How do you go about lowering the sample rate of the mp3?
How do you go about lowering the sample rate of the mp3?
I use Audacity. Lots of tutorials online on how to lower the sample rate and always worked well for me.
lowered to 16kHz and its producing the same static noise on mine.
@prplz are you still using the following code? or a different one?
`import board
import audiomp3
import audiopwmio
audio = audiopwmio.PWMAudioOut(board.GP0)
decoder = audiomp3.MP3Decoder(open("slow.mp3", "rb"))
print("Begin playing!")
audio.play(decoder)
while audio.playing:
pass
print("Done playing!")`
ah I had a mysterious version of pylint installed in /usr/local/bin/ not sure from where 🤷
Ahhh. Sneaky.
I know I have an extra one somewhere, it keeps telling me I don't need it anymore, but I'm lazy.
oh wait that's not the issue in the repo itself
Ugh.
bumping the pylint version from v2.11.1 to v2.12.2 in .pre-commit-config.yaml solved it
Um... This is for an actual lib? We don't want to change the config files on a single library and not others. And changing it across the board is a whole other process.
I wonder if pre-commit had a weird version cached independently too
Also possible. I'm not sure how it reinstalls after the first run if something changes.
after I changed the version it showed that when I ran pre-commit:
[INFO] Initializing environment for https://github.com/pycqa/pylint.
[INFO] Installing environment for https://github.com/pycqa/pylint.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
HA deleting ~/.cache/pre-commit fixed it
Oooh.
had to snoop to find out where it was running pylint from
Nicely done!
I've been trying to piece together a simple example, but it just keeps not failing. Unfortunately, maybe a complex example is all that does fail, like maybe it's related to memory or something. You can still access the old Google Calendar code before I fixed it up here:
https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/d9e11884fbe45d1502447be6f74f665a4be47c2c/MagTag_Google_Calendar
Can you upload slow.mp3 somewhere so I can try it?
Here are the ones I'm using: mp3s.zip
mono.mp3 is 44100Hz with one channel and stereo.mp3 is 16000Hz with two channels
yes
slow.zip
I will try your sounds when I get a chance. Again I am using the STEMMA speaker from adafruit
any opinions on what the default hostname should be for networked circuitpython devices? maybe cpy-<board name>-<mac>?
Nina uses arduino-**** with the first 2 bytes of the mac address
mac is kinda long to use the whole thing? But not sure of another good method to make the names unique
which is weird now that I think of it, aren't the first bytes the manufacturer ?
yup as far as i recall
maybe it uses the last bytes
last 2-3 bytes may be okay, kind of a balance of ease of remembering for newbies to uniqueness
ideally you won't need to remember
Your mp3 files play fine for me. I'm just plugging the PWM pin straight into the line in on my computer (I know, probably not the best idea).
Could this maybe be an issue that the speaker has with PWM? I will see if anyone can do some more testing with other boards and PWM.
I think I can have a unique name and circuitpython.local
this one would be cpy-espressif_esp32s3_devkitc_1_n8r2-7cdfa1e076e0
Can you test this with a dac instead of PWM?
let me see if I have that
samd usually have dac, right?
ya
turns out the example mp3 file was already low sample rate and plays fine, the thing i was experiencing was different completely :(
running out of ideas
hmm your stereo.mp3 works for me, but not my slow16kHz.mp3.
The stereo.mp3 plays very quietly and the sound goes away when I try changing the volume on the STEMMA speaker itself.
how do you connect it straight into the computer line is that pin 0 on the raspberry pi pico?
the plot thickens
Are underscores valid in a hostname?
I think so. I hardcoded it and it worked
I think shorter would be better though because on my phone you only see the start of the long hostname
with cpy-<mac> I can see some of the path
That shortened one makes the most sense to me.
thanks @jaunty juniper
I like this.
that looks good
ok it's good if I reduce the gain, it was a little too high, that wasn't the case with the PWM
that's the non-manufacturer part of the mac
so there could still be collisions but statistically unlikely?
yup
so pwm is just always bad with that slow.mp3?
@tulip sleet httpserver is pretty nice! did you think about handling request headers at all?
I didn't think about anything, hardly 🙂 I took some existing code and made it work better, but it was done in a hurry for the wordle demo
no actually it's good with reduced gain
is there a misunderstanding on how to use the speaker ?
I vaguely recall compression level being a problem for me too. Like too much and it took too long to decode. But I could be wrong
and sample rate
stereo 44.1KHz fails, have to mono it or lower rate
but thats not the case with the file the user has
with the pot on the speaker?
yes
@Neradoc reports that slow.mp3 plays ok if you adjust the volume pot on the speaker, can you try that?
now the next question is: do we have the circuitpython service run on port 80?
8080 ? 8888 ? 5000 ?
I would say not, since the user program may want to use it.
8888 is easy to remember
88
circuit=7 letters, python=6 letters, 76
I wonder if those low ports are reserved in some RFC
probably
we'd need to explain it as circuitpython.local:####/ then
I think that's ok
which would redirect to cpy-######.local:####/
7676 is not in the list
Anything above 1024(I think there?) is free to use
I'm not actually to the point of adding it yet 🙂
there are just some canonical ones, but it doesn't matter, tomcat, etc. is not going to run on a CPy board
I think I did prove out the idea will work though
I can advertise as both circuitpython and cpy-###### at the same time
can you advertise as something.circuitpython.local, that could be on 80, and would not necessarily conflict with a user server on circuitpython.local:80. Does mdns allow that
board.circuitpython.local
not really
the thing I found said it works sometimes
it treats "board.circuitpython" as the hostname
and some implementations don't like the .
hmm, too bad
any domain differentiation would need to be done by the http server I think
We do have this at build time through DEBUG_UART. We don't currently allow boot.py to set it up though.
Let's add a way to work with CircuitPython over the (local) web!
How it should work
- First, load
http://circuitpython.local:7676in a web browser. This uses mDNS to do a local domain lookup. - All CircuitPython devices on the network will reply with their IP. The first will win.
- The browser will then request / from that IP.
- The running webserver will see the
circuitpython.localhost and will return with a 302 redirect to the device's specific domain which will be `cpy-...
Thank you for the discussion! We've now add a BLE workflow and I've laid out what I see for a web workflow in #6174. Let's continue discussion there.
This allows for CircuitPython to resolve a .local domain and find
other devices with MDNS services.
First step for #6174
Given that these devices can (in some cases must) have their SSID/KEY set and perhaps an IP, I think it would be good to add a way to set the hostname. In the secrets.py file, an optional parameter named mDNS name or hostname or the like would be super helpful.
If that isn't found, then the circuitpython.local would be the default. But this allows a longer-term solution when there are > 1 CP device on the network.
Also, why are we using port 7676? That makes the assumption that W...
Given that these devices can (in some cases must) have their SSID/KEY set and perhaps an IP, I think it would be good to add a way to set the hostname. In the secrets.py file, an optional parameter named mDNS name or hostname or the like would be super helpful.
This is possible with wifi.radio.hostname already. The mDNS hostname currently defaults to cpy-###### but we should probably have them align.
#6175 allows for changing the unique name through `mdns.Server(wifi.radio).hostna...
wifi.radio.hostname does make it to the router via DHCP.
The ability to "pin" or reserve DHCP MAC-to-IPv4 addresses is a convenience offered by the router, I'm not aware of any standards that cover it.
As I read this, hostname and mDNS hostname may get aligned, but since wifi and mdns would be separate imports, it should hopefully support use cases where a wifi.radio.hostname is desired but not an mDNS hostname.
Got it! Thank you for assisting me !
If you're making wifi persistent, how about a telnet server too?
Stop resetting WiFi completely between VM reloads. We want to keep the serial connection alive.
This is desirable for web workflow. However, users are currently in full control of starting and stopping a Station and connecting to an AP, starting and stopping an AP, starting and stopping wifi, etc. There should be a mechanism where user code still retains full control of whether / when / how the device interacts with a wifi network, during code execution and across reloads and resets. In ...
ah yes. Good idea. Thanks a lot.
When did alarm.pin get merged into alarm. It used to be imported separately. import alarm import alarm.pin now it is part of alarm.
There was one bit which looked suspicious; aside from that some comments that don't require any direct action on your part.
I appreciate you picking up this work, since I dropped the ball. I didn't do any testing, but I look forward to using it once I remember what project I was working on that called for it.
Instead of true use GC_ALLOC_FLAG_HAS_FINALISER. Not using a finali(s/z)er here would be an easy mistake to make in a fresh implementation of Server; is there a way to move the allocation step to a place where it would be shared by all ports?
For that matter, why is RemoteService in the common-hal? If it's just a container for some data found during a search, then why not make it a kind of NamedTuple or similar, allowing it to live in shared-module.
Is there any need to stop advertising a service short of resetting the device?
@low sentinel I am interested in diving into vectorio a bit to see if I can make some tweaks. Peeking into the code I came up with a few questions that I think you may be able to point me in the right direction on. 1) The DEBUG function here https://github.com/adafruit/circuitpython/blob/8319faa032639012a5618670a5e0797012ccf4b5/shared-module/vectorio/VectorShape.c#L27-L28 in order to "enable" this would I just need to un-comment the bottom line and comment the top line? Then all of the debugging messages will print to serial? 2) The specific I am interested in first is adding an optional argument to constructor to allow user to specify a different color index within the palette for the shape to get filled with (by default it will use color index 0) I found the code that I think is responsible for setting that index here: https://github.com/adafruit/circuitpython/blob/8319faa032639012a5618670a5e0797012ccf4b5/shared-module/vectorio/VectorShape.c#L371 I'm curious if that is actually the right spot though.
We had someone ask about this functionality the other day and It seemed like a nice challenge for me to attempt in order to get some more practice working on things in the core. I happy to tinker with it a bit to get it done but am trying to make sure I'm not way off base with my initial understanding of things.
Hey @lone axle
- correct.
- you’re close, but line 395 is the place in VectorShape. Notice though that VectorShape does support multi-color shapes. If you bake the index into VectorShape you will wall off multi-color shapes, which is not a great thing to do.
Instead I’d recommend either (a) adding the palette parameter to each IShape implementation or (b) writing a Decorator IShape that marshals a 1 from a decorated IShape to a configured palette number instead. Either way seems fine. (a) is more memory and performance efficient (1 fewer dynamic method call per pixel, 1 fewer heap structure).
ESP32SPI UDP Sockets
If you're making wifi persistent, how about a telnet server for the repl too?
Yup! I mention something similar in #6 but forgot to add it to the TODO list.
This is desirable for web workflow. However, users are currently in full control of starting and stopping a Station and connecting to an AP, starting and stopping an AP, starting and stopping wifi, etc.
Agreed! I'd probably add a supervisor.disable_web_workflow() just like supervisor.disable_ble_workflow(). That'd move it ...
I agree, and that is what I started. One good thing about the external clock vs crystal is basically all the clock settings are the same except if you need to drive the crystal or not. I am hoping this could be a single flag.
Great! Simple is good.
One thing that is odd to me is CAN at speeds greater than ~125K wants a much higher accuracy clock, but the Feather M4 CAN only as the 32kHz crystal on it. So I am not sure if it actually fits into the expected tolerance for CAN at 250K a...
This is such a neat idea! Looking over the tasks you've outlined with an eye toward finding some part that I might be capable of helping with, I'm curious if the internal HTTP server that you mentioned is something that will get written with python code? or it's internal to the core and thus written in C?
Thank you! I appreciate the guidance. Do I understand correctly that the -= 1 is allowing it to support palettes with more colors because it will go negative and then wrap back around to the last index in the palette similar to accessing it from python code like palette[-1]?
Nope! I thought about adding it but never did. Will delete for now.
The need for a finaliser is implementation specific in this case (therefore common-hal) because this implementation is a wrapper around the IDF allocated mdns_result_t. We could move it to shared-module and not need a finaliser but that'd require a copy of all the data into the MP heap even if it is never read.
It's available in the IDF API but I'm not sure it is needed. We can always add it later.
Not quite - there's comments in there about how vectorio IShape uses the special value 0 to communicate "not covered by this shape." VectorShape bridges between that semantic and the palette semantic by subtracting by 1.
IShape color selection is internally 1-based indices while Palettes are 0-based so VectorShape is just translating IShape's index domain to Palette index domain.
in an ideal world this thing would return a struct, but it is called once for every pixel so every abstraction and data type indirection you add reduces pixel fill rate. Vectorio tries to be as close to the same speed as bitmaps as it can be and a magic 0 was measurably faster (on my feather m4 express, I don't remember by how much) than other options like a pixel struct.
The underlying issue is being discussed in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=99578, as mentioned in the code. It looks like the gcc folks are fixing the warning regression, which got a lot of pushback from people trying to access memory at fixed addresses, e.g. (void *) 0x12345678.
I got a response from Zhang. I guess that's the person's name and mentioned as "Technical email" on their website. #6084 and #6079 also needed PIDs and requesting them on behalf of LilyGo was no problem.
For the record:
A brand new device shows
$ lsusb
[...]
Bus 003 Device 104: ID 2e8a:000a Raspberry Pi PicoArduino
Boot mode
$ lsusb
[...]
Bus 003 Device 103: ID 2e8a:0003 Raspberry Pi RP2 Boot
WipperSnapper takes the last 3 bytes of the MAC address which are/should be unique to the NIC
I took me 5 years to get a collision on the last two bytes (across esp8266, esp32, esp32-s2, and esp32-s3 devices), so even with Espressif having multiple OUIs, the odds of collision on the last 3 are exceedingly low 😉
Hype! This probably won't be useful to anyone, but here's my OTA solution I built for my project. It just fetches from GitHub.
@slender iron I want to port the ST7565 driver over to displayIO, who knows that API the best, do you think?
I'd just start with the most similar driver
I've tried that...but have got stuck
The other ST**** driver is totally different, and the other GLCD driver isn't compatible in the slighest
I can try to help you through it
welp, I thought I fixed my doc build and checked locally but actions disagrees with me and 🦄 on load build output...
@slender iron I'll look at it again tomorrow. And let you know...thanks!
@slender iron your board init has these lines, they probably kill usb: // This board has LEDs connected to the USB pins USB_SERIAL_JTAG.conf0.usb_pad_enable = 0; USB_SERIAL_JTAG.conf0.dp_pullup = 0;
Oh! Did I copy that over?
yep
trying it now
also maybe you have to make sure they arent getting reset?
I'll wrap it up next week. thanks again
would asyncio fit on a custom, stripped-down SAMD21 build, or are there other issues as well?
I'm not sure the actual library would fit even when you enabled async and await
you can decrease the filesystem size to 48kB, then you can fit some more stuff in it
I submitted the form mentioned on https://github.com/raspberrypi/usb-pid but not sure if it went through (aka. didn't get a conformation).
Should there be separate board definitions when pin polarity changes on a board rev? It will get confusing with the * and *_INVERTED <#help-with-circuitpython message> it would be nice to continue to be able to write generalized cross-device code using hasattr or similar to know how to interact with a pin or feature
Implementing color_index argument and property for all of the vectorio shapes. This allows user to specify which color index to fill the shape from the given palette. Previous behavior was always defaulting to the 0 index within the palette.
There is a script illustrating it's usage in this PR inside of tests/vecotrio/color_index.py
So far I’ve been using ESP-IDF version 4.4. There were a commit in the last two weeks to address some of the issues I observe above, and mentions some corrections for streaming mode.
I’ll need to pull these lates changes and assess if they clear the path for fast drawing in the base ESP-IDF, as demoed above.
basically the feather esp32-s2 with a different module
I did the same, no confirmation though. Let's see. Also in the mean time opened an issue on their official github repo to see if we got any luck.
Has something changed with GitHub or our build procedure, or is something confused on my local system? I made a fresh fork of adafruit/circuitpython and cloned it, but when I try to “make fetch-submodules”, I get a whole bunch of errors like “fatal: reference is not a tree: a8abc3aa8dece6c4d0152b001dfca7d2c279f899”, followed by a bunch of “fatal: Unable to checkout” errors (starting with “fatal: Unable to checkout '5d01882c41dbc4115bc94f0b61c093d5a6b812b6' in submodule path 'extmod/ulab'), and then the make exits with an error code 128.
Are you running the make fetch-submodules in the top directory of the repository?
Looks good to me. (obviously) could not test.
@solar whale Yup.
It could be something messed up on my machine but I figured I’d ask before I spend a lot of time chasing ghosts.
Missing the new color_index
Missing the new color_index
I didn't test but looked over the code. One question what if I set a color_index outside the range of the palette? I am just unsure if the palette automatically handles and wraps that or if you need a check for the size of the palette vs the color_index.
This looks right to me
Fixed with latest commit
Nice catch, thank you. Fixed with latest commit
@gamblor21 good question on the outside range. There isn't automatic wrapping for values outside the range, however they also don't result in an exception. Current behavior is values outside of the valid range result in the shape being drawn black which is maybe unexpected behavior.
I'll add some more explicit checks that raise an exception for invalid values.
Thanks for having a look over this!
On valid ranges for color values - it’s really up to the colorconverter/pixelshader/palette to decide what to do with an index out of range, no? I agree with just passing the configured color index straight into the pixel shader as you have it here. Why define a different behavior for invalid indices than the object to which those indices matter?
I evaluated the recent commits to assist with rgb LCDs and they resolve the issue that I observed above. I'm getting decent speed, here's an example of a 10x10 pixel bouncing box:
I performed an alternate test with 400x400 squares (about half the display size) and am getting around 25 frames per second.
Here's my example code. Adjust box_size to see the impact of redraw size on t...
@minor plume does it have to do with st_driver?
The first of the string of errors was in extmod/ulab but there were a bunch of them. I haven’t spent any time troubleshooting but can tomorrow if need be. Here’s the log from my second attempt at “make fetch-submodules” (so, skipping the part that seems to have cloned successfully):
https://gist.github.com/tammymakesthings/2d30d9951e172b8a579497a01f19dcb5
looks like the data/nvm.toml directory is broken
the "unable to checkout" errors are expected
the git submodule foreach after should handle it
Ah. That makes sense.
Last time I did this I did the “make fetch-submodules” and then walked away for a while. So I wasn’t sure which errors are expected and which aren’t.
maybe do git submodule update --init data/nvm.toml
you want to avoid blanket doing that though because the broadcom folder has a giant repo in it
Let me try that and see what happens. One moment…
Huh. That produced no output, but I did a fresh clone of my repo fork and it seems to be working now. So I’m not sure what’s going on…but I think I won’t worry about it unless it happens again.
Oh! Maybe I do know the problem. I typically rename my remotes (origin => tammymakesthings, upstream => adafruit). The last time I cloned, I renamed them before I did the make fetch-submodules, and this time I did the make fetch-submodules first. So maybe whatever the fetch-submodules Makefile target is doing is getting confused if the remotes are renamed.
Nope, that can’t be it. It still errored on data/nvm.toml.
Hmm.
Let me check something in my git config.
OK. Figured it out, I think. I had clone.defaultRemoteName set in my .gitconfig, and that was messing up the make fetch-submodules target. It’s fetching now, and we’ll see if my hypothesis is correct, but I bet that will fix it.
Yup. Seems to have fixed it. So now I know: make fetch-submodules will fail if you have clone.defaultRemoteName set in your .gitconfig. I wonder if that’s a common enough condition to be worth documenting someplace that it’ll break the Makefile target. 🤷♀️
(Or, in the alternative, if it’s worth adjusting the way make fetch-submodules works so it asks Git for the configured default remote name if one is set. Also an option, but I don’t know how common people using that setting is.)
If this trade-off needs to be changed in the future, we can do it. My gut would have said that since the CircuitPython heap is generally larger than the IDF heap it might be better to preemptively move it, especially since then we can rely on the GC to free it after it's no longer possible to use it.
Looks like the doc build still needs some attention though. I couldn't get the github actions page to open (unicorn error) so I couldn't check into it further.
That does make sense to me, it would be better to enforce the range within Palette which should then carry over to the usage here if I understand correctly.
I'm really having trouble / feels while using the recently updated "changes" view in github. I am sure part of it is just the "hates change" note on my character sheet, but in particular I can't seem to figure out how to view the whole change at the spot of a resolved comment where the line that the comment was made on was deleted in a latter commit. Also, because there are scrollbars within scrollbars (WHY!) mouse scrolling just doesn't quite work consistently. That seems to be triggered by opening or closing a resolved comment(?)
I did not test but it looks good to me now.
That does make sense to me, it would be better to enforce the range within Palette which should then carry over to the usage here if I understand correctly.
Makes sense to me. The original was more of a question just to ensure it was thought of (and possibly a long term issue for Palette if it does not check ranges).
@onyx hinge So... CI failed on my MicroPython PR. Damien provided a suggestion to fix it, but I a. have no idea which version of the IDF I'm supposed to be referencing, and b. have no idea where to put that line. I figured I'd ask you first, and then ping Limor if you're unsure. https://github.com/micropython/micropython/pull/8406
Is there any chance this gets called when result is NULL and resulting in a crash? Seems it can only occur if deinit is called and someone still tries to access the object. I have seen similar behavior in other libraries (no deinit check so a hard crash if someone makes a mistake and continues to call the object).
There are examples (e.g., https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/pull/114), where it would be desirable to use Pins directly as dictionary keys.
I haven't run into this yet but am excited for the treeview
@idle owl i was using black 22.1.0 locally, but pre-commit specifies 20.8b1. They are fighting with each other. I can update .pre-commit-config.yaml to be 22.1.0. Is there a reason not to do that? tnx
@idle owl I just got back to my desk, can try to sleuth the answer now if it's still pertinent
No reason not to, but we should have Eva run a patch if we're going to update it anywhere. Consistency is important.
this came up before, but I can't remember what the resolution was
Yeah, I didn't know where to start, so I haven't gotten anywhere with it. I guess if it's not obvious to you (which sleuthing implies it's not), maybe I should check with Limor first. I don't want you to put a ton of time into this. I figured you might know since you helped me with the rest of it.
What repo are you working with that's causing you issues right now?
@idle owl it's a matter of having to go check things inside idf git, i can do it and limor is not likely to "just know" without doing the same.
Adafruit_CircuitPython_Requests. I am looking in cookiecutter, and the black version is not specified at all
Ooh. Ok. Proceed then please!
Hmm. Yes it is....
🤦♂️ I was looking in cookiecutter's own .pre-commit-config-yaml
😄 I figured
Ok, so, I think Eva can run a patch this week, or walk me through it since I'm trying to learn how.
Go ahead and update Requests for now, and the patch will simply skip it.
@idle owl ```esp-idf$ git tag # What are some release tags?
...
v4.0.4
v4.1
...
esp-idf$ git grep GPIO_NUM_20 v4.0.4 || echo 'no results' # not in 4.0.4
no results
esp-idf$ git grep GPIO_NUM_20 v4.1 || echo 'no results' # is in 4.1.0
v4.1:components/soc/include/hal/gpio_types.h: GPIO_NUM_20 = 20, /*!< GPIO20, input and output */
Ok!
am i missing something? or are these docs essentially empty?
https://docs.circuitpython.org/projects/portalbase/en/latest/
@tulip sleet looks like when I reviewed requests, it bumped the other reviewers off, didn't mean to do that... is there a way to control that?
which PR?
Looks empty to me too. I think it's borked.
@tulip sleet adafruit_requests #102
ok, I'll just comment so the other reviewers list stays intact
what you reviewed is not correct
@idle owl thanks. any ideas why?
No, I checked the builds, they're all passing. I can run it again to see if that's the issue. But it's probably not.
I've added code to guard against it. It'll also trigger the CI. Hopefully it will be happier today.
That did nothing. Someone would need to dig. @lone axle Do you mind looking into this?
Not at all. Just to confirm, you mean the lack of content in the docs for PortalBase? https://docs.circuitpython.org/projects/portalbase/en/latest/
Yep! That's the issue.
I'll see what I can find.
Thanks!
@lone axle thanks. maybe related? the docs here look OK, but the badge says failing:
https://docs.circuitpython.org/projects/matrixportal/en/latest/
the repo is very similar
@tidal kiln Some of them failed for Reasons, and need to be manually rebuilt. Not sure if that's one of them.
That did not resolve Portalbase.
I think the ones with the failing badge are a different issue. As best as I can tell RTD was just having downtime or some other problems coincidentally when we did a sweep that caused the docs to get re-built, their system didn't complete the builds successfully. But has since been repaired and can build them but there is no easy way to trigger a mass re-build.
Right. Each one must be run manually.
I made a PR here: https://github.com/adafruit/Adafruit_CircuitPython_PortalBase/pull/66 adding a few core modules into the mock list. Not sure if / how it could have succeeded in actions previously, nor whether this missing are the root cause of the lack of content on the docs page.
With this branch from the PR my local build does seem to include all of the API docs though. I'll keep an eye on CI to see if it builds successfully there.
We can fumble with PortalBase if needed.
@idle owl so long story short I think that for "#if ESP_IDF_VERSION >= ESP_IDF_VERSION_VAL(4, x, 0)" , x is 1.
Ok! Thank you!... any idea where to put that line?
I didn't see anything like it in the file....
+ {{&machine_pin_type}, GPIO_NUM_20},
+#else
{{NULL}, -1},
+#endif
``` I think the change ends up looking more like this
Interesting. PR is merged and RTD does show a new build: https://readthedocs.org/projects/adafruit-circuitpython-portalbase/builds/ but still missing the content. I will poke around some more after the meeting. There are definitely a few differences in my environment vs. the RTD / action container. None that I would have expected to cause this issue. But I'll try to get a local venv matching the container to see if I can get the same results.
Sounds good, thanks.
<@&356864093652516868> I failed to send out an earlier reminder, so here's your 5-10 minute reminder: the weekly meeting starts soon. Please update your notes in the document and join us in the voice channel when we wrap up our internal meeting! https://docs.google.com/document/d/1oq50yQiocKcPcGAHEyFuRJqNOz5ipXDD62D0aPNctq8/edit
CircuitPython Weekly for March 22, 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 participate, ...
brb
what's a "work day"?
Just listening today.
✋
😁
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.
Yes please contribute
Yes, big or small
Hello
Congrats!
@slender iron Remember to make the FS witeable on the QTPy C3
shouldn't it by default because it has no USB?
I don't know -- I recall that for the ESP32C# devkit - it had to be changed. -- ah but I think you made that for all with out USB
ya, I think I made it depend on CIRCUITPY_USB
there are also some duplicated PIDs
I redid Circuit python and libraries from scratch. This seemed to have solved my issue.
Thanks
21st 🙂
@tulip sleet when do you want to go over things?
@idle owl and @tidal kiln I am thoroughly perplexed now. But on the up side the page does now seem to contain the proper content. I noticed that adding index.html to the URL did pull up a page with the proper content on it: https://docs.circuitpython.org/projects/portalbase/en/latest/index.html so it seems like for some reason the https://docs.circuitpython.org/projects/portalbase/en/latest/ was not pointing specifically to that index page. Looking through the build logs one of the things that jumped out to me was a missing sections about examples since portalbase does not have any examples in the repo. I made this PR: https://github.com/adafruit/Adafruit_CircuitPython_PortalBase/pull/67 to add one to see if that resolves our problem..... But now all of the sudden the RTD page does have the proper content in it. So I'm not sure if my push to this PR branch somehow caused a difference on the real page, or if it changed coincidentally. But either way it seems like it does have the right things on it now.
Thanks all!
Ha I was able to join just as I heard "have a good week everybody"
@idle owl what's the CP code mechanism to distinguish between ESP32-S2 Revs B and C for the power control pin? I was thinking we'd need two board defs
Sometimes with docs it's better to be lucky than good. 😄
Thanks everyone!
thanks folks!
Thank you!
Thanks
It's in C code right now, I haven't ported it to CircuitPython. It will be in the guide this week for sure. I'll try to remember to ping you with it once I have it so you can test it.
Our first was 3 weeks late 😮
maybe it was just something temporary, that was broken last time a build was attempted?
2nd was early
I don't think so. It didn't seem that way.
I think it was more than that, because it also was missing stuff after my earlier PR from today (first attempt to fix) got merged.
@slender iron Good luck, hopefully I don't see you next week 🙂
My guess is either 1) it coincidentally re-built itself as I was working on attempt #2 and succeeded, or 2) somehow me pushing and making the new PR caused the live page one to also re-build in a successful way. I'm unsure whether we need the newer PR or not. But maybe the lack of examples dir was causing our trouble, that was my theory at least.
Sphinx and RTD are mostly a mystery. I think the 2nd PR can be merged, and we'll see what happens.
Is there a guide that suggests/outlines how to make packages that are suppose to sit on the pc, and process data from a circuit python device? Like the PM2.5 particle sensor has a lot of noise on the signal, and a desktop pc setup can easily filter it and report a cleaned up signal. It wouldn't be a circuit python library, but a helper library/script
I don't think there's anything we've written that covers this. Not that I'm aware of anyway.
Sounds good. I didn't want to start writing a small module in a haphazard way if there was a guide to follow.
I think if you model it similarly to how we write helper libraries for CircuitPython, you'll have a solid base to work from. CP is Python compatible, so the concepts should translate pretty easily.
Probably without all the extras and so on that cookiecutter adds, but following some of the basic concepts, is what I'm saying.
Awesome! That'll give me a direction to go, thank you!
@idle owl still here for the moment
So.... like this?
Fuzzy on what the indentations should be, there are other if's in there at that indent.
I think so! they have a CI check for the code's indentation, and that may be the correct style
Ok good.
That was my next step was to remember how to run all of that again.
Reading the code conventions page first this time.
Can I do git commit -ms "Commit message" for it to also sign off?
-s -m "Commit message" maybe?
. tools/ci.sh and then one time ci_code_formatting_setup and then each time you want to check, ci_code_formatting_run. that's for indenting the code. ci_commit_formatting_run was for checking commit messages.
Ooh ok.
Thank you!
@onyx hinge ci_code_formatting_setup is asking for a password, is that expected?
yes but it won't work on a mac now that I look at it
sudo apt-add-repository --yes --update ppa:pybricks/ppa
sudo apt-get install uncrustify
It has to install the program "uncrustify". Do you have it installed for circuitpython core? it's the same.
Yeah, it's in a venv for building circuitpython.