#circuitpython-dev

1 messages · Page 346 of 1

manic glacierBOT
#

Yes, I did have the latest drivers installed - the ones as of early November 2020. The Adafruit moderator confirmed that they looked good, as well. The drivers did fix other problems related to Windows 7 (e.g. being able to update the bootloader, etc.), but did not appear to affect my experience with the sleep issue. I tried both TeraTerm and Mu.

As you stated you were not able to reproduce the issue, and unfortunately I did not try this on another Win7 machine. Didn't look for one and...

manic glacierBOT
manic glacierBOT
#

Symptoms seem very similar to #3712 but I have no such dhcp weirdness on my network: I'm trying to connect it to my main AP/router. I have a MatrixPortal that connects fine, but the MagTag will either say network not found or "Connection Error: Unknown failure".

I'm using essentially the same test code as the other issue:

import wifi
from secrets import secrets

for network in wifi.radio.start_scanning_networks():
    print("\t'%s'\t\tRSSI: %d\tChannel: %d" % (network.ssi...
manic glacierBOT
#

@dhalbert Yes, I can do that but not until sometime next week. In my own troubleshooting, I did two things. One, I functionally did what you described by removing all code which read the sensors and replaced them with with simple print() functions and an elapsed time calculation, though I still kept a majority of the program's structure and wrapped it in a 'while True' loop. I'll try to cut it down to a minimum and post it, but if I can't, I also did the following.

Two, I believe I also...

manic glacierBOT
crimson ferry
manic glacierBOT
hearty tapir
#

I agree that it would be good to narrow down the root cause a bit more

crimson ferry
hearty tapir
#

I now remember that I saw this posted by you 🙂

crimson ferry
#

I'm pondering a PR to expand reason codes handled in the event handler, but that doesn't address "Unknown failure" on connect (except that some additional errors would be retried - I still think it would be good to have more clarity about which error is failing connect)

lone sandalBOT
hearty tapir
#

I'm currently installing STM32CubeIDE to try my new Nucleo-F446ZE and later the Adafruit FEATHER STM32F405 EXPRESS

#

Saw some cool videos by Digikey on the STM32, but somehow picked the wrong Nucleo board .. I meant to choose one with Ethernet. Fortunately those boards are quite affordable, thus I'll just start to play with it and when I really want to enter the Ethernet stuff will buy another one 🙂

manic glacierBOT
manic glacierBOT
#

Thank you! The router that "does not work" is using HT40 (channel width of 40 MHz) - your IOT router is set to "auto" which I'd assume would use 20 MHz. I'm not a fan of 40 MHz wide channels for 2.4 GHz, but this is not about my taste :). Can you test with 20 MHz wide channels, just to rule out that this is causing the issue? The comment about the space in the password could also be important - thank you -, I'd need to try this here tomorrow.

manic glacierBOT
manic glacierBOT
#

Thanks for the feedback. The second set of images are actually the working router, so the one that works is 40-wide (the esp devices all connect at 20 regardless, according to the ddwrt status screen), while the one that doesn't work is auto.

I can try going back to g/n on the main router: I think I set it for n-only for speed since I've got 300/300 internet. The two routers are about a foot apart in the same room (and the main/non-working one has much better range - I've gotten wifi in my...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Here's example code for OpenThread on nRF52840.
https://github.com/openthread/openthread/tree/master/examples/platforms/nrf528xx/nrf52840

The nRF5 SDK for Thread and Zigbee includes:

* a pre-built OpenThread stack for the Nordic nRF52840 and nRF52811 SoCs,
* support for hardware-accelerated cryptographic operations using ARM® CryptoCell-310,
* software modules inherited from the nRF5 SDK e.g. peripheral drivers, NFC libraries, Bluetooth Low Energy libraries etc.
* etc.
manic glacierBOT
manic glacierBOT
#

A space is definitely valid in general (I'm using that network to post this right now from my phone), but some devices appear to have software limitations. Will test with a spare router tomorrow: can't really change my family's main wifi when we're all here all the time, but I have another e2500 that I can set up and see if I can make the magtag fail to connect by putting in a password with spaces.

manic glacierBOT
lone axle
#

If I am interested in having a TileGrid that has readable width and height properties after being created, would it make more sense for me to use python code to make a class that extends TileGrid, or would it make more sense to try modifying the core code to have TileGrid support those readable properties?

manic glacierBOT
#

Circuitpython version 6.0.1 and bootloader v3.10.0

Believe me I would love to be able to replicate it! I thought I'm going crazy and it took me a while to figure out that time.sleep was the issue, when my Neopixel animations started to randomly freeze (time.sleep is used conditionally in my code so it took a while for the issue to pop up).

I still cannot reliably replicate it, though.

strange pike
manic glacierBOT
#

What percentage of the time would you say that it happens? I tried about 20 times and could not reproduce. Feather M4 is set up exactly as yours; my MacBook is also Big Sur 11.1, using a USB-C to micro cable. So everything is the same except for the actual MacBook. Is there anything connected to your Feather still, like the string of NeoPixels?

I also tried a Feather M0, because we're having other Mac problems with SAMD21. Could not reproduce there either. I'm not doubting you! It's just m...

fossil gorge
#

I've tried looking around on the learn guides and elsewhere, but I couldn't find any answer to this, although maybe I need new glasses for the new year...

What environments do folks use to do CircuitPython work? IDEs? Text Editor + scripts/macros? Something else?

crimson ferry
#

Mu, Atom with CircuitPython package, VS Code with CircuitPython extension, any offline editor with an explicit copy to the device, any serial console (e.g., screen), circup

#

I use a shell script to load the subset of libraries I use onto all devices, although when I'm using VS Code it updates automatically (pros and cons to that)

manic glacierBOT
#

I cannot give you a percentage. Once it works, it works, for an extended period of time

Yes, there are several peripherals connected. A NeoPixel matrix, a TSL2561, an AirLift featherwing (though not in use), a DS3231 and several buttons.

I'm thinking it has something to do with the M4 not being recognized correctly. Every time (at least I think it was every time) time.sleep hung, I saw the macOS dialog that a keyboard was detected when I plugged in the M4. It also seems to be somethin...

fossil gorge
#

Thanks for that insight @crimson ferry. Going over my original question, I realize I really didn't state what I was asking clearly!

What I meant to as is, for those who are developing the CircuitPython language and platform itself, that is, in github.com/adafruit/circuitpython, what is used?

lone axle
#

@fossil gorge Scott (one of the core devs) uses mostly terminal editor I think. I don't know if he ever went over his environment specifically, but you can see it in use during his deep dive streams.

manic glacierBOT
#

I am using a 15" 2018 MacBookPro (with 4 usb-c ports) running Catalina 10.15.6.

I am connected to a Metro M4 Express powered via usb and running the latest boootloader (v.3.10.0).

With CircuitPython 6.0.1 loaded, the blink program hangs in time.sleep 10 times out of 10 (i.e. 100% of the time, but with small statistics).

I am entering the code and saving it to the CIRCUITPY drive using the latest stable Mu editor. In other words, I am following the [Welcome to CircuitPython](https:...

manic glacierBOT
#

I'm having problems with infrequent crashes on the MagTag that are similar to the problems I have with the Matrixportal (described here). I've tried this with several versions of Circuit Python, and now have the board running 6.1.0-beta.3 with libraries from *-bundle-6.x-mpy-20210101.

The code is pulling data from the Purple Air and Weather Underground web sites. It will run for a while (frequently hours) and the...

pure swallow
#

There’s a pin on the FeatherS2 labeled “13”. I looked at the schematic and that pin seems to be connected to IO14 not IO13, but there’s no board.IO14 in circuitpython 6.1.0-beta.3. Does anyone know what is going on?

tulip sleet
#

@atomic summit ^^

atomic summit
#

@pure swallow Oh WOW, Yeah, that should say IO14 - never picked that up 😦

#

PCB silk and pinout card are both wrong 😦 ouch!

#

I'l get that fixed for my next PCB run, thanks @pure swallow

pure swallow
#

Okay, thanks. :)

atomic summit
#

Now I know why IO13 was declared twice in pins.c - one should have been IO14 😦

manic glacierBOT
manic glacierBOT
slender iron
slender iron
manic glacierBOT
atomic summit
#

@meager fog I'll be fixing all of the printed pinout cards for new boards being shipping to Adafruit, and I'll fix the silk on the next PCB run.

fossil gorge
tropic rain
#

I'm not seeing anything in circuitpython for I2S input, like for a microphone such as the I2S MEMS Microphone Breakout that you folks offer. Am I missing something or has it not been implemented yet? And if it's not, is it in future plans?

ivory yew
#

There isn't an i2s in, unfortunately.

#

Not sure on the plans. Maybe check the github issues?

tropic rain
#

Thanks. I'll take a look there. If not I might just have to implement it. I'm looking at the Espressif Audio Development Framework atm but it would sure be nice to have this for CPy and for the Arm processors as well.

manic glacierBOT
manic glacierBOT
#

I tested Touch Alarm with the ESP32S2 with the code sample in #3850

When in fake sleep (USB connected to computer), it seems that my board wakeup twice in a raw when I touch.

The double trigger on touch only seems to occur with the USB connected to computer, but not when on a power supply.

Basically it made the code blink the blue LED twice in a raw for 5 seconds (with a single touch of the pin).
Tested with 6.1.0-beta3.

The wake-up speed is also much faster in fake sleep.

manic glacierBOT
#

I have a vague memory of this issue being present in my early testing...
However this issue was not present in my final testing of TouchAlarm PR and I am unable to replicate it now.

Tested with :-

Adafruit CircuitPython 6.1.0-beta.3 on 2020-12-31; microS2 with ESP32S2

Console output :- (on a fresh-start)

WakeAlarm :-  None

Code done running.
Pretending to deep sleep until alarm, CTRL-C or file write.
# -------------------------> TouchAlarm was triggered here...
thorny jay
#

Sorry, I have just had my Calendar geekness day today (it started by wondering why the Greek orthodox easter was so far from the other easter this year... a moon thing I guess) and I manually made this US minded, Monday minded list.
DD/MM/YYYY
18/01/2021: Martin Luther King Day
15/02/2021: President's Day
31/05/2021: Memorial Day
05/06/2021: Independence Day (observed)
06/09/2021: Labor Day
11/10/2021: Columbus Day
(no clue what is celebrated or not, off or not)

manic glacierBOT
ornate breach
manic glacierBOT
#

Here is the result of my test (consistent from what I remember from this week-end):

# -----------------------------------------> Doing CTRL+D
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.

code.py output:
WakeAlarm :  None
Reason: None

Code done running.
Pretending to deep sleep until alarm, CTRL-C or file write.
# -----------------------------------------> Touching the I01 pin => I get to wake up in a raw.
Woken up by al...
manic glacierBOT
#

When working with CP (especially on macOS), it’s likely one will get Corrupt .mpy file messages. It would be immensely helpful if these messages also indicated which file it was talking about.

I took a quick look at the code, and in py/persistentcode.c:

STATIC void raise_corrupt_mpy(void) {
    mp_raise_RuntimeError(translate("Corrupt .mpy file"));
}

There’s also:

mp_raw_code_t *mp_raw_code_load_file(const char *filename) {
    mp_reader_t reader;
    mp_r...
manic glacierBOT
manic glacierBOT
meager fog
#

@gilded cradle helu helu

gilded cradle
#

hi @meager fog

#

I sent you an email

meager fog
#

yah

#

but then i rememeberd we're both on discord

gilded cradle
#

true

meager fog
#

plz do emails and after they're in a good spot, do a sweep of blinka/platform detect

gilded cradle
#

ok, I'm like 2/3ds done now

meager fog
#

np

gilded cradle
#

🙂

turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Region

us-west

Channel Categories

8

Text Channels

56

Voice Channels

6

Members

26495

Roles

34

dim rose
#

When I refresh my Magtag lib with the latest version, do I need to reinstall the UF2 bootloader each time?

#

(newbie alert btw)

meager fog
#

the bootloader ya only need to install once (if it isnt already installed)

#

after that, double-click to drag over new circuitpython builds. we do recommend latest build for magtag

#

cause we are doing so much bug fixin

dim rose
#

I'm trying to follow the magtag twitter guide and it keeps telling me Authorization Required

#

i have downloaded and copied over the latest lib files, set myself up with a twitter developer account and got a bearer key

meager fog
#

hmm the twitter project is a bit complex, maybe try some other project first

#

it does sound like your bearer token may not be right

dim rose
#

i've managed to do the Xmas wreath and the weather project already

meager fog
#

then you've got your magtag set up right!

last flame
#

have you confirmed via curl or similar that your key/secret works OK with the API?

dim rose
#

that's what I am trying to do right now

last flame
#

@dim rose

I've not used twitter api but might also be worth re-generating the tokens/bearer via a POST request or whatever their docs suggest. normally you would make a call first to their auth server with key/secret and then get a bearer token back (access_token) - which typically has a lifespan (you could do this via console/terminal or Postman etc). I am not sure though off top of my head if twitter do it this way but regardless, ensure the API is working outside of your code/project first.

It could be that if you're hammering the API during testing, they have killed your default token when you created the app - so you would need to create a new one 😬

dim rose
#

Actually the problem is not immediately with the bearer key, I just changed it to some gibberish and it STILL says Http Error: code 401: Authorization Required

turbid radish
#

Adafruit folks - the newsletter is substantially done

dim rose
prime flower
#

@dim rose hi - I just re-tested the code on the magtag twitter guide and ran into the same HTTP error. Looking at it now.

manic glacierBOT
#

I think there are a couple approaches I could take to this:

  1. There aren't LWIP equivalents of the TLS functions you use, so I could attempt to create a non-blocking version of this call by recreating the contents of lwip_recvfrom, lwip_recv_tcp, and the netconn functions they contain. I'm not sure how practical this would be.
  2. Use getsockopt to set a timeout for this function, start a new thread in FreeRTOS (I don't know if we have any existing examples of this in Circuitpython), and wa...
last flame
#

@dim rose to get token

curl -X POST "https://api.twitter.com/oauth2/token" \
-H "Content-Type: application/x-www-form-urlencoded;charset=UTF-8" \
-u <API_KEY>:<API_KEY_SECRET> \
--data-urlencode "grant_type=client_credentials"

to test resulting token

curl -X GET -H "Authorization: Bearer <BEARER_TOKEN>"  \
"https://api.twitter.com/labs/2/tweets/1138505981460193280?expansions=attachments.media_keys&tweet.fields=created_at,author_id,lang,source,public_metrics,context_annotations,entities"

just as quick sanity check

prime flower
#

@dim rose yeah, it's within the DATA_SOURCE string literal. I'm going to put in a pull request to fix this.

onyx hinge
#

working on an antialiased version of forkawesome for circuitpython but the difference is .. subtle

gilded cradle
#

@meager fog Blinka/Platform sweep done. I'm going to do a circup sweep next.

onyx hinge
#

and something's going wrong with my conversion workflow that I don't understand yet

prime flower
meager fog
#

@gilded cradle yah! we got some great PRs but have not had the time to review - i did a lot of hardware instead 🙂

onyx hinge
#

@meager fog since I guess maybe this is where we're doing checkins today -- This weekend I finished a web-based bdf to pcf converter (client side conversion, hosted on github pages), which I'd be happy to move under the adafruit organization. I can tell you more about it in the whereby today. Also made progress towards antialiased fonts. My work today includes running the CP meeting. Somehow I never reached addressing the known (to me) i2s crash last week, so I'm still on that.

meager fog
#

@onyx hinge im here 🙂

onyx hinge
#

@prime flower aha that would do it! Tricksy.

meager fog
#

@onyx hinge yah you can move it to adafruit account

prime flower
#

agreed! I figured they didnt change the oauth api over the holiday...but Microsoft pushed an update as did slack so who knows at this point!

last flame
#

that was quick @prime flower 😂 🤘

pastel panther
#

@meager fog 👋 checkin' email/github/forums/etc

onyx hinge
manic glacierBOT
prime flower
#

@onyx hinge whoo - going to use this in a bit!

manic glacierBOT
#

It looks like the LDO2 in use issue is just that you have to enable LDO2 before initializing the dotstar.
It works fine if It do it that order.

it appears that on powerup, LDO2 is enabled that is , it is High but it is set as an Input

Adafruit CircuitPython 6.1.0-beta.3-30-gec0210240 on 2021-01-04; FeatherS2 with ESP32S2
>>> import board,digitalio
>>> ldo2 = digitalio.DigitalInOut(board.LDO2)
>>> ldo2.value
True
>>> ldo2.direction
digitalio.Direction.INPUT
>>> 

Is th...

meager fog
#

@onyx hinge ok please add a page to the learn guide for fonts that talks about pcf and this converter

pastel panther
#

@turbid radish Holidays caught me off guard; I can whip up a newsletter entry ASAP wherever need be if it's not too late

onyx hinge
#

@meager fog yup soon, I want some more tire-kicking first

meager fog
#

k plz add to your todo so it gets written up before ya move to next quest

onyx hinge
#

ya that I can do

manic glacierBOT
thorny jay
#

Since you are here @meager fog have you seen that retrogaming platform based on MatrixPortal: https://retro.moe/ it add Bluetooth joystic (using the airlift with a special firmware) and sound with a chiptune extension on SPI over exposed pin (with a piggy bag board). I had a lot of fun with the two player snake demo.

#

Thank you @turbid radish it's in the newsletter too (or again).

turbid radish
#

Yes, that sound board add-on for the top of the Matrix Portal is very nice

manic glacierBOT
onyx hinge
#

Hi <@&356864093652516868> -- we'll have our first meeting of the year in about an hour. Please add your notes to the doc if you can, or at least add your name to the sections where you plan to speak. If you aren't in the document, we'll assume you're lurking or just listening in to make things go smoothly. Thanks ! https://docs.google.com/document/d/1pOGIqgcxtlSQ3GSRD1UtbvKXwCyFx_1Gx_n2GhrGD8A/edit?usp=sharing

onyx hinge
#

hum.

Segmentation fault
manic glacierBOT
onyx hinge
#

also weird ```>>> ulab.ones(5).shape
(0,)

#

both seem to be fixed in latest ulab, hm

#

or else affect cp only somehow

idle owl
#

Hah. gcc:0-me:1.

onyx hinge
#

yay

idle owl
#

A majority of which was MacOS:0 - Me:50. Because stupid permissions crap.

tulip sleet
#

:gnu:

modern wing
#

Big Sur or Catalina?

idle owl
#

Catalina.

manic glacierBOT
idle owl
#

Haven't taken the leap yet.

modern wing
#

Me neither. I'm terrified of it changing the BIOS and bricking the system, especially on the 2013 mbp.

thorny jay
#

Maybe my MAC is old enough that they will not propose Big Sur ???

onyx hinge
#

For those joining the meeting, double check whether you are muted. Some of us were unmuted immediately upon joining. Also, now's a great time to do a sound check and to finish your notes

modern wing
#

Happy New Years all you wonderful folks -- lurking/text only today, notes doc updated. adabot

fossil gorge
#

Late 2013 iMac and Mid-2011 MBP won't harrass you about Big Sur

idle owl
#

I'm running a 2019 MBP and haven't heard about it from my machine.

fossil gorge
#

Though the iMac will tell you there's an upgrade to GarageBand, but you can't install it without Big Sur, so 🤷

modern wing
#

@fossil gorge I hope so for the late 2013 -- I've heard cases where Big Sur tries to apply new firmware to the power chip & the bios, and it doesn't work.

manic glacierBOT
#

OK, so now I feel silly. It appears to work OK when brought down to my office (which is the next room over from the router), with no changes. Not sure why it appears to have shorter range than the matrix portal, but at least it works now. (The sample code says RSSI: -59 now when it connects.) Maybe the pick-and-placed standoff near the antenna is affecting it or something.

I think this can probably be closed now, since it seems like a signal thing probably.

fossil gorge
errant grail
#

Just listening from the studio today. Absorbed in converting banjo tab notation to MIDI.

idle owl
#

For anyone going through updating gcc on MacOS, you can get around the security issues on all the bin files with the following command: xattr -d com.apple.quarantine arm-none-eabi-*

#

Versus opening every bin individually and going through the dance.

fossil gorge
#

and -c will clear all attribs

idle owl
#

Right. I put it out there for posterity - folks can change it up to fit their needs.

lone axle
#

🤯 had no idea you could hide the users list

tidal kiln
#

lurking

idle owl
#

Love it 😂

stuck elbow
#

lurking

idle owl
#

@inland tusk Are you planning to participate today, or lurking?

thorny jay
#

@stuck elbow I was looking for games in CircuitPython to run on a PyPortal. (hint, this is to use the joystick from Bluepad32). So I went for ugame/stage. Am I right that this is not compiled in and require some code on the firmware side? And that code is in PyGamer and that kind of things?

thorny jay
#

lurking (but my mic is working if needed)

lone axle
solar whale
#

Does the S3 have native USB?

lone axle
stuck elbow
#

@thorny jay _stage needs to be enabled in firmware, so you will need to compile your own firmware, you will also need to write your own ugame.py to add your own button handling and any initialization you need

stuck elbow
#

@thorny jay I'm happy to help with that.

thorny jay
#

@stuck elbow I need to see the benefits of _stage vs displayio based game. I have not compiled a CP firmware yet... so maybe this is too complex for me. I will first try to write (or borrow) a displayio demo and add joystick to it using this: https://retro.moe/2020/11/24/bluepad32-gamepad-support-for-esp32/

I’m happy to announce the release of Bluepad32: gamepad support for the ESP32. Bluepad32 is a firmware that runs in the ESP32 microcontroller. It supports all the modern Bluetooth gamepads li…

stuck elbow
#

@thorny jay honestly, there is very little benefit, apart from Stage being a little bit faster because of its limitations, I even re-wrote the games in displayio at some point

thorny jay
#

@stuck elbow you have a displayio version of your space invader somewhere? I could use that...

stuck elbow
#

I remember converting it at some point, I'm not sure I published it anywhere, I will look for it later and let you know. It shouldn't be too hard to covert again anyways.

fossil gorge
#

lurking

thorny jay
#

By the way, this is two weeks of Hug report... that explain the lenght. 🙂

idle owl
#

We love long hug reports!

modern wing
#

Font composting, helps break down unwanted ligatures.

old smelt
#

Lurking

stuck elbow
modern wing
#

haha 👍

tulip sleet
modern wing
#

@lone axle Can you link where you got those assets?

lone axle
modern wing
#

Thanks 🙂

manic glacierBOT
#

I occasionally experienced this on a 2020 iMac running Catalina 10.15.7 and mu 1.0.3. Could not detect a pattern for when it happens. Restarting mu, resetting the board, rebooting the iMac, unplugging USB, etc., sometimes clears the condition, sometimes not.

When the code hangs on the time.sleep statement, pressing the return key will advance the code past the stalled statement.

Also, an argument of 0 seconds doesn't hang.

Tested on a Clue, ItsyBitsy M4 Express, and Feather ...

fossil gorge
#

New user speedbumps are usually incredibly valuable to any project

idle owl
#

Exactly!

fossil gorge
#

As I've heard it put before for another project, "We want to make it easy for people to fall into the pit of success"

gilded cradle
#

thanks everyone

thorny jay
#

Thank you.

modern wing
#

Thanks!

solar whale
#

👋

onyx hinge
#

Next week (Jan 11) is as usual. The following week will be a Tuesday, observing the Martin Luther King Jr. Day holiday on the 18th.

idle owl
#

@inland tusk I disconnected you from the chat so you weren't surprised by sound in the event that someone joined and began talking.

#

Why was bus_device removed from the Circuit Playground Express build? Is the process of moving it to the core already completed?

manic glacierBOT
idle owl
#

If so, why isn't the CircuitPlayground library seeing it?

lone axle
#

I think it did get completed, but was disabled due to some issues that were noticed.

idle owl
#

This explains why the person doing this PR couldn't get it working on CPX.

manic glacierBOT
#

addresses #3922

For this PR, I used the common-hat/microcontroller/Pin.c from the atmel-samd port as a guide.
Hopefully I did not miss anything.

As noted int #3922 at power-on, the LDO2 pin is High but set as an INPUT
The PR does not change that. Is that OK?

The DotStar does reflect the status of CP -- blinking green before REPL -- Green in code.py and White in REPL
It is very dim, but useable.

I have run this on a umfeathers2 to verify the DotStar function.
I also created b...

lone axle
#

I don't have any specific insight, but would guess it got removed when bus_device got merged into core, and maybe not put back when that was reverted?

manic glacierBOT
#

I wish I could replicate it for you, but I’m fairly certain it works also when running code.py.

What I can say with certainty is that when time.sleep hangs in the REPL, hitting enter after the sleep time is elapsed brings you back to the prompt. When time.sleep doesn’t hang, it returns you to the REPL prompt immediately after the sleep time is elapsed.

By the way, using the same USB-C cable with a USB-C wall plug never caused a hang so far.

idle owl
#

so.... When no code is running on this CPX, half the LEDs are lit up awkward colors. I have to put a pixels.fill(0) in a loop to get it to stop. Tried two CPXs. Same firmware.

#

Over half.

onyx hinge
#

@idle owl I saw something similar on a pygamer with 6.1.

idle owl
#

(╯°□°)╯︵ ┻━┻

#

is my response to that.

onyx hinge
#

I didn't report it because I hoped it was just my hw but now ..

idle owl
#

Always report it. 😛

#

I always assume it's me, and it's almost never me.

#

@onyx hinge I'll file an issue.

#

And you can comment on it.

onyx hinge
#

thank you!

solar whale
#

@idle owl bus_device was in the core briefly, but was disabled and "should" have been restored to be "frozen" where needed. Did the CPX get missed? Looking for the PR.

idle owl
#

Yes, CPX must have been missed. It's not there in main. I'm building off of main.

solar whale
#

looks like it -- here is the PR that restored them....

idle owl
#

I'll submit a PR.

tulip sleet
#

@idle owl @onyx hinge I don't think we need bus device for CPX because the LIS3DH lib doesn't use bus device

onyx hinge
#

It was in 6.0.1 .. FROZEN_MPY_DIRS += $(TOP)/frozen/Adafruit_CircuitPython_BusDevice

#

git show 6.0.1:ports/atmel-samd/boards/circuitplayground_express/mpconfigboard.mk

idle owl
#

@tulip sleet CircuitPlayground lib wouldn't work without it building from main.

#

It was looking for it.

tulip sleet
#

ok, never mind

idle owl
#

I updated my submodules....

onyx hinge
#
Committer: gamblor21 <mark.komus@gmail.com>  2020-11-11 10:24:33
Parent: 3c05a8c68cececcfb38eeefa6208afad2c56d215 (Merge pull request #3482 from cwalther/alloc)
Branches: remotes/jepler/update-ulab3, update-ulab3 and many more (24)
Follows: 6.1.0-alpha.0
Precedes: 6.1.0-beta.2

    Removing from smaller builds
``` looks like it was removed in a separate commit from the one I reverted
idle owl
#

So submit a PR? or?

tulip sleet
#

i must have been thinking of the register library

#

sri

idle owl
#

@onyx hinge It's simply adding the FROZEN line back in, correct? That's all I did to make it work.

#

Well... "work".

solar whale
#

np -- I thought it maybe it was doing something really sneaky 😉

tulip sleet
#

i don't see in "Blame" that it was ever there... still checking

onyx hinge
#

@idle owl yes, needs to be done in cpx, cpx_crickit, cpx_displayio by the look of it

idle owl
#

Oh hmm. Ok. Will do.

onyx hinge
#

@tulip sleet check out commit f61c4e62c14e52da83b17f740b5c5409ee4b05a5

#

some of it is disabling the built in module on constrained boards, but some was removing the frozen modules (probably unintentional or should have been in 23ed3ef971f8f38497337874da39273e5ae090d7 at any rate)

tulip sleet
#

That Blame is really confusing, it doesn't show the missing lines

onyx hinge
#

deleted lines are hard to "blame"

manic glacierBOT
#

Building for CPX from main as of today, I found when I load the firmware onto the Circuit Playground Express, over half the LEDs light up when no code is running. The only way to get them to turn off was to put a pixels.fill(0) in a loop (including it at the beginning of the code was not enough). When there is LED code running, it still flashes the same LEDs as when no code is running on quickly before running the LED code.

@jepler evidently ran into a similar issue on PyGamer.

Image...

idle owl
#

@onyx hinge ^^

onyx hinge
#

@idle owl are those LEDs supposed to be used as status LEDs or are they supposed to be unused except by your code?

idle owl
#

No status LEDs on CPX.

#

Only user code.

#

@onyx hinge Except for the bootloader. They are used in the bootloader.

manic glacierBOT
onyx hinge
#

Here is the notes document for Monday’s CircuitPython Weekly meeting. It is at the normal time of 11am Pacific / 2pm Eastern here on Discord. Everyone is encouraged to attend! Please add your hug reports and status updates even if you’ll be attending the meeting - it’s super helpful! If you are unable to attend but would still like to include updates, feel free to include them in the notes and we’ll read them off during the meeting. Hope to see you there! <@&356864093652516868> https://docs.google.com/document/d/1vIZ25jUMQpIbGOrQvmhTIngbNziri30Yc9zPJQyPb2w/edit?usp=sharing

manic glacierBOT
idle owl
#

Whee, core PR.

#

Now to see what breaks. 😆

blissful pollen
#

Sorry guys for messing up a bunch of those commits in that PR 😐 didn't really get it the same as I do now

idle owl
#

No worries, @blissful pollen, it happens. This is how we find issues, and we work as a team to fix them, you included.

onyx hinge
#

@blissful pollen absolutely no reason to beat yourself up over it. Happy to have you working on the core with us!

manic glacierBOT
#

It looks like the LDO2 in use issue is just that you have to enable LDO2 before initializing the dotstar.
It works fine if It do it that order.

There was a change in CPY in 6.1 beta 1 or 2 that altered how IO objects where held on to, to bring the S2 port in line with other ports, which triggered this error in my code. I have an update set of code available here:
https://feathers2.io/code/shipping_files.zip

it appears that on powerup, LDO2 is enabled that is , it is High but...

#

@UnexpectedMaker Hmm -- setting that to OUTPUT will make it very unique to this board. Where would you suggest doing that? Should it also be enabled?

This board is unique in that is has a second LDO and power control over the APA via it.
I can't advise where this should be set, sorry. Maybe @tannewt can guide you.

It may not be necessary if we don't need to enable it.

idle owl
#

Is it normal for the CI on a PR to be queued for 30+ minutes?

manic glacierBOT
idle owl
#

In other news, black isn't in cookiecutter. So none of the new libs are using black. Also black in the existing repos is pinned to an October 2019 release and it's causing issues for folks who install Black as we suggest, and run it, because there have been changes.

#

Not entirely sure how we missed adding it to cookiecutter. But now we need to go through and add it to all the recently created libraries, run it, PR fixes since I'm certain that it will find issues, and then update black=versionnumber in all the existing libraries.

manic glacierBOT
idle owl
#

@tulip sleet There won't be artifacts on a PR until the checks run, right? Or am I not understanding how the artifacts are built.

tulip sleet
#

right, the checks build the artifacts and upload them

idle owl
#

Ok thanks.

idle owl
#

@gilded cradle Are you around? I have a question about something you did a while ago, and I don't expect you to remember doing it, but you might be able to explain how you came to the conclusion.

gilded cradle
#

Sure @idle owl. I'm here.

idle owl
gilded cradle
#

I think we were getting an error

#

Let me see if I can find it...

idle owl
#

@gilded cradle Thanks. Because it looks to me like they have a Latest release, and I'm somewhat confused.

gilded cradle
idle owl
#

@gilded cradle Ahh hmm. Well done on finding that. Thank you.

gilded cradle
#

np

idle owl
#

Weird that stable works. Because they haven't released a stable either.

gilded cradle
#

Yeah, I'm not sure. Maybe it is having issues with pre-commit

idle owl
#

Could be.

#

Alright. I'll give it a try in the Test Repo and see what I get.

#

@gilded cradle Thank you again!

gilded cradle
#

ok

#

You're welcome

idle owl
#

@gilded cradle latest failed. stable passed. Good to know.

manic glacierBOT
gilded cradle
#

🙂

main furnace
#

Adafruit CircuitPython 6.0.1 on 2020-12-28; FeatherS2 with ESP32S2

#

(Unexpected Labs) Now how to connect to wifi?

idle owl
main furnace
#

ah, thanks

idle owl
#

@gilded cradle I don't think the pre-commit runs the check?

#

Maybe I'm missing something obvious.

gilded cradle
idle owl
#

Hmm

gilded cradle
#

Oh you meant the cookie cutter library, not the result of the cookie cutter

idle owl
#

No, I meant the results of cookiecutter.

#

You're right.

gilded cradle
#

Oh, ok

idle owl
#

@tulip sleet Need to revert that.

#

I screwed up.

tulip sleet
#

ok, will approve revert

#

np, I should have waited

idle owl
#

We still need to update all the libraries that had Black manually added then.

#

But not the new ones.

gilded cradle
#

yes

#

It would be nice if they were on the latest version of black too

idle owl
#

Yes. That is a requirement.

gilded cradle
#

Many are on 19.10b

idle owl
#

I know.

#

It's not good.

gilded cradle
#

I have to keep flipflopping my install to run it locally

#

🙂

idle owl
#

Yeah and typical users don't know how to do that.

#

It's making the workflow fail for folks.

#

I'll look into it this week. Adabot fix.

thorny jay
gilded cradle
#

Thanks @idle owl

idle owl
#

Alright on that failed note, I'm heading off to 🌮 .

#

Or not. @gilded cradle You have an RPi setup and a BNO055, right? Not as in right this second, but as in, in general.

gilded cradle
#

I do @idle owl

idle owl
#

I'll tag you on a PR to test, then. No rush.

#

Ok 🌮 time.

gilded cradle
#

ok

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I got it working by using the board files from espressif_saola_1_wroom.

For the LCD example to work add the LCD pins from pins.c from board files from skieast.

     // 1.14 inch LCD ST7789
    { MP_ROM_QSTR(MP_QSTR_LCD_MISO), MP_ROM_PTR(&pin_GPIO4) },
    { MP_ROM_QSTR(MP_QSTR_LCD_MOSI), MP_ROM_PTR(&pin_GPIO35) },
    { MP_ROM_QSTR(MP_QSTR_LCD_CS), MP_ROM_PTR(&pin_GPIO34) },
    { MP_ROM_QSTR(MP_QSTR_LCD_CLK), MP_ROM_PTR(&pin_GPIO36) },
    { MP_ROM_QSTR(MP_QSTR_LCD_RST), MP_...
pastel sky
solar whale
#

@gilded cradle It comes up from time t to time that Blinka was originally targeted at Micropython - Is that still supported and if so , how would you do it? I've never seen any example using it on Micropython.

tacit gull
#

anyone have any experience with a brand new PyPortal running the Adafruit supplied "esp32spi_simpletest.py" and getting an error "ESP32 timed out on SPI select"? I installed CircuitPython and the libraries several times but I still get this error. It's like the host processor isn't talking to the ESP32 properly or the ESP32 is taking too long to respond. Anyone seen that on a brand new PyPortal board?

gilded cradle
#

@solar whale as far as I know it's still supported. I got a PyBoard right before my holiday break with the intention of testing it out, but never got a chance to yet.

solar whale
#

@gilded cradle OK -- I may give it a try as well --- any tips on where to start? Its not clear to me how to install it?

gilded cradle
#

@solar whale I'm not sure. I imagine there's some sort of mechanism to copy files onto the board.

solar whale
#

OK -- I'll do some digging -- Thanks!

gilded cradle
#

yw

solar whale
#

hmmm -- l may try to add support for the esp32, I have a few of them to work with.

gilded cradle
#

Ok, sounds good.

#

That would be super cool

solar whale
#

just browsing the repo -- have not looked at it much before --I think I see a path to doing it.... we'll see...

#

I also have some esp8266 -- so may start with those since it is already supported.

gilded cradle
#

ok

tacit gull
#

Should I ask questions about the PyPortal in a different topic/group?

solar whale
tacit gull
#

Ok, thanks

manic glacierBOT
idle owl
#

@gilded cradle Nevermind on that PR I tagged you on. Limor wants it done differently. Well, maybe not nevermind, but at least, not yet. 🙂

gilded cradle
#

Yeah, I saw that. Thanks @idle owl

tulip sleet
#

@slender iron I'm trying to fix a couple of probably-related time.sleep() issues. Would you be available for a video chat later?

slender iron
#

@tulip sleet yup, I'm at my desk now. thought someone was calling me at 10 but they are 10 min late now...

slender iron
#

k, call is done

quick siren
#

Hi @slender iron ,
could you confirm that on STM32F405 Express Board OneWire is working?

I posted my comment on GitHub regarding OneWire issue I discovered .

Do you thing a bug would be possible?

https://github.com/adafruit/circuitpython/issues/3822#issuecomment-752937196

GitHub

Tested a DS18B20 temperature sensor (with the appropriate resistor) on a Feather S2 and other boards (like Feather M0 express) and the device is not found on the S2. I think I correctly checked it&...

slender iron
#

@quick siren I have no idea if it works

quick siren
#

@slender iron Thanks for your feedback.

#

Maybe you could update the labels on GitHub when possible.

#

Thanks

slender iron
#

sure! I haven't gone through my email yet

onyx hinge
#

@quick siren If your testing shows a similar bug affecting the stm port, it would be helpful to file a fresh issue. The stm and esp32-s2 fixes will probably require different code, so having an issue to track each one would be useful. Thank you.

lone axle
#

@onyx hinge for sure. It'll be an hour or two before I can get to it. But I'll give it a try once I can and leave a review on the PR

onyx hinge
#

2 hours is an absolutely fine turnaround

#

excellent even

manic glacierBOT
#

DS18B20 OneWire sensors connected to STM32F405 Pin D5 (I tried also D6, etc.) failed. Pull Up resistor is not the issue.

ow_bus.scan() shows different behavior in case of:
a) pin is not connected or
b) sensor or multiple sensors are connected

Case a) IndexError: list index out of range
Case b) nothing is showing up

Same code (with different pins) and same sensors with Metro Express and Playground Express boards is working well.

Tried "[Simple Test](https://github.com/ada...

tulip sleet
#

@onyx hinge Scott and I had a chat re the time.sleep() bug, but also ended up talking about releases. He thinks we're ready enough for 6.1.0. It could have an rc.0 or not. I don't see anything new from 6.1.0 that is not already broken in 6.0.1, mainly the weird time.sleep() bugs. So am trying to knock off any pending useful and easy PR's. I think there's just a weblate one left.

I am happy to do this release unless you want to. I can do an rc.0 or just a final. If a final, I would smoke test the two recent merges: fixing neopixel init and also frozen bus device.

onyx hinge
#

@quick siren thank you!

#

@tulip sleet okay, I don't have anything to the release, my work on the esp32-s2 i2s driver keeps slipping into the future and wasn't scheduled for 6.1.0 anyhow. I would not mind at all if you made the release.

quick siren
tulip sleet
#

@onyx hinge do you have a process opinion about doing an rc or skipping it and going to final?

onyx hinge
#

@tulip sleet I think the ulab change is kinda big, the diffstat of the submodule is 101 files changed, 4465 insertions(+), 924 deletions(-). That makes me uneasy about going direct to a stable release, since that was subsequent to beta.3.

tulip sleet
#

no prob, I will do an rc.0

manic glacierBOT
solar whale
#

@gilded cradle Not much progress getting Blinka to run on an ESP8266 -- It keeps running out of RAM when trying to load PlatformDetect.... It's clear this has not been tested... Just wanted to give you an update -- I'll keep working on it.

gilded cradle
#

Ok thanks @solar whale. Platform detect is MUCH bigger than it used to be.

solar whale
#

yes! I've converted most of it to .mpy --- gettin gcloser

gilded cradle
#

ok, good idea

solar whale
#

@gilded cradle WooHoo! I can import board -- Declaring victory for today....

tidal kiln
#

is the magtag accelo IRQ pin in here somewhere?

Adafruit CircuitPython 6.1.0-beta.3 on 2020-12-31; Adafruit MagTag with ESP32S2
>>> import board
>>> dir(board)
['__class__', 'A3', 'AD1', 'BATTERY', 'BUTTON_A', 'BUTTON_B', 'BUTTON_C', 'BUTTON_D', 'CS', 'D1', 'D10', 'D11', 'D12', 'D13', 'D14', 'D15', 'DISPLAY', 'EPD_BUSY', 'EPD_CS', 'EPD_DC', 'EPD_RESET', 'I2C', 'LIGHT', 'MISO', 'MOSI', 'NEOPIXEL', 'NEOPIXEL_POWER', 'SCK', 'SCL', 'SDA', 'SPEAKER', 'SPEAKER_ENABLE', 'SPI', 'VOLTAGE_MONITOR']
>>>
gilded cradle
#

Excellent @solar whale

prime flower
#

@tidal kiln p sure it's connected to GPIO 9 on the magtag.

manic glacierBOT
tidal kiln
#

@prime flower yep. just not seeing that exposed in CP.

manic glacierBOT
#

Not enabling the second LDO and relying on parasitic power via the CLK/DATA to make it light up is not really a solution I'm ok with. If there is no way to do this "at the board level" then use of the APA for this purpose should not be added. But none of this is really up to me, so getting feedback from the CPY team is going to be required :)

This should be doable at the board level. You can turn the second LDO on in board_init and turn it off in board_deinit. The tricky part will be...

idle owl
#

@slender iron Where do I find the artifacts following a merged PR? Same place on S3?

#

Nevermind, I found the artifacts button on GitHub.

slender iron
#

once it's merged then it should push to s3 too

idle owl
#

Ah ok. I saw that in the CI which is what confused me.

slender iron
#

S3 should be skipped for unmerged PRs

#

(we don't want to give un-reviewed code access to upload to s3)

idle owl
#

Right, makes sense.

manic glacierBOT
#

@nmorse What encoder are you using? It seems incorrect for there to be a single value at rest.

It is possible to add a keyword argument without breaking the API because they are optional. The underlying C just gets the default value passed in.

Argument parsing is done here: https://github.com/adafruit/circuitpython/blob/main/shared-bindings/rotaryio/IncrementalEncoder.c#L67

thorny jay
manic glacierBOT
slender iron
#

PinAlarm

thorny jay
#

But I was failing with:

#

#pin_alarm = alarm.pin.PinAlarm(board.IO0)

####Traceback (most recent call last):

File "code.py", line 37, in <module>

####TypeError: 'pin' argument required

#

But that was with beta3... maybe I need to download something else.

manic glacierBOT
thorny jay
#

Also I wanted to use IO0 because there is a button... but that is boot so maybe very special indeed.

slender iron
#

that looks correct for pin alarm

#

I thought it was in beta.3

tidal kiln
#

@slender iron yep, but not seeing the LIS3DH IRQ pin in board, unless i'm missing something?

manic glacierBOT
thorny jay
slender iron
#

@tidal kiln I doubt you are. i probably overlooked it

thorny jay
#

I had the impression that Touch made it but not Pin.

tidal kiln
#

@thorny jay fwiw, here's a simple button one i just cooked up:

import time
import board
import alarm
import digitalio
import neopixel

pix_power = digitalio.DigitalInOut(board.NEOPIXEL_POWER)
pix_power.direction = digitalio.Direction.OUTPUT
pix_power.value = False

pixels = neopixel.NeoPixel(board.NEOPIXEL, 4)
pixels.fill(0)
alarm.sleep_memory[0] += 1
pixels[alarm.sleep_memory[0] % 4] = 0xADAF00

time.sleep(5)

pin_alarm = alarm.pin.PinAlarm(pin=board.BUTTON_A, value=False, pull=True)
alarm.exit_and_deep_sleep_until_alarms(pin_alarm)
slender iron
tidal kiln
#

@slender iron worth an issue to add pin?

slender iron
#

worth a PR 😉

tidal kiln
#

ha! fair enough. i'm totes rusty. but probably an easy one to shake off some cobwebs.

slender iron
#

🙂 an issue would be good if you don't have time for a PR

manic glacierBOT
tidal kiln
slender iron
#

what are the regular pins for it called?

#

I'd match what the other boards call it NOT the schematics name

manic glacierBOT
thorny jay
#

It goes into safe mode rather than upgrade mode.

manic glacierBOT
thorny jay
#

And the real reason I tryied this is that I fail at double clicking the FeatherS2 to upgrade. There is a timing issue, and I don't get it.

slender iron
#

I think micro dev may have been looking into it

#

go ahead and file an issue if you can't find one for the s2

thorny jay
#

I am afraid I will go to sleep now... it's 1H30 AM and I lead a meeting tomorrow. 😦

manic glacierBOT
slender iron
#

good night!

tidal kiln
#
Adafruit CircuitPython 6.0.1 on 2020-12-28; Adafruit Circuit Playground Bluefruit with nRF52840
>>> import board
>>> dir(board)
['__class__', 'A1', 'A2', 'A3', 'A4', 'A5', 'A6', 'A8', 'A9', 'ACCELEROMETER_INTERRUPT', 'ACCELEROMETER_SCL', 'ACCELEROMETER_SDA', 'AUDIO', 'BUTTON_A', 'BUTTON_B', 'D0', 'D1', 'D10', 'D12', 'D13', 'D2', 'D3', 'D35', 'D4', 'D5', 'D6', 'D7', 'D8', 'D9', 'I2C', 'L', 'LIGHT', 'MICROPHONE_CLOCK', 'MICROPHONE_DATA', 'MISO', 'MOSI', 'NEOPIXEL', 'POWER_SWITCH', 'RX', 'SCK', 'SCL', 'SDA', 'SLIDE_SWITCH', 'SPEAKER', 'SPEAKER_ENABLE', 'SPI', 'TEMPERATURE', 'TX', 'UART']
>>>
#

ACCELEROMETER_INTERRUPT

slender iron
#

👍

idle owl
#

@tidal kiln What is this getting added to?

tidal kiln
#

@idle owl magtag

idle owl
#

@tidal kiln Ah. Proceed, then. 🙂

lone axle
#

@onyx hinge a few other things popped up before I could get to it, but just got done reviewing out the Bitmap Font PR. It looked good to me, I can merge / release it tonight if you don't need it held back for any reason.

onyx hinge
#

I don't know a reason to hold it back but you can take your time. It only affects unreasonably big fonts

tidal kiln
#

@idle owl okie doke. what would the wrong answer have been? 🙂

idle owl
#

@tidal kiln Not sure. I was wondering whether it should specify LIS3DH, but no, follow the CPB.

#

For some reason I wasn't putting together what you were adding it to.

tidal kiln
#

ah. gotcha. yah, it's for the LIS3DH, but, yep, will follow CPB for naming.

idle owl
#

I concur with that.

#

@tidal kiln As a side note, you're tagged on a few PRs from right about when I think you went on holiday. If you could follow up on those at some point, it would be greatly appreciated. You may have already, if so, ignore this. 🙂

#

I started a PR sweep yesterday and noticed at least one anyway.

tidal kiln
#

i did a sweep this morning and that's all that popped up

idle owl
#

Sounds likely.

#

Excellent!

#

Thank you! 😄

manic glacierBOT
#

On the MatrixPortal, it is very hard to see output since the display is so low-resolution. I would like to be able to scroll in the output with the UP and DOWN buttons, so I can see why my project crashed and not have to watch the NeoPixel. ("wait for a dark gap... there! Wait, was that orange or yellow? And which line was it on? Ok, starting over...")

This could probably also be applied to other boards with displays and buttons, such as the PyBadge family.

tidal kiln
#

all others are for circuitpython_librarians

idle owl
#

Then I wouldn't have caught them. Yah I think that was it.

#

I didn't bug you during the sweep because it looked like it was right around you heading out, so I figured you'd get to it when you returned.

tidal kiln
#

if you find others, please ping me. i could be githubing poorly.

idle owl
#

@tidal kiln Will do. I was going alphabetically so that was probably all I caught. Sounds like you're githubbing fine 🙂

manic glacierBOT
#

I'm certainly not an expert on GetText, but from what I've run into with other systems in the past, I suspect it might have to do with the default locale text being the key. So say the text is "This help text spans\nmultiple lines", it might be transforming that into something like "This help text spans\\nmultiple lines", some form of truncation or perhaps some other mutilation. Or it might just make a mess of itself and move on.

Ideally, the key text would be a simple string that the ...

tulip sleet
#

@slender iron in your email pass, did you see anything not yet merged that you think should be in 6.1.0 rc?

slender iron
#

nope! I'm through it all and can't remember anything

tulip sleet
#

ok! I will branch 6.1.x

slender iron
#

listening to the meeting now 🙂

#

thanks!

tidal kiln
#

getting this trying to install esp-idf via the ./esp-idf/install.sh script:

ERROR: Could not find a version that satisfies the requirement bidict>=0.21.0
#

should i be running it with sudo?

slender iron
#

no, we saw that....

#

tries to remember who had the issue

crimson ferry
#

me

slender iron
#

how did you end up fixing it @crimson ferry ?

crimson ferry
slender iron
#

hrm

tidal kiln
#

i'm on ubuntu 18.04, fwiw

tulip sleet
#

does python -> python3 ?

#

definitely never use sudo

tidal kiln
#

i don't think so. it appears to be doing stuff with 2.7

tulip sleet
#

apt install python-is-python3

#

i mean if you do python --version is it 2 or 3?

manic glacierBOT
#

Thanks for looking into this again.
It's time to quit. You have better things to do and I have no clue which
blank line is missing.

I've used the library extensively and it works correctly as best I can
tell. So if perhaps in the future someone has a need this might be a
starting point.

Sorry to have wasted your time.

On Tue, Jan 5, 2021 at 4:14 PM Scott Shawcroft notifications@github.com
wrote:

Looks like there is a doc build error:

/home/runner/work/circuitpython/circuitpython/s...

tidal kiln
#

oh...for my setup...yah....it's pointing to 2.7

#

yah. gothca right as you were typing.

tulip sleet
#

it needs it to be 3, hope that doesn't mess up something else

tidal kiln
#

i've got muscle memory for just doing python3 for everything these days

tulip sleet
#

i wish they used a version name for python

tidal kiln
#

can i just change the sym link? or should i use that python-is-python3?

tulip sleet
#

python-is-python3 makes a symlink, it's just a clean way of doing it. I don't think ubuntu ships with a plain python.

#

it might use /etc/alternatives, I'm not sure

#

... nah, it's just a symlink

#

the advantage of a package is that it will get upgraded as necessary

tidal kiln
#

it griped about not finding the package. i just went ahead and changed the sym link. running again.....

#

it's def using 3.x this time

tulip sleet
#

I guess that package got added with 20.04

tidal kiln
#

and done. ran fine that time. thanks.

marble hornet
#

I've been working on a revision to an api where there is optional extensibility via passed functions / subclasses and wrote a small script to test call times of functions in circuitpython. thought other people might find it useful too:

tidal kiln
#

now test build failing.
i ran . esp-idf/export.sh
and then make BOARD=adafruit_magtag_2.9_grayscale

#

says CMake Error: The source directory "/home/username/repos/circuitpython/ports/esp32s2/build-adafruit_magtag_2.9_grayscale/esp-idf" does not appear to contain CMakeLists.txt.

slender iron
#

@tidal kiln try cleaning

tidal kiln
#

got same thing again

slender iron
#

hrm

#

what version of cmake do you have?

#

have you built esp32s2 before?

tidal kiln
#

nope.

#
$ cmake --version
cmake version 3.10.2
slender iron
tidal kiln
#

👍

#

looks like thats the latest avail via package manager...will update manually...

slender iron
#

kk

manic glacierBOT
#
[adafruit/circuitpython] New branch created: 6\.1\.x
tidal kiln
#

got much further, now getting:

CMake Error: CMake was unable to find a build program corresponding to "Ninja".  CMAKE_MAKE_PROGRAM is not set.  You probably need to select a different build tool.
-- Configuring incomplete, errors occurred!
#

installed ninja-build and got past that

manic glacierBOT
#

I agree I wouldn't do it with a global, either. Really, the loader should be a class that allocates some space for the duration of the load, and puts stuff like the filename there.

Anyway, no, I was running into issues copying .mpy files to the lib folder on a Feather M0 Basic using the Finder on macOS, due to it copying ._ versions of the files (not sure why it does that or why they're so big). I think there may also be a free space reporting issue. In any case, cp -Xr worked to s...

tidal kiln
#

@slender iron @tulip sleet thanks for the help. looks like i'm building now.

#
Adafruit CircuitPython 6.1.0-beta.0-562-g7e59ff379 on 2021-01-05; Adafruit MagTag with ESP32S2
>>> print("hello world")
hello world
>>> 
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 6\.1\.0\-rc\.0
orchid basinBOT
manic glacierBOT
manic glacierBOT
#

Yes, I modified the original code to include catching the OSError and reporting. Once the OSError gets triggered, it looks like the network connection is gone and does not recover. Here is the code snippet

` print("***inside")
fetch_success = False

       try:
           inside = NETWORK.fetch_data(
               url=Inside_SOURCE,
               json_path=(PM2_Location,TEMP_Location,HUMI_Location),)
           fetch_success = True
  ...
tulip sleet
manic glacierBOT
#

Not enabling the second LDO and relying on parasitic power via the CLK/DATA to make it light up is not really a solution I'm ok with. If there is no way to do this "at the board level" then use of the APA for this purpose should not be added. But none of this is really up to me, so getting feedback from the CPY team is going to be required :)

This should be doable at the board level. You can turn the second LDO on in board_init and turn it off in board_deinit. The tricky part w...

prisma pilot
#

Has anyone got circuit python working on the WIO Terminal?

stuck elbow
analog bridge
#

Is there a CPY library to implement a FTP server?

lone axle
#

I don't think anything like that exists yet.

analog bridge
#

thanks @lone axle ...

lone axle
#

if you are simply looking to tranfer file over network, and aren't picky about protocol, I would guess that HTTP is probably a bit closer to working for that. I do believe there is an HTTP server already for circuitpython, not sure if it's intended to serve files by default though or just responses from memory.

analog bridge
#

I would like to present CIRCUITPY drive as a network drive... I found few MicroPython implementations which could be ported to CPY

#

This is basically related to OTA updates for user code.

lone axle
#

Ooh that sounds neat 😄 I've not seen anything like it for CircuitPython, but definitely am interested if/when it is possible

prime flower
#

@analog bridge That sounds really interesting, have you used ampy for MicroPython before? Might be interesting if we can interact with the "drive" over the network, and load files onto it.

manic glacierBOT
tulip sleet
#

@slender iron I will get the issue reporters to test this tick fix too, after I get some artifacts

analog bridge
slender iron
#

sounds good @tulip sleet

manic glacierBOT
#

Its key could be something like "GITHUB_ISSUE_WITH_CONTENTS". That would require a good amount of refactoring, including creating the English "Translation", and ensuring that the builds for the en locale apply the text as appropriate. The upside is, it gets to be immediately obvious if there's an untranslated string. Particularly if a translation rule can be created, something like [A-Za-z0-9][A-Za-z0-9_-]{4,} to ensure both style, format and other rules (minimum length, etc).

This i...

#

Thanks for looking into this again. It's time to quit. You have better things to do and I have no clue which blank line is missing. I've used the library extensively and it works correctly as best I can tell. So if perhaps in the future someone has a need this might be a starting point. Sorry to have wasted your time.

You are so close! I'll look now and see if I can find it. The line number is for the intermediate generated file.

#

But how do I get the intermediate file?
Presumably I could run the build (would have to figure out how to do this)
locally, and then look at that file.

BTW: are you using a tool to help you format the documentation? It's very
tedious with just a text editor (V-code).

I need an AI tool that inserts the missing newline, rather than just
telling it's missing -:)

On Wed, Jan 6, 2021 at 8:44 AM Scott Shawcroft notifications@github.com
wrote:

Thanks for looking into this again. It's time to...

tropic brook
#

Not sure how much you have completed? I actually completed the integration and software for a system that does all these things.

manic glacierBOT
#

There is some other bug as well, that is present in 6.1.0-beta.3. Sleep times are too long and inaccurate now. Sounds like #3912.

Adafruit CircuitPython 6.0.1 on 2020-12-28; Adafruit Feather M0 Express with samd21g18
>>> import time
>>> print(time.monotonic()); time.sleep(0.1); print(time.monotonic())
14.036
14.136

But beta.3 is bad;

Adafruit CircuitPython 6.1.0-beta.3 on 2020-12-31; Adafruit Metro M0 Express with samd21g18
>>> import time
>>> print(time.mo...
tropic brook
#

Here is the drawing. If you send me a note I will pipe you the code. This config uses the ESP32 wifi on top of the Itsy M4 thus it broadcasts the data to any computer or phone that is on the local wifi lan.

manic glacierBOT
#

I just pushed the fixes to: https://github.com/adafruit/circuitpython/pull/3659/commits/cdad59fbc2d681d06a21aefedb00a6b6946cce1c

You can build the docs locally with make html at the top level. There are some install instructions for sphinx here: https://learn.adafruit.com/creating-and-sharing-a-circuitpython-library/sharing-our-docs-on-readthedocs I think you may also need to pip install sphinxcontrib-svg2pdfconverter and recommonmark too.

slender iron
#

anyone know if we have docs for building the core docs?

manic glacierBOT
tulip sleet
manic glacierBOT
#

Adds the ESP32S2 pin connected to the LIS3DH INT1 pin.

schem

Crude test (still learning details on all the interrupt config), but note that IRQ pin state tracks bit 7 in the LIS3DH's IRQ status register.

import time
import board
import digitalio
import adafruit_lis3dh

irq_pin = digitalio.DigitalInOut(board.ACCELEROMETER_INTERRUPT)
irq_pin.direction = digitalio.Dire...
ionic elk
#

@tulip sleet in the meeting on Monday I said I was going to help you with something but I have forgotten what issue it was specifically, could you link to it?

#

Magtag mac crash thing?

idle owl
#

Yeah that. @ionic elk

ionic elk
#

@idle owl sorry what's up? I know I need to help you with the neopixel thing too, sorry I've been trying to get my darn guide in and dealing with leftover holiday nonsense

idle owl
#

@ionic elk No worries. That was no rush on the LED thing, afaik. I was simply saying, it was a 2018 MacBook Pro issue that you said you could help with.

#

I think it's in the CircuitPython issues list.

#

@ionic elk No apologies needed. We're all getting caught up.

manic glacierBOT
ionic elk
#

@idle owl @tulip sleet I searched the first and second pages of the issues list and looked at all the ESP32-S2 issues, is didn't see any that mentioned Mac OSX, so I was wondering whether it's older, or if the mac part of the issue isn't mentioned

idle owl
#

@ionic elk Hmm was it even ESP? Now I'm second guessing. Hold on.

ionic elk
#

wait what? I thought it was a deep sleep issue

idle owl
#

The second one is the program to try.

#

No, it's a general sleep issue I guess?

ionic elk
#

Or am I doubly confused, I guess I don't understand yet which ports have what level of sleep support

#

I assumed it was ESP32S2 only

idle owl
#

I'm fuzzy on the entire sleep thing, tbh.

ionic elk
#

it can be tricky! I did a lot of it back before I was working on Circuitpython but mostly in the RTOS world

tulip sleet
#

it was a SAMD51 and SAMD21 time.sleep() issue, not a deep sleep issue

ionic elk
#

ah

#

my mistake

tulip sleet
#

multiple issues: #3912, #3918, #3919. Not done yet

#

I have a fix for one or two

manic glacierBOT
manic glacierBOT
#

Corrects for bug found in #3897

Adds subclassing functionality based on the implementation in "Group". Please take a look to make sure nothing was missed.

Quick test script I used to verify on a SAMD51 based board

import board
import busio

class uart_subclass(busio.UART):
        def __init__(self, tx: microcontroller.Pin, rx: microcontroller.Pin, *, baudrate: int = 9600, bits: int = 8, parity: Optional[Parity] = None, stop: int = 1, timeout: float = 1, receiver_buffer_siz...
#

Issue #3826 was fixed in 6.0.1 but the fix seems to have introduced a new bug. Any timeout value >= 0.1 seems to be ignored now (no timeout). I had the code below running for 14 min and it did not precede past "Scanning for an Adafruit Server advertisement...". I checked 6.0.0 again and the behaviour there is as expected.
I tested this on a Feather Sense using 6.1.0 RC as well as 6.0.1.

import time

import adafruit_ble
from adafruit_ble_adafruit.adafruit_service import AdafruitSe...
hearty tapir
#

@crimson ferry congratulations on #3903 🙂

manic glacierBOT
#

Looks like it ran out of space on a few more of the smaller devices.

I can try to disable this new module on those devices this week to see if that will get it passing CI.

Thanks for all of your work on this @iot49! This looks very cool, I am interested using this for a few different things. Am willing to help out any way that I can to get this to the finish line.

idle owl
#

Pro tip: check the changelogs to see if the bug you didn't find in the issues list has already been addressed before writing up a thorough issue with screenshots and the like. 🤦‍♀️

#

At least I hadn't hit submit yet.

idle owl
#

@tulip sleet Do I remember some issue with the status LED on ItsyBitsy M4 being super dim for some reason? As in the LED isn't dim I don't think, but as a status LED it's super dim.

#

This is ringing a really faint bell for me.

tulip sleet
#

we got a different batch of them (DotStars, I think), and they were decidedly different in brightness

idle owl
#

Ah ok. Yeah this is from a while ago.

#

They're DotStars, yes.

#

That's right. We compared them, confused, thinking it was code, and realised it was hardware.

tulip sleet
#

some were really bright, and some were not. The color values we had chosen were too bright with some and kinda too dim with others

idle owl
#

Riiiiiight

#

We had to compensate

#

ok yes.

#

The bell is no longer faint.

#

Thanks!

stuck elbow
#

I wonder if stuff like this should be saved in the bootloader's config

tulip sleet
#

we'd have to burn different params in different manufacturing runs

stuck elbow
#

also if you have different batches of displays, with different offsets

#

MakeCode Arcade does that

manic glacierBOT
hearty tapir
idle owl
#

@hearty tapir Nice!

hearty tapir
#

Thanks, but I think there is a better/smarter way to do the strcpy ... I wish C would allow the string assignment as I've used it for a decade in Python 😄

manic glacierBOT
#

@ladyada 0x239A is Adafruits's vendor ID.
I used it because many other boards are already using the same vendor ID, despite not being an Adafruit product.
Not sure how they picked their PIDs, as none of them seem registered.
Should I change just the PID to be something unique in the context of this repo?

I can try asking the folks at LilyGo. but, from what I've seen, they don't seem to be very responsive on Github or Twitter.

#

grafik

While this works fine, I'm not entirely confident with my change around the following, as I need an additional variable.
e.g.

strcpy(authmode, "OPEN");

Can I get around this? I've tried/attempted to directly strcpy into cstr, but this resulted in an unhappy compiler.

I'm planning to add pairwise_cipher & group_cipher, unless you'd prefer to be a separate PR (thus...

manic glacierBOT
#

It looks like this behavior started after commit c7d87ce - "Fix autoreload on SAMD21" . Tracing showed that we are now sitting on the __WFI() call in port_idle_until_interrupt() until we get an interrupt once a second. As a result, sometimes a time.sleep of .1 will sleep nearly a second; other times it may return quickly, depending on how close to the 1/sec interrupt we were.

slender iron
#

@onyx hinge can you plug circuitpython2021 on show and tell as well?

manic glacierBOT
#

@DavePutz port_idle_until_interrupt() can be preceded by port_interrupt_after_ticks(), which is supposed to set up the RTC counter interrupt to interrupt after the actual requested sleep time, not just once a second.

I am at the moment debugging the SAMD21 M0 version of this, which has its own issues: _ticks_enabled, which is supposed to be a boolean, seems to be getting smashed from false to some random integer value. It sits between some USB buffers, so there may be an overflow s...

#

@DavePutz And another club: _ticks_enabled exists on the SAMD51 version, but is not used except it's checked in port_interrupt_after_ticks(). If it gets smashed in the SAMD51 version too (as opposed to always staying false), that would explain what's going on, since it will disable setting up the interrupt to handle the specific time of the time.sleep().
https://github.com/adafruit/circuitpython/blob/a33359762d8c46d5aafe28dcbbe2e4b98019be92/ports/atmel-samd/supervisor/port.c#L539-L544

marble hornet
#

@slender iron I know I keep on saying it but thanks for all the work you put into displayio! and thank you to everyone who worked on the libraries and testing!

manic glacierBOT
#

This build CI workflow takes forever. I wish there was an easy way to separate the building docs changes from the building firmware changes. My first guess would be a separate workflow for building the firmware that ignores changes to *.rst & *.md files using

on:
  push:
    paths:
      - "**/*"
      - "!**/*.md"
      - "!**/*.rst"
  pull_request:
    paths:
      - "**/*"
      - "!**/*.md"
      - "!**/*.rst"
  release:
    types: [published]
  check_suite:
    typ...
onyx hinge
#

@slender iron shoot, I didn't see your request in time.

orchid basinBOT
manic glacierBOT
manic glacierBOT
#

Thanks for all your work. I originally did not continue working on the port
due to issues with obtaining a unique VID/PID pair for the USB device. I
have been using Espressif VID for my internal use but that is obviously not
useful publicly. Long term the various boards using Espressif devices from
some vendors will not be easy to support. I had some hope that Espressif
might allocate PID from their own VID but that also seems unlikely. Maybe
some large purchaser of Espressif parts can ask t...

manic glacierBOT
manic glacierBOT
manic glacierBOT
hearty tapir
onyx hinge
#

Good morning!

tulip sleet
#

likewise!

onyx hinge
#

Looks like you had a fruitful discussion with hatach but not a full resolution of that variable-smashing bug?

tulip sleet
#

yes, there is a buffer that's overflowing, and it only happens on certain hosts. I am trying some sentinel bytes stuff to see how much it is overflowing. I also have one idea to check (order of operations).

#

this is a second-order bug causing time.sleep() to be erratic

onyx hinge
#

I don't suppose that at the time of the overwrite you can use the $lr register to reliably see the calling instruction to memcpy ..

tulip sleet
#

it's DMA

onyx hinge
#

oh I thought some of it was memcpy

tulip sleet
#

i have a watchpoint set, and it's not catching the smash. There was another bug that was also smashing!

onyx hinge
#

oooh

#

it's a dessert wax and a floor topping

tulip sleet
#

i know, this is one of the most layered bugs I've seen

timber mango
#

Hi! How can I change the color text and the background of MU for CircuitPython?

stuck elbow
#

@timber mango click the "theme" icon

#

the one with a crescent moon

prime flower
#

there's no example for use with native sockets, that's on the magtag guide, base example uses esp32spi, and some examples for some network ifaces dont match examples for other ifaces

timber mango
prime flower
#

@timber mango you could put in an request over on the Mu repository for more themes or dig thru their source to see how they "do" themes.

#

that's it tho :\

timber mango
orchid basinBOT
stuck elbow
#

@timber mango there isn't any way to customize the colors further. Mu is supposed to be simple. You can use more advanced editors if Mu is not enough.

manic glacierBOT
manic glacierBOT
#

Thanks will do.

On Thu, Jan 7, 2021 at 9:36 AM ladyada notifications@github.com wrote:

@skieast https://github.com/skieast please email lilygo, they have to
purchase a VID for their products just like every other manufacturer. if
you email them, the support team there will be able to assign a PID. we are
not customers so we cannot email them.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/adafrui...

slender iron
#

@hearty tapir you around? you could make your circuitpython .md and github will render it nicer

hearty tapir
slender iron
hearty tapir
#

Thank you, I'll ping you once I changed it - still caught up on work. 🙂

slender iron
#

np!

orchid basinBOT
slender iron
#

@tulip sleet I think we should just move the 6.1.x branch forward on main until the tcp server pr goes in

manic glacierBOT
#

This build CI workflow takes forever. I wish there was an easy way to separate the building docs changes from the building firmware changes. My first guess would be a separate workflow for building the firmware that ignores changes to *.rst & *.md files (& the docs folder) using

We could definitely do this for pure doc changes. Many C files have docs in them as well so we'll still need the full set of tests for those changes.

I also find it a little weird to upload all non-released ...

#

I used it because many other boards are already using the same vendor ID, despite not being an Adafruit product.
Not sure how they picked their PIDs, as none of them seem registered.
Should I change just the PID to be something unique in the context of this VID? like 0x80AD

We've allocated Adafruit PIDs for non-Adafruit devices when we're the ones adding support or at the request of a maker in our community.

We not doing this as much now because of the popularity of the S2. Comp...

manic glacierBOT
manic glacierBOT
#

Taking a leaf out of displayio's book, I think what is needed for circuitpython's core is time sensitive / performance building blocks for a UI loop.
My first guess at what this should include would be one way to do each of the following:

  • A way to make a group as touchable, scrollable, or selectable.
  • A gesture recognition algorithm that takes inputs from a touchscreen/hardware/buttons and turns them into scroll, touchdown, touchup, press, and hold events (this might several loops fo...
manic glacierBOT
#

Typical output when circuitpython.pot needs to be updated:

Check Yaml...............................................................Passed
Fix End of Files.........................................................Passed
Trim Trailing Whitespace.................................................Passed
Check Translations.......................................................Failed
- hook id: translations
- files were modified by this hook

find extmod lib main.c ports/atmel-samd ports...
tulip sleet
slender iron
#

you can also just reset it

#

are there changes on it already?

manic glacierBOT
#

Hi @caiokat & @tannewt, great to find like-minded people on such topics - really happy! When I tested this directly with the ESP-IDF some time ago, it was necessary to set both capable and required to successfully connect to a WPA3(SAE-AES)-only SSID. IEEE 802.11w which is Protected Management Frames (PMF) aka Management Frame Protection (MFP) is not new with WPA3, but it was made mandatory to support by equipment that wants to claim WPA3 compliance. You could find WPA2 SSIDs that require you...

tulip sleet
#

@slender iron nope, no additional commits yet.

hearty tapir
# slender iron np!

I've updated the gist to be markdown. Thanks for the suggestion! I didn't see a button and then assumed it can just handle plain text. 😂

#

I'll now try the suggested code and update the PR if successful 🙂

south hinge
#

I'm really loving the MagTag and learning from the guides. Like I never knew you could tilegrid your icons. Took a quantum leap in understanding after deep diving into the code for the weather magtag guide

prime flower
#

The code I'm writing requires a "RFC3339 timestamp with mandatory time zone offset", Python has .isotime(), do you have any ideas on doing this, in CircuitPython

simple pulsar
#

Hi. I just bought a FeatherS2 and its serial console doesn't show up. I was just trying to install the 2.5.0.0 usb drivers on my trusty old Windows 8.1 host but they don't seem to "bite". I've got rid of the old 2.4 drivers ok. Is there some secret to installing these?

tulip sleet
#

@simple pulsar the feather s2 is not our board so we didn't add drivers in the drivers package for it, assuming it's not a 0x239A VID.

#

oh, wait it is, so it should work

simple pulsar
#

I don't even see my Feather nRF52840 when I try and install the 2.5.0.0

tulip sleet
#

239a/80ac

simple pulsar
#

Yeah, the 80ac sounds familiar

#

It whizzes through doing all the normal stuff but they don't seem to install.

tulip sleet
#

"Device Cleanup Tool"

#

you can upgrade 8.1 to 10 for free, i know, some people don't want to

simple pulsar
#

Oh, is that offer on again?

tulip sleet
#

it has never been off; it's just not advertised. I have upgraded a dozen machines with no trouble

#

make a backup, of course

simple pulsar
#

Indeed. I'll give that a go when i repatriate my laptop as a standby.

manic glacierBOT
#

Test program: mixing mono RawSamples to stereo:

import array 
import audiobusio
import audiocore
import board
import supervisor
import sys
import time
import math

def busy_sleep(n):
    deadline = time.monotonic_ns() + int(n * 1e9)
    while time.monotonic_ns() < deadline:
        pass

# wait for serial connection
while not supervisor.runtime.serial_connected:
    pass
time.sleep(.1)
while supervisor.runtime.serial_bytes_available:
    sys.stdin.read(1)

print("pr...
manic glacierBOT
#

At this point, RawSamples seem to function properly. However, WaveFiles don't work right -- each one plays a different characteristic tone, which may be the first 256 or 512 bytes of the sample. I haven't gotten good debug information via serial prints yet, but it almost looks as though the background task stops getting called. This could be related to how busy_sleep is necessary sometimes.

hearty tapir
#

I have a git related question: I now have done all my work on the "wifi-authmode" branch, but if I switch back to "main" (checkout main) obviously the changes I've done in the wifi-authmode branch are not there. If I'd want to work on another feature/enhancement (that may be in the same files), I'd probably branch from "wifi-authmode" and not from "main" to avoid that OR do I create a new branch (e.g. wifi-cipher) and merge "wifi-authmode" there?

slender iron
#

@hearty tapir is it merged in?

hearty tapir
#

No, I haven't merged anything - but I pushed the changes you suggested to the PR (that is done). My question was more one of the open git miracles to me 🙂

slender iron
#

I'd probably just make another branch off the authmode one

#

or if it's independent then just off main

simple pulsar
#

@tulip sleet Turns out the 2.5.0.0 usb driver installation was silently failing. Windows has a fairly sensible default setting to prohibit installing unsigned drivers and that needs to be overriden which can be done on a one-off reboot basis. I wasn't getting that red dialgoue box before. It all works now. But when I've got some time to deal with any fallout I'll try the upgrade, thanks.

manic glacierBOT
#

I have seen the capability demo'd in youtube video, so I know it is possible. What I can't find is where/how you enable it.
I can tell that supervisor/supervisor.mk launches a python program tools/gen_usb_descriptor.py.
What I can't tell is the intended way to add in an additional descriptor such that WEBUSB is included in the composite devices.

The code seems to support "CDC" "MSC" "HID" "AUDIO" (and possibly "MIDI"). Is there a "WEBUSB"? Is there supposed to be?

Does gen_usb_descrip...

hearty tapir
#

Ok, so this is the way that commits/branches got to depend on each other.

simple pulsar
#

Btw, general ESP32-S2 question, do any of the boards (current or planned) have BLE or are these WiFi only?

slender iron
hearty tapir
#

ESP32-S2 is Wi-Fi only, but the ESP32-S3 will have Wi-Fi + BLE again 🙂

slender iron
#

but not classic bluetooth

simple pulsar
#

Thanks. I'm not sure I need both at the moment but it sounds nice to have.

hearty tapir
manic glacierBOT
manic glacierBOT
lone axle
onyx hinge
#

Feel free to push to my PR branch if github lets you do that, and thanks for working on it!

tulip sleet
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

"some OS's" -- this may be for blinka support. See https://github.com/adafruit/Adafruit_CircuitPython_BusDevice/pull/22 -- I don't think any I2C driver in CircuitPython has this limitation, because the internal probe function (used only for scan, and not available to call here, sadly) doesn't have the second detection method.

It was writing a zero byte value to the bus. This triggered a bug in the Linux kernel I2C bus OMAP2 driver for the BeagleBone. The driver returns an invalid write er...

manic glacierBOT
simple pulsar
#

@tulip sleet It's possible I'm the only one on 8.1! This is what I found useful and the source is reasonable if not optimal https://learn.sparkfun.com/tutorials/disabling-driver-signature-on-windows-8/all covers it. I see things like https://superuser.com/questions/372725/install-unsigned-drivers-in-windows-7 and https://docs.microsoft.com/en-us/windows-hardware/drivers/install/installing-an-unsigned-driver-during-development-and-test which suggest that perhaps there's a non uniform story on Windows 7?

simple pulsar
#

Are all CircuitPython boards supposed to have sys.platform available? My new FeatherS2 with 6.0.0 (as shipped) doesn't seem to have it. ```Adafruit CircuitPython 6.0.0 on 2020-11-16; FeatherS2 with ESP32S2

import sys
dir(sys)
['class', 'name', 'argv', 'byteorder', 'exit', 'implementation', 'maxsize', 'modules', 'path', 'print_exception', 'stderr', 'stdin', 'stdout', 'version', 'version_info']
sys.version
'3.4.0'
sys.platform
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
AttributeError: 'module' object has no attribute 'platform'

onyx hinge
#

@simple pulsar it looks like this is missing because the port doesn't define a macro. It would need to be similar to nrf: ports/nrf/mpconfigport.h:#define MICROPY_PY_SYS_PLATFORM "nRF52840". Please file a PR to add it, or file an Issue if you're not comfortable doing it.

#

(please use 6.1.0-rc.0 or later with the esp32s2 platform)

simple pulsar
#

Thanks. Yes, I saw some pin tweaks in release notes, I was just using it out of the box and keeping an eye on 6.1.0

onyx hinge
#

ports/nrf/common-hal/os/__init__.c: MP_QSTR_sysname, MP_QSTR_nodename, there may also be os.sysname which would also need attention.

simple pulsar
#

I get os.sysname: esp32s2

onyx hinge
#

OK good

simple pulsar
#
'esp32s2'
onyx hinge
#

thanks for looking into it @simple pulsar

manic glacierBOT
#

A new FeatherS2 (from @unexpectedmaker) which comes with 6.0.0 does not have sys.platform:

Adafruit CircuitPython 6.0.0 on 2020-11-16; FeatherS2 with ESP32S2
>>> import sys
>>> dir(sys)
['__class__', '__name__', 'argv', 'byteorder', 'exit', 'implementation', 'maxsize', 'modules', 'path', 'print_exception', 'stderr', 'stdin', 'stdout', 'version', 'version_info']
>>> sys.version
'3.4.0'
>>> sys.platform
Traceback (most recent call last):
  File "", line 1, in 
AttributeErro...
onyx hinge
#

@slender iron @tulip sleet I am a bit surprised to see that, at least on esp32s2, sleep() EITHER is blocking other freertos tasks, OR is deferring background tasks scheduled by my i2s_event_task. As a result I have to enable background ticks when playing i2s audio on esp32s2, in addition to doing a background_callback_add from the i2s_event_task. I'll put in calls to turn on ticks in this situation, but should I pursue it as a bug (at least entering an issue about it) too?

simple pulsar
#

I put an issue ticket in for that. This would affect all ESP32-S2 boards, then?

onyx hinge
#

the background callback was supposed to be an alternative to ticks, but it was pre-deep-sleep

#

@simple pulsar looks like.

#

Sure you don't want to help us out by making a pull request? I am pretty sure it's as simple as adding that one line in the mpconfigport.h file.

#

(and testing, but you are great at testing!)

tulip sleet
#

Recording a possible problem in an issue is a good idea. We can always close it if it turns out not to be a problem after investigation. I have not been looking at the ESP32S2 time.sleep() code in my recent bug hunt.

manic glacierBOT
simple pulsar
#

I've resisted compiling CircuitPython so far, I've got a few other things on the go at the moment. I just wanted to get some Enviro+ stuff working properly for some friends' children. They have Feather nRF52840 Express boards but the FeatherS2 is a tempting option after that and my benchmark program prints out sys.platform, hence the query.

#

While I'm here, does anyone know if the nRF52833 has same FP performance as nRF52840? They sounds very similar but the micro:bit V2 is about half the speed of the CLUE for crude floating point tests. Could also be a MicroPython vs CircuitPython difference?

onyx hinge
#

@simple pulsar I don't know, the only info I could find is that the nRF52833 is also a "64MHz Arm Cortex-M4 with FPU", same as 52840.

manic glacierBOT
#

Working on I2S for esp32s2 (#3733), I discovered that doing a time.sleep() is either

  • EITHER causing the i2s_event_task not to run
  • OR causing the work it registers with background_callback_add not to be performed
    To compensate for this, I've included code to enable background ticks whenever an I2SOut object exists. However, my expectation had been that "interrupt-like" activities that create background callbacks would still occur, and those background callbacks would be executed,...
onyx hinge
#

OK hope that makes sense

manic glacierBOT
manic glacierBOT
#

Unless I'm misunderstanding something, I don't see any reason that this pin (pin_GPIO21?) cannot be set to a different pin output default in board_init, and then accessed later by a user. If you set the pin to an output in board_init using the IDF functions, and add it to the never_reset array, it should be able to hold its value across resets without being part of the "claimed_pin" array that would prevent users from accessing it.

You have to use the IDF functions directly, because there...

#

Unless I'm misunderstanding something, I don't see any reason that this pin (pin_GPIO21?) cannot be set to a different pin output default in board_init, and then accessed later by a user. If you set the pin to an output in board_init using the IDF functions, and add it to the never_reset array, it should be able to hold its value across resets without being part of the "claimed_pin" array that would prevent users from accessing it.

You have to use the IDF functions directly, because ...

#

@hierophect Can you point me to any examples of using the IDF functions within CircuitPython?

In this case you would draw directly from what's used in DigitalIO. common_hal_digitalio_digitalinout_switch_to_output sets the value of the pin and changes the output mode, and the IDF functions it calls are:

#include "components/driver/include/driver/gpio.h"
#include "components/hal/include/hal/gpio_hal.h"

gpio_set_level(pin_GPIO21.number, value);
gpio_set_direction(pin_GPIO21.n...
onyx hinge
#

@slender iron CONFIG_PTHREAD_TASK_PRIO_DEFAULT

slender iron
#

@onyx hinge that's likely what the main cp task is as well

#

try raising it higher

night perch
# manic glacier

@slender iron I'm the worst and didn't get to this yesterday, but should have more time for it today/tomorrow.

slender iron
#

np @night perch

#

I believe there is some work to do on the PR already

night perch
#

Yeah I saw

slender iron
#

it's slated for 6.2.x anyway

night perch
#

Still, I like to poke at things

slender iron
#

🙂 it's appreciated

night perch
#

This change will cut out ~$15 from my per-device costs and allow me to slim down the device a ton, so I'm super excited about it. Currently using an M4+Airlift to do the same stuff.

slender iron
#

ya, the esps are very cost efficient

manic glacierBOT
#

@hierophect Can you point me to any examples of using the IDF functions within CircuitPython?

In this case you would draw directly from what's used in DigitalIO. common_hal_digitalio_digitalinout_switch_to_output sets the value of the pin and changes the output mode, and the IDF functions it calls are:

#include "components/driver/include/driver/gpio.h"
#include "components/hal/include/hal/gpio_hal.h"

gpio_set_level(pin_GPIO21.number, value);
gpio_set_di...
idle wharf
#

I'm on vacation, but I wanted to drop a few links for CP2021. Really just some notes and thoughts:

slender iron
#

@idle wharf mind emailing them?

idle wharf
#

Will do, thanks !

slender iron
#

(that way I'll leave them as an unread todo in my inbox)

manic glacierBOT
#

FreeRTOS is weird compared to our other ports. Sleep is done by waiting on task notification: https://github.com/adafruit/circuitpython/blob/main/ports/esp32s2/supervisor/port.c#L293

Anything that wants to wake the main task needs to notify it. See https://github.com/adafruit/circuitpython/blob/main/ports/esp32s2/supervisor/port.c#L293

So, if your i2s code happens outside the main task, then you need to notify the cp task to have it run anything.

If notifications occur outside of the...

slender iron
#

@onyx hinge ☝️

manic glacierBOT
#

@hierophect I tried adding the following to board_init()

    // LDO2
    common_hal_never_reset_pin(&pin_GPIO21);
    // Set LDO2 to output and enable
    gpio_set_direction(pin_GPIO21.number, GPIO_MODE_DEF_OUTPUT);
    gpio_set_level(pin_GPIO21.number, true);

If I then try to access the board.LDO2 pin from the REPL I get

Adafruit CircuitPython 6.1.0-rc.0-14-g6976ec6ef-dirty on 2021-01-08; FeatherS2 with ESP32S2
>>> import digitalio,board
>>> ldo2 = digitalio.Digital...
onyx hinge
#

@slender iron where was the second link supposed to go? I found xTaskNotifyGive(sleeping_circuitpython_task) somewhere by grep.

slender iron
#

ah sorry

manic glacierBOT
slender iron
#

I'm fingers get confused between mac copy and linux copy

#

line 279

#

xTaskNotifyGive(circuitpython_task);

onyx hinge
#

OK

onyx hinge
#

I'd like to fix it for any "freertos task needs to schedule a background task", not just i2s. What would the function be called that calls xTaskNotifyGive on esp32s2 and does nothing on the other platforms?

slender iron
#

thinks

onyx hinge
#

.. background_callback_add_core() would get a call to port_idle_interrupt() or whatever it's called at the end, after it actually adds a new cb.

slender iron
#

port_wake_main_task?

manic glacierBOT
onyx hinge
#

Thanks! Sounds fine to me.

slender iron
#

for the empty ones you could put a comment to say that all interrupts wake automatically

onyx hinge
#

at least there's nothing subtle about i2s when it's not working right in this way

#

so I can test it easily

slender iron
#

👍

manic glacierBOT
#

encoder is this one adafruit.com/product/377

It seems incorrect for there to be a single value at rest.

^ my fault for using a short-hand (binary 11 or 00) to represent two pin levels in one value.

Pins a and b are pulled high at rest (detent is binary 11)

I have edited my 11's to be in a more readable form (a=1, b=1)

thanks for the pointer on argument passing.

#

Then next time the board resets, it'll run board_init again, and return the pin to an output state. But you might want to put in a pin reset before changing things in board_init just to be careful.

board_init is only called on start up or after deep sleep. It isn't called when the vm is reset. So you'll need custom "set it back on pin reset" code.

Do we want this to be reset or do we want it always to be set to an OUTPUT and enabled in board_init?
I have it being enabled in b...

manic glacierBOT
#

If you don't put it in the never_reset list, the pin will be returned to an INPUT state whenever the board reset is called, which happens every time the vm resets.

I don't know why pin_is_free is checking the never_reset tables, that is nonstandard port behavior and is not shared for the STM32, NRF or SAMD ports. It's not something we ever formally hashed out though. I'd recommend the (never_reset_pins[offset] & mask) part should be deleted unless @tannewt has objections - I think cases ...

#

Just to recap on the overall strategy here, since this terminology might be getting confusing:

  • the never_reset_pins array is a convention for every port. It is an array that marks IO pins that should never be reset to a default state, such as display pins that are persistent across vm resets, debugging pins, and other system pins.
  • the claimed_pins array is also a soft convention. It is an array that marks pins that have been "claimed" by claim_pin. Modules call claim_pin when ...
#

@CFRED86 Could you test this on your Windows 7 machine? Use a .uf2 from the Artifacts for this PR:
https://github.com/adafruit/circuitpython/actions/runs/472523484

I tried this myself on an old Win7 laptop, both before and after the fix, but it appears it was not susceptible to the problem in the first place, so my test was probably not helpful. It may have to do more with the host USB hardware than the OS.

#

I pushed my latest changes, let me know if more needs to be done.
The DotStar is still very dim for the status message -- I'm not really sure why but I get the same thing when setting it manually .
The status r,g,b level are only 30 of 255. But other boards with dotters (trinket) appear much brighter.
Looking into this.

Can you confirm the second LDO is outputting 3.3V with a multimeter?

manic glacierBOT
#

It is fine when set to higher values

Yeah, I usually run them at 50%. I switched suppliers in November last year and the current APAs I'm using seem to be considerably brighter and a little richer in colour. Interestingly, under the microscope, the 2 APAs look identical, and I cant find any information from either supplier about why the previous reel were dimmer at the lower brightness levels. Hardware is fun ;)

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
orchid basinBOT
manic glacierBOT
manic glacierBOT
#

There were three bugs fixed: one was actually in the time.sleep() code, and was a truncation of a 64 bit large count to 32 bits. The toher were two buffer overruns in tinyusb, one due to a value we didn't know we needed to define larger (the default value was increased), and the other due to an obscure feature in the USB peripheral that stores the CRC bytes after the actual USB message. The latter bug only affected sleep by accident, because a static variable used by sleep was immediately a...

manic glacierBOT
manic glacierBOT
#

Fixes #3956.

This was originally copied over from microcontroller.nvm, and then after a discussion with @tannewt, was deleted. I didn't mean to delete len() and bool(). And on reflection, I think bool() can stay: it's small and cheap, and there's a off-chance that an implementation might provide a zero-length alarm.sleep_memory(say, for instance, its size was dynamically chosen) and that needs to have proper falsiness.

crimson ferry
#

what's the use case for this:mp_raise_msg_varg(&mp_type_MemoryError, translate("Failed to allocate RX buffer of %d bytes"), maxlen * sizeof(uint16_t));vs. this:mp_raise_OSError_msg_varg(translate("twai_driver_install returned esp-idf error #%d"), (int)result);

#

the 1st is used b/c there's no mp_raise_MemoryError? (why not, it's a built-ni CPython exception type?)

#

also, can _msg_varg be freely appended to any raise, and somehow it gets parsed?

manic glacierBOT
simple pulsar
#

On my new FeatherS2 I've noticed a peculiarity on REPL that occurs with 6.0.0 that came with it but not so far on 6.1.0-rc.0. Recalling previous lines on REPL by pressing up arrow sometimes gives an unwarranted SyntaxError: invalid syntax. I'm not sure of the exact conditions to cause that. I had a quick look in GitHub to see if this had been fixed but haven't found a likely ticket yet? Does this sound familiar?

solar whale
#

I've had issues with cut/paste to the REPL... not sure if I've seen what you describe.

simple pulsar
#

First time i've ever seen it, up arrow a few time to find a previous command which failed because I hadn't done import and then that command gave error despite looking fine

manic glacierBOT
lone axle
#

is this issue worthy? I found out that if you have adafruit-circuitpython-bitmap_font installed in your python interpreter it seems to cause an error for building circuitpython:

Traceback (most recent call last):
  File "../../tools/gen_display_resources.py", line 59, in <module>
    f.load_glyphs(set(ord(c) for c in all_characters))
  File "/home/timc/.local/lib/python3.8/site-packages/adafruit_bitmap_font/bdf.py", line 189, in load_glyphs
    current_info["bitmap"][start + x] = bit
TypeError: 'BitmapStub' object does not support item assignment
make: *** [../../supervisor/supervisor.mk:225: build-pyportal/autogen_display_resources.c] Error 1
make: *** Deleting file 'build-pyportal/autogen_display_resources.c'
manic glacierBOT
manic glacierBOT
#

latest commit disables msgpack on the 3 boards that failed. 🤞

❯ make BOARD=qtpy_m0_haxpress

249216 bytes used, 4480 bytes free in flash firmware space out of 253696 bytes (247.75kB).
10908 bytes used, 21860 bytes free in ram for stack and heap out of 32768 bytes (32.0kB).
❯ make BOARD=stackrduino_m0_pro

251304 bytes used, 2392 bytes free in flash firmware space out of 253696 bytes (247.75kB).
10892 bytes used, 21876 bytes free in ram for stack and heap out of 32768 by...
simple pulsar
#

Were there any general or ESP32-S2 specific performance changes from 6.0.0 to 6.1.0-rc0? My benchmarks have sped up on a FeatherS2. I suppose this could also be caused by bugs being fixed in time functions or something else weird?

stuck elbow
#

there was a fix for timekeeping functions

cursive condor
#

so it's not fastest, it's more accurate in benchmarking ?

stuck elbow
#

possibly

simple pulsar
#

@stuck elbow Do you know ticket for that? I see lots of sleep stuff mentioned in release notes but those and a quick search and nothing's jumping out at me

stuck elbow
#

This I think?

#

I may be completely wrong

thorny jay
stuck elbow