#circuitpython-dev

1 messages · Page 391 of 1

tulip sleet
#

you want to git checkout main, and then update the submodules. Or are you working in your own fork of circuitpytnon?

#

did you clone it a very long time ago, or is this a fresh clone?

misty storm
#

It says "On branch main
Your branch is up to date with origin/main"

tulip sleet
#

A fresh clone shuld be at the tip of main.

misty storm
tulip sleet
#

that should be ok, I'm puzzled why 7.0.0 is not mentioned in the version. What version of Linux are you running on? It's slightly possible git is too old.

misty storm
tulip sleet
#

The libraries are confused because the version number is wrong, but I have not seen that before.

#

ok, that's absolutely fine.

misty storm
tulip sleet
#

Try this:

$ git tag | grep ^7
7.0.0
7.0.0-alpha.0
7.0.0-alpha.1
7.0.0-alpha.2
7.0.0-alpha.3
7.0.0-alpha.4
7.0.0-alpha.5
7.0.0-alpha.6
7.0.0-beta.0
7.0.0-rc.0
7.0.0-rc.1
7.0.0-rc.2
7.0.0-rc.3
#

Do you see the same tags?

misty storm
#

No. Just empty response.

tulip sleet
#

why did you use --depth=1 ?

misty storm
#

Google on the previous GNUtls recv error taught me to use depth =1 to circumvent the problem.

#

I"ll retry the clone and let you know the result tmr.

tulip sleet
#

yes, but it also doesn't fetch the tags you need, unfortunately. That's the problem.

#

hopefully they have fixed the certificate problem

#

by now

misty storm
tulip sleet
#

the fetching problem is due to an expired certificate that breaks the fetching of some Espressif submodules. Somebody forgot to renew their certificate. a depth=1 clone is not going to work to build CPy

#

I have to leave now, sorry, there was some discussion up above about alternate ways to get around the expired certificate.

misty storm
jaunty juniper
#

if you're missing the tags would git fetch --tags help ?

tulip sleet
#

sure, could try taht

tulip sleet
tulip sleet
jaunty juniper
#

right, redo a full clone then, or git fetch --unshallow

misty storm
# tulip sleet if the depth is only 1 then the commits for the tags won't be available, I think...

Follow the learning guide to clone and build again. This time the REPL comes back with

Adafruit CircuitPython 7.0.0-dirty on 2021-10-02;

and the circup reports

circup list
Found device at E:, running CircuitPython 7.0.0-dirty.
A newer version of CircuitPython (7.0.0) is available.
All modules found on the device are up to date.

So it is working !
May I ask why it is called 7.0.0-dirty ? I did do a git checkout 7.0.0 after the clone.

analog bridge
#

its dirty because its not built in CI

jaunty juniper
#

dirty in git means there are things that are not committed in the working directory

misty storm
analog bridge
#

CI (Continuous Integration) is the term used for the actions/checks that are run on the github repository

analog bridge
#

Oh... just realized, Neradoc is correct here, -dirty tag only comes when there are uncommitted changes

manic glacierBOT
#

This adds an optional second I2C singleton, referred to as "SECOND_I2C".

  • Define SECOND_I2C_BUS_SCL and SECOND_I2C_BUS_SDA
  • Declare it in pins.c like this for example:
    { MP_ROM_QSTR(MP_QSTR_STEMMA_I2C), MP_ROM_PTR(&board_second_i2c_obj) },

board.STEMMA_I2C is implemented on the QTPY RP2040, the only board that I know of where the STEMMA port does not share the default board.I2C pins.

Other boards that have a STEMMA port don't need the second I2C and can jus...

analog bridge
#

@crimson ferry I was able to come up with the following api for monitor-mode:

import wifi
wifi.radio.monitor = {wifi.Packet.SSID, wifi.Packet.RSSI, wifi.Packet.RAW}
while True:
  print(wifi.radio.monitor_packet)

# Output
{'SSID': '...', 'RSSI': '...', 'RAW': '...'}
crimson ferry
#

@analog bridge the idea is that those get fed in as filters, and one (or more?) (or None) matching packets are returned?

#

(I'd add channel(s) too, and eventually others)

analog bridge
#

no filters, only specific things are parsed and returned and no other compute is done on the rest of the data

crimson ferry
#

ah, I see, to take advantage of the faster parsing in C

#

hadn't thought of that being dynamic

analog bridge
#

I am yet to test the efficiency of this approach vs just returning the RAW data and parsing it in python

crimson ferry
#

did you implement something to return packets from the monitor task (which has its own queueing from the callback)?

#

I'm trying to get a really simplified way of doing that now

analog bridge
#

At the moment I am just returning a couple of pre-stored packets parsed using the algo in idf example

crimson ferry
#

Even parsing in C, and serial output, takes time. I trimmed those down and it keeps up much better (way fewer dropped frames)

#

an aside... esp-idf task priorities are lower for lower numbers?? the example defaults to 2, and even with that it will overrun and often not stop until seconds or even a minute or two after issuing a stop

#

I'm pretty lost with C data structures, especially with the added abstractions of core/micropython stuff, but I'm working with two assumptions...

#
  1. there's no way CircuitPython can keep up with the firehose, so filter parameters will be important (channel, subtype, min rssi, etc)
#
  1. knowing it won't keep up, it would be better to get a smoother random sampling than chunks taken from the stream ...because some events come and go and they are more likely to be missed entirely with a chunky approach
analog bridge
crimson ferry
#

V is always zero

#

but otherwise looks good 🙂

#

FC == V+TYPE+SUBTYPE+FLAGS

analog bridge
#

okay, I'll drop V and FC then

tulip sleet
crimson ferry
#

thanks, Dan, I thought it would be reverse too (and also found nothing definitive), but I increased from 2 to 3 and things got worse, but it wasn't a very controlled test, I'll dig in more

analog bridge
#

@crimson ferry I'll push the shared-bindings side of things upstream so you can give it a test

crimson ferry
#

wait, am I reading that example wrong... if xH < "Our" then // Our priority (obtained using NULL handle) is higher. ..."Our" would be a higher number?

crimson ferry
manic glacierBOT
#

Yes, same problem as @ThinkTransit described. My setup: Adafruit ESP32-S2 Metro, UF2 (0.5.2), cpy (7.0.0).
It's impossible to boot into the UF2-Bootloader from user code. Either by using circuit python:
import microcontroller
microcontroller.on_next_reset(microcontroller.RunMode.NORMAL)
microcontroller.reset()

or directly in Arduino CPP:
esp_reset_reason();
esp_reset_reason_set_hint((esp_reset_reason_t) 0x11F2);
esp_restart();

It acts just as a regular reset (single b...

manic glacierBOT
#

Observed in 7.0.0.

Setting the grid for an OnDiskBitmap TileGrid can cause USB communication to be delayed long enough that a keypress can start repeating. I noticed this while working on the Kitty_Paw_Keypad example. I was converting it to use keypad, and saw repeated keypresses. However, the program was only sending one keypress, and then, noticeably delayed (about half a second), the corresponding key release. The d...

manic glacierBOT
#
Adafruit CircuitPython 7.0.0 on 2021-09-20; Raspberry Pi Pico with rp2040

This is the message that is printed by CircuitPython on a Raspberry Pi Pico but the code posted above appears to be for an Adafruit Feather RP2040. For example, board.D6 doesn't exist on a Raspberry Pi Pico but does exit on an Adafruit Feather RP2040.

On a Adafruit Feather RP2040 I'd expect the following message to be displayed:

Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit F...
manic glacierBOT
#

It fails on both, Easier to get traceback on pico board since it has easy
to access debug pins. Feather 2040 need SMD headers soldered.

Yes the traceback was from a pico with pico circuitpython flashed to it.

On Sat, Oct 2, 2021 at 5:08 PM Brian Cooke @.***> wrote:

Adafruit CircuitPython 7.0.0 on 2021-09-20; Raspberry Pi Pico with rp2040

This is the message that is printed by CircuitPython on a Raspberry Pi
Pico but the code posted above appears to be for an Adafruit Fea...

manic glacierBOT
crimson ferry
#

this reads like a RAM error?? but this is flash xtensa-esp32s2-elf/bin/ld: region 'dram0_0_seg' overflowed by 72 bytes --> n/m, remembered this is what it looks like when I have to turn off more modules for DEBUG

manic glacierBOT
#

There is no board right now where it's called SECOND_I2C, so let's add STEMMA_I2C to the doc instead. I've added some language to the doc to explain that it might not be present.

//| def STEMMA_I2C() -> busio.I2C:
//|     """Returns the `busio.I2C` object for the STEMMA or STEMMA QT connector.
//|     Present only if the STEMMA connector provides a second, additional I2C bus that is not the same as `board.I2C()`.
//|     It is a singleton."""
//|     ...
//|
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
boreal ruin
#

Trying to follow the checksum computation algorithm for Blue fruit packets. For FF0000 I get E1 while circuit python says 9C. Don't understand how. Can anyone point me to the algorithm?

gloomy shuttle
#

Anyone familiar with the u2if RP2040 firmware? (https://github.com/execuc/u2if) I have been trying to get it to work with the MacroPad and have been successful, but I can't get it to compile work for the Feather RP2040. The uf2 listed on the Adafruit page works though (https://learn.adafruit.com/circuitpython-libraries-on-any-computer-with-raspberry-pi-pico/other-rp2040-boards). Also, I am curious why the PID's are different than they are for CircuitPython. https://github.com/execuc/u2if/blob/main/firmware/source/usb_descriptors.c

turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Channel Categories

8

Text Channels

59

Voice Channels

6

Members

31188

Roles

35

cunning crypt
#

228 users away from 10,000 x Pi!

manic glacierBOT
#

Hi there,

I'm receiving an error after importing the CircuitPython 'board' module in a multiprocessing process. I'm on macOS (with a MacBook with an M1 chip, disclosing this because that had caused problems with the board library). Also I'm using the Adafruit FT232H board.

This error does not occur when I'm using the board without the multiprocessing module.

This is the error I'm receiving:

Traceback (most recent call last):
  File "", line 1, in 
  File "/opt/homebrew/Ce...
crimson ferry
manic glacierBOT
#

This builds upon https://github.com/adafruit/circuitpython/pull/5048, to achieve a preliminary-but-functional alarm module for the SAMD port.[^1]

This partially addresses https://github.com/adafruit/circuitpython/issues/4837 via the following features:

alarm.time

  • [x] true deep sleep. ✅ Functional BACKUP sleepmode (lowest power consumption).
    • Feather M4 Express consumes ~0.6mA during deep sleep while powered via BAT=4V
  • [x] fake deep sleep. 🚧 Functional but not comp...
manic glacierBOT
#

CircuitPython version

Setup: Adafruit ESP32-S2 Metro, UF2 0.5.2, CircuitPython 7.0.0, Windows 10

Code/REPL

import microcontroller
microcontroller.on_next_reset(microcontroller.RunMode.UF2)
microcontroller.reset()

Behavior

Acts just as a regular system reset. Device does not enter UF2-Bootloader.

Description

Even by directly calling:

esp_reset_reason();
esp_reset_reason_set_hint((esp_reset_reason_t) 0x11F2);
esp_restart();

Th...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; FeatherS2 with ESP32S2

Code/REPL

>>> from arcti.ntp import NTP
>>> 
^ Works fine ([#help-with-circuitpython message](/guild/327254708534116352/channel/537365702651150357/))

>>> from adafruit_gc_iot_core import MQTT_API, Cloud_Core
<>
Running in safe mode! Not running saved code.

You are in safe mode because:
CircuitPython core code crashed hard. Whoops!
Crash into the HardFault_Handle...
#
# for primary bus:
board.I2C() = board.I2C(0)
# for secondary bus:
board.I2C(1) 
# and so on...

Let me be describe further our naming scheme for the board.SOMEBUS() singletons, and on pin or pin-group names in general. board pin names try to correspond to the silkscreen names on the board. They may also refer to specific-function pins that are not broken out to pads, but are attached to some on-board functionality, like board.LED, `board.ACCELEROMETER_I...

analog bridge
crimson ferry
#

@analog bridge should we open a discussion somewhere... on the issue, or a draft PR, or maybe a thread here, to discuss kind of top-to-bottom design? shared-bindings API influences implementation options, and vice versa. There is some discussion in the issue. You and I have been playing with it (and some others I'm sure), and that experience gives some insights. It's a complex feature, and I'm sure people will want to use it in different ways.

idle owl
#

@gilded cradle Good morning! (Where you are anyway 🙂 ) I have a question about some guide feedback. I don't remember ever using the Adafruit Voice Bonnet, so I'm not sure where I got the info for this guide (if I even wrote this page, the guide says I did, but I don't remember it at all). But the feedback asks why there is not Python code for the microphones. Do you know the answer to that? Should it be added? Or is there a reason it's not there? https://learn.adafruit.com/adafruit-voice-bonnet/python-bonnet-usage

analog bridge
gilded cradle
idle owl
#

If so, I'll delete the feedback and you can deal with it whenever is convenient for you.

gilded cradle
#

Sure, but I'm pretty deep in JavaScript stuff at the moment, so no ETA on that.

idle owl
#

Yeah, no rush at all.

#

@gilded cradle Thanks for the help!

gilded cradle
idle owl
#

@tulip sleet For the Fritzing PR, we're happy with the naming? The file works and is named as they say it is, but you handled the issue so I wanted to make sure it was acceptable.

tulip sleet
#

yes, the naming makes sense, because it now matches the silk. "VBUS" is on the schematic, but "USB" is on the silk

idle owl
#

Ok. Right on, thanks.

onyx hinge
#

Hello <@&356864093652516868> -- Looking forward to seeing y'all for our first meeting in October, about 75 minutes from now! It's a great time to add your notes to the notes document at https://docs.google.com/document/d/1_ZwlimMfNiDPSwWszVzGFMKQzGXSjmb5TzzhQ97kiOY/edit -- remember to note if I need to read your notes. If you're just listening in, no need to do anything but open the voice chat at the appointed time.

solar whale
#

Just lurking for today's meeting -- nothing to report.

idle owl
blissful pollen
#

i can report i just spilt tea all over my desk sigh

solar whale
#

Happy to be here 😀

onyx hinge
idle owl
blissful pollen
idle owl
onyx hinge
#

@blissful pollen now I'm worried, I'm sipping a cup of masala chai right now

modern wing
#

Happily lurking 🙂

solar whale
#

I'll keep an eye on it.

#

I just ordered one -- just in case 😉

turbid radish
#

lurking

lone axle
turbid radish
#

Awww, thanks

idle owl
#

It's all libraries! Exciting!

turbid radish
#

Yay!

old smelt
#

Hmmm....

solar whale
#

should there be Issues tagged Hactoberfest in the core? i don't see any.

jaunty juniper
#

the server doesn't like "/" at the end of URLs

old smelt
#

Got it. Thanks!

solar whale
#

How do you search all libraries for "good first issue" or "hactoberfest" tags?

lone axle
solar whale
#

ah -- thanks -- I missed the pulldown menu!

idle owl
#

Ah, that makes sense. You're welcome!

#

FYI you can get to the Chrome dino game by typing chrome://dino into the Chrome URL bar.

#

I apologise ahead of time for any lost time you may experience trying to beat your own high score.

modern wing
jaunty juniper
#

interestingly the HiiBot IoTs2 comes with the dino game preinstalled on it (using displayio)

idle owl
solar whale
crimson ferry
#

...some modules have code snippets in readthedocs, but it's far from universal

blissful pollen
#

A core example library makes sense. Then just a few words in the CP learn guide template to direct people there

idle owl
#

@lone axle I can create that through Adafruit if you think that makes sense. Or we can do it through the CircuitPython org if that makes more sense.

lone axle
idle owl
blissful pollen
#

Oh I didn't know you could get points this year that way through reviews. I don't want to take first issues to just "get" 4

gloomy shuttle
#

Should a topic be added to adafruit_blinka?

#

I did mean topic so they know it is participating

Add the 'Hacktoberfest' topic to your repository/project so that folks know you're participating in Hacktoberfest.

modern wing
#

Thanks everyone 🙂 Y'all are awesome and keep up the excellent work.

blissful pollen
#

As a newbie from last year after 1/2 easier first issues I was more then willing to jump into harder stuff so tagging repos is a good idea

idle owl
#

CircuitPython_Module_Examples ?

lone axle
turbid radish
#

Thanks all

onyx hinge
#

@turbid radish I'll take a short break before submitting the pull request, but feel free to ping me if it's been more than 1 hour before that is in.

#

👋 have a good week y'all!

idle owl
gloomy shuttle
idle owl
gloomy shuttle
#

I have all the code to make the macropad work for u2if, but when validating it I could get the feather one to compile from the main u2if repo.

crimson ferry
#

Would it be OK (and if so can someone with the right privileges help) to create a thread here to discuss "ESP32-S2 wifi monitor mode design"?

tidal kiln
idle owl
#

Make sure you can invite folks, please.

gloomy shuttle
#

That was what I was leaning toward when I saw it but wasn't sure. Is that assigned internally?

tidal kiln
#

yes

crimson ferry
gloomy shuttle
# tidal kiln yes

So if I wanted to make a PR to add the macropad to u2if what should I do about the PID?

tidal kiln
#

request one as part of the PR

#

can PR with some nominal PID in place

gloomy shuttle
#

and would the PR process be u2if -> adafruit_python_platformdetect -> adafruit_blinka

tidal kiln
#

is there more than one issue here? not sure i'm following what's going on between macropad / feather?

gloomy shuttle
#

yes, I can compile the u2if using my updated code and it works for the macropad, but the compiled one for the feather doesn't. I couldn't get the feather's to work using the latest main either.

#

The u2if on the adafruit page works though.

#

I am just about to test the qtpy u2if from my code, but i think it was working correctly.

tidal kiln
gloomy shuttle
#

I think that is where I tried it from, by i will test that real quick

#

it looks like that one worked.

manic glacierBOT
tidal kiln
#

so the issue is your build for feather using latest head from the u2if repo does not compile?

gloomy shuttle
#

it was compiling and I was getting uf2 but blinka wasn't detecting it

tidal kiln
#

any indication your PC was at least seeing something?

gloomy shuttle
#

I appreciate you answering the other questions. I will attempt to look over the u2if code again and try it over the next couple of days.

#

no the VID/PID wasn't being picked up by the platform detect code

tidal kiln
#

but what about just device manager, etc? did PC make a USB connected noise?

gloomy shuttle
#

I am on a Mac but it wasn't listed under the USB devices

tidal kiln
#

not sure then. could maybe try checking out repo back to same commits when the release targets were made. maybe something with the commits since then has broken something?

#

but then not sure why macropad would compile and show up fine

gloomy shuttle
#

I will do that. Again, thanks for answer those question and trouble shoot the problem

tidal kiln
#

do you have one of the other boards? itsy, qtpy? trinkey?

gloomy shuttle
#

I know I have the qtpy and the feather, but I dont think I have the trinkey. I will go back and try them all.

tidal kiln
#

idea is to see if you get same failure trying to build for one of those

#

also - how do you plan to use the macropad with u2if?

gloomy shuttle
#

I have been playing with pyuvc for manually controlling usb camera settings (e.g. brightness, focus, zoom...). I have accomplished this with both the qtpy + the stemma rotary encoder, but having the twelve buttons and no i2c delay is a big plus

#

there are many other projects I could see being beneficial that having direct input with out having to emulate a usb hid or build a custom serial protocol to communicate with a script running on the computer.

#

I have to head out, but again thank you and will do some more trouble shooting.

tidal kiln
#

interesting use case.

#

np. good luck. ping me again if you want after more testing.

gloomy shuttle
#

Thanks!

tidal kiln
#

@idle owl hey. trying to remember learn repo layout details for bundlefly. for things like fonts/bmp, they go in same folder as code.py?

idle owl
tidal kiln
idle owl
#

If it should be rearranged, then you simply rearrange it and PR the fix.

#

Otherwise, all of Learn was "fixed".

tidal kiln
#

ok. pretty sure it's not right. someone didn't get fonts and i can recreate it also.

idle owl
#

No because code.py isn't in the main directory.

tidal kiln
#

there're two separate example, so each in a subdir

idle owl
#

Oh hmm. Then fonts would have to be duplicated and go in both subdirectories.

tidal kiln
#

but not the fonts dir

#

(i think?)

#

ok. yah. that's what i was thinking also.

#

may not need multiple copies. i think (from quick look) each code.py uses one specific font.

#

so could just move each to where it needs to be

idle owl
#

Ok, yeah, that sounds like a better idea.

tidal kiln
#

but in general, you seeing what i'm seeing? layout needs fixed?

idle owl
#

Yes. Fonts need to be distributed appropriately to fonts directories in the other two subdirs.

tidal kiln
#

ok. easy peasy. i can pr that real quick. but wanted to double check my understanding first. thanks!

idle owl
#

You're welcome. Thanks for looking into it and submitting the fix!

orchid basinBOT
crimson ferry
#

gc.collect() should have no effect on idf memory, right? I assume they're completely separate.

onyx hinge
#

@crimson ferry yeah as I understand it as well

onyx hinge
#

@idle owl It appears that either we have to label each pull request hacktoberfest-accepted or add the hacktoberfest topic to each repo.

#

still experimenting ..

#

it might be that giving an approve review alone does it, I haven't been able to test that.

#

(I don't want/need it to be for my own sake)

manic glacierBOT
#

It seems most likely that the problem arises when an RGBMatrix has been created, but not its associated FramebufferDisplay. We have to do "strange things" across a soft restart when these displayio-related objects exist. I recommend exploring this possibility, especially if that is the ONLY line where placing the exception-causing code leads to the problem.

The problem would not occur in quite the same way in the repl, because the soft reset would not occur until exiting the repl.

crimson ferry
#

Where would be a good place to look to see how to implement clean-up that needs to happen for control-C and saving to CIRCUITPY?

idle wharf
onyx hinge
#

@idle wharf did I spell it right?

#

.. on the second try

idle wharf
#

Looks right to me! Thank you !

onyx hinge
#

I also added the topic to the repo, so it shouldn't be necessary for any further PRs that come in

manic glacierBOT
#

I fixed the DAC clock speed comment typos. In addition to SAMD21 and SAMD51 being reversed, the datasheet reference for the SAMD21 table was incorrect.

I verified the clock speeds and datasheet references with the current datasheets:
SAMD21: https://cdn-shop.adafruit.com/product-files/2772/atmel-42181-sam-d21_datasheet.pdf
SAMD51: https://www.microchip.com/content/dam/mchp/documents/MCU32/ProductDocuments/DataSheets/SAM_D5x_E5x_Family_Data_Sheet_DS60001507G.pdf

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
onyx hinge
#

Here is the notes document for Monday’s CircuitPython Weekly meeting. It is ONE DAY LATER than usual, Tuesday at 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/1gFsjyqQCprD-4CVVsiNf6XFNNv7XcZ7RQcV6IHRssI8/edit?usp=sharing

idle owl
# onyx hinge <@!330227457296957440> It appears that _either_ we have to label each pull reque...

Ok. @lone axle Can you look into what would be needed to add a topic to every library repo? You've already dug into the API some, so I thought maybe you could do this as well. It might need to be an Adabot script, but I don't think topics are currently handled by Adabot either, so I'm not certain how we'd do that with her. Point is, Adabot has permissions, but I believe you might as well.

idle owl
#

Anyone around up for being a second set of eyes on a thing? I'm making this fritzing object and it has a lot of components, and I want to make sure none are missing. Basically, I send you a screenshot of this thing, and you look it over to make sure there are no empty pads. Doesn't take knowing the board, simply takes looking at it.

onyx hinge
idle owl
#

I found help!

onyx hinge
lone axle
#

Thank you. testing a python API wrapper library now. I do notice that it seems replace all topics is currently the only option with the API. I'm not sure if we have existing topics or not. But if so we'll need to GET them, add the new one then save them back.

idle owl
#

Any way to check if there are already topics?

#

I don't think there's anything consistent that we've done, but some might have them.

lone axle
#

Yep, there is an API for getting topics as well

#

I'll make a script get the current ones and add Hacktoberfest to them then replace. So any currently existing ones should get kept. Any without current ones will end up with the one new one Hacktoberfest

idle owl
#

Beautiful. Thank you so much!

onyx hinge
#

that was weird, on my esp32 board (kaluga) circuitpython was crashing over and over again, reset button fixed nothing, but power cycling DID fix it. wonder what persists across the use of the reset button.

idle owl
#

I've run into that too. I don't know the answer.

onyx hinge
#
Build:Oct 25 2019
rst:0x8 (TG1WDT_SYS_RST),boot:0x9 (SPI_FAST_FLASH_BOOT)
Saved PC:0x4000f4d6
ESP-ROESP-ROM:eESP-ROESESPESP-ROM:esEESP-ROM:esESP-ESPESP-ROM:eESP-ESP-ESP-ROESP-EESP-ESP-ROM:eESP-ROM:esp32s2-rESPESP-RESESP-ROM:esp32s2-rESP-ROM:eESP-ROM:esESP-ESPESP-ESP-ROMESP-ROESP-ESP-ROESPESP-ROESP-ROMEESP-ROESP-ROM:esp3ESP-ESP-ROM:esESP-RESESP-ROESP-RESP-ROMESESP-RESP-RESP-ROMESP-ROM:esp32s2-ESP-ROM:esp3ESP-ROM:esp32ESP-ROMESPESP-ROESP-ROM:espESP-ROM:eESP-ROM:esp32sESP-ROM:esESESP-ESP-ESESPESP-RESP-ROM:esESP-ROMEESPESP-ESP-ROM:esp32s2ESP-ROESP-ESESPESP-ROM:espESP-ROM:esp3ESP-ROM:eESESP-ROM:esESP-EESESPESPESP-RESP-``` weird stuff in the serial monitor too
#

I reproduced it by flashing a project from esp-dev-tools and then flashing circuitpython

#

though .. this time, a power-cycle isn't fixing it either.

lone axle
#

@idle owl I have a script working as proof of concept to add hacktoberfest topic to a repo but it seems I do not have access to do that on the real library repos. I get back a 404 response when I try on https://github.com/adafruit/Adafruit_CircuitPython_Display_Text but the same code succeeds as is on one of my own repos.

idle owl
#

Hmm.

#

I guess write access isn't enough?

lone axle
#

seems like not. I'm not sure what the level required is. Worth noting I don't see the gear icon near "About" on the repo pages, which is where the manual UI way to add topics is at.

idle owl
#

Ah.

#

Ok....

lone axle
#

I could prepare the scripts and they could be run with adabot or someone else's access token I presume.

idle owl
#

So I guess you'll be walking me through it? 😅

#

Ok

#

Oh it needs a token!

#

That makes more sense. Not login credentials.

lone axle
#

So far it's doing just a single repo, I'll expand it a bit to work with "foreach" in the bundle.

idle owl
#

Well let's make sure it works.

#

So go to .. I don't remember where tokens are generated.

#

Found it.

#

@lone axle Ok so if I generate a personal access token here, I can provide that to you and you can still run the scripts yourself?

idle owl
#

Trying to figure out what boxes to check here for this token

#

Thoughts?

#

box or box(es) I guess.

lone axle
#

I did just the top level "Repo" one and it allowed me to fetch and add topics to my own repo.

idle owl
#

Ok

#

DM'd you the token.

#

Ok @lone axle if it worked on one, I'm ok with deploying it.

#

Verified the one you linked.

lone axle
#

okay cool. I'll work on expanding that script to run in the bundle with foreach. I'll let you know here when I am ready to run it on the rest of them.

idle owl
#

Thanks!

versed lark
#

if I have a library module for MicroPython and want to make it into a CP library, how do I do that? i'd assume forking CP, adding the lib, and seeing if it builds. Anything else I'd want to watch for?

onyx hinge
#

@versed lark if it's coded in C then you'd need to work in a fork of circuitpython or micropython, starting at our main branch. If you work with both micropython and circuitpython then when creating your branches locally, and when creating your pull requests on github, you need to be attentive so that you start from an appropriate starting point and create the pull request in the right place. github doesn't let you have a fork of both micropython and circuitpython that are separate, because they are forks of each other already.

versed lark
#

right.

onyx hinge
versed lark
#

it's got existing c code

#

so i'll be forking cp

onyx hinge
#

yup, sounds like that's what you need to do

versed lark
#

if it's a working third party library that already exists in a MP fork, what then?

#

i.e., i could start with the MP fork i already have it in, or do a new cp fork

onyx hinge
#

from time to time we merge micropython into circuitpython. we last did this with the previous release, we're one behind.

versed lark
#

background: lvgl has an existing MP binding, a library module called lv_binding_micropython. in their example, it's a submodule of a MP fork.

#

i'd like to be able to use it in CP, with a driver that passes things through to displayio

onyx hinge
#

we organize the C code for our modules differently than micropython, though, most things are split into a directory of the bindings to CircuitPython and a directory of "the actual code" (shared-bindings and shared-modules [if it's hardware-independent] or common-hal [if it's hardware-dependent])

lone axle
#

@idle owl I think it's ready to run on the bundle. I'm going to start it up shortly. I've added 5 second delay on each library to hopefully avoid running into a rate limit. It'll take a few minutes to complete at that rate if it doesn't get interrupted.

versed lark
#

someone did a CP version back in the 6.0rc timeframe, considering starting with that as well.

onyx hinge
#

on the other hand, we do take some things in the micropython style of the "extmod" directories, like ulab

idle owl
onyx hinge
#

we also have a style of documenting the code inline

versed lark
#

i've seen that

onyx hinge
#

Do you know what thing(s) stopped the previous 'port' from going into the core? if you can learn that history you might know what things are important to do / to avoid. I don't remember this history.

versed lark
#

i don't think it was ever pursued to the end.

#

there's one forum post on the lvgl forums, and a repository that hasn't been touched in almost a year.

#

that's all i know so far.

onyx hinge
#

I see.

versed lark
#

i just really want to use lvgl under CP 🙂 so I figure I have to poke at it myself.

onyx hinge
#

I'm not sure what would make a lvgl 'binding' something we'd merge into circuitpython, since we also have displayio. I'd recommend pinging @slender iron in public sometime when he's around, or joining us for one of our regular voice meetings, before getting to deep in it.

#

lvgl is one of those things I've never tried out for myself, it seems interesting though

#

.. afk ..

versed lark
#

the main thing for me is graphing support.

#

and things like buttons with click handlers

#

not things that couldn't be done with raw displayio

#

but just the whole reinventing the wheel thing

lone axle
#

@idle owl so far the only repos that have had any are a few that had a "circuitpython" topic. Since the API call that updates is technically a replace all, we have the opportunity to add whatever topics we want whenever we go to remove hacktoberfest at the end of the month. If there is any interest in adding "circuitpython" or anything else to all of them it would be easy to do that at the same time.

idle owl
#

I think let's do circuitpython for now. I can't think of anything else that makes sense for all of them at the moment.

lone axle
#

@idle owl script is finished "hacktoberfest" should now be a topic on all library repos. I uploaded the output as a file here: https://github.com/FoamyGuy/CircuitPython_Repo_Topics/blob/main/output_0.txt it shows the existing topics for each repo as well. There were a few with others beyond "circuitpython" most of the ones I saw were display drivers that had a few related topics. I haven't looked at the whole list yet. Later this week i'll prepare a new version that we can run at the end of the month.

idle owl
#

Lovely, thank you so much!

lone axle
#

you're welcome! I feel like I've gotten a good handle on how to automate scripts to run across all library repos. I've not messed with Adabot specifically too much but maybe it would make sense to add some documentation and a few useful helpers to that repo that detail the process I've been using.

idle owl
analog bridge
#

This just occurred to me... in CI can we have things like pre-commit and Test all which show a diff after test fails, upload a patch file to artifacts to allow easier code correction.

slender iron
#

@versed lark I know lots of folks like lvgl. I'm not sure how it would interoperate with displayio though.

versed lark
#

the stuff i've seen supposedly has a lvgl driver that just passes things through as displayio calls.

#

i've not found or seen that code yet though

slender iron
#

👍

versed lark
#

i'm going to continue digging for now. fighting git at the moment. 😉

versed lark
#

@slender iron looks like it's a little too invasive for my taste. in particular, adding a call to to supervisor_background_tasks() to give lvgl it's update tick. not something that can be enabled if the lvgl binding isn't there. so probably not workable as an installable library. 😦

slender iron
manic glacierBOT
idle owl
#

@gilded cradle This page desperately needs to be updated. The image should be the Driver board, and there's product copy for the driver board now. https://circuitpython.org/board/adafruit_led_glasses_nrf52840/ As it is, it's confusing, especially since the guide I'm writing is for both the LED Glasses Panel and the Driver board. 🙂

manic glacierBOT
gilded cradle
#

@idle owl, good catch.

idle owl
gilded cradle
idle owl
#

Ah that's good then.

manic glacierBOT
manic glacierBOT
idle owl
#

@gilded cradle Looks great! Verified the page. Thanks for the update!

#

@gilded cradle I can't test that libgpiod PR, but I'm happy to approve it if you feel it's good to go. Not sure if you needed someone to test it.

gilded cradle
idle owl
gilded cradle
#

Thanks

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
analog bridge
#

woohoo...! we have 3000 closed PRs in CPY Core 🥳 blinka

manic glacierBOT
#

CircuitPython version

master branch

Code/REPL

none

Behavior

none

Description

The latest version pyocd remove pyocd-tool and pyocd-flashtool, after create firmware, I can't flash it on to mcu board using param FLASHER=pyocd.

Additional information

I manage to migrate to latest pyocd's syntax , but I can't translate this sentence

pyocd-tool -t $(MCU_VARIANT) write32 $(BOOT_SETTING_ADDR) 0x00000001

I have done similar migration ...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Thanks for the PR @spencer-burke.

I don't think this resolves issue #4520. The stack size is set on the next VM run so with the function call there isn't a way to confirm whether the requested stack_limit is used or the default_limit is used.

I think changing the function name to something more appropriate like set_next_stack_limit_maybe should be enough here. This will result in a breaking change and the PR will have to be considered for 8.0.0 rather than merging it now

manic glacierBOT
manic glacierBOT
#

Is it possible to point board.STEMMA_I2C() to board.I2C(1)? This way we can have board.BUS(instance) at the board module level and board specific names matching silk screen or documentation can be set in the board's config file.

That is certainly be possible. I assume you have some specific use case in mind, probably for your own boards. Could you describe how you want to describe number multiple buses?

onyx hinge
manic glacierBOT
solar whale
onyx hinge
#

@solar whale yay! I've got the basics working over here but it's not ready for prime time

solar whale
#

Absolutely no rush 😉

lime trellis
#

can someone remind me the make argument for low (no) gcc optimization? I can't seem to find it

lime trellis
tulip sleet
idle owl
#

@onyx hinge I have a question about subclassing, or inheritance or whatever it's called.

onyx hinge
#

go ahead

idle owl
#

Or because everything in segments is already pulling from another file, not so much?

onyx hinge
#
 # following functions are lifted from the Seg14x4 class with no change
#

this part?

idle owl
#

Um

#

Yes

onyx hinge
#

I think you'd have to create a base class with those things, then have Seg14x4 and Multiple14x4 inherit from that base class

#

so yes, the thing you said

idle owl
#

But creating a base class is a breaking change for everything else, right?

onyx hinge
#

I'd also request that this comment be changed, the code works or does not; there is no 'try' """Class to try and drive multiples of Alpha-numeric, 14-segment displays."""

idle owl
#

Good call.

onyx hinge
#

nah I don't think it should be a breaking change

idle owl
#

Ok fair enough.

onyx hinge
#

sorry for the star wars reference

idle owl
#

It's ok. I'll give you that one.

#

@onyx hinge Are you going to do a full review? With the suggestion of a base class? Because I was going to try, but it would have been pretty bad. I would have fumbled through it.

onyx hinge
#

I wasn't really planning to 😕 but I can if you need me to

idle owl
#

You can blame me for it so I'm tagged on it as well.

#

@tulip sleet Question. I'm doing the guide for the LED glasses driver board, and I'm trying to figure out what Arduino stuff applies. Do you have some idea of which of these examples make sense for that board? The only pins broken out are SWD and a STEMMA QT connector. So it's kinda specialised. (I'm making assumptions about what you might know because of your BLE work in CP... I realise you may not have an answer for me.)

tulip sleet
idle owl
#

Ok great. Thank you.

tulip sleet
#

The nRF52 lets you pretty much doing anything with any pin, so no need to worry about "this pin is only I2C"< ec.

idle owl
#

Ahh ok

#

Fair enough!

#

Thanks!

#

Frozen libraries are in mpconfigboard.mk right?

tulip sleet
idle owl
#

I was making sure nothing was frozen into this driver board. There is not.

#

Thanks

crimson ferry
#

Where's the best place to suggest a variant of a product? (Metro ESP32-S2 with no headers, so it could have user-installed stacking headers or terminal blocks or other, and not obscure the antenna with a shield)

onyx hinge
#

@crimson ferry https://www.adafruit.com/contact_us has "suggest an item for us to stock", not quite what you're suggesting but close

gloomy shuttle
#

@opaque musk I submitted the PR's needed to add the MacroPad to work with u2if and Adafruit_Blinka. There are a couple of downsides right now. First, the display isn't currently supported in adafruit_blinka_displayio (https://github.com/adafruit/Adafruit_Blinka_Displayio/issues/54) and Adafruit_Blinka doesn't support rotaryio.

tidal kiln
#

that's ok. that's all mostly external to blinka/platform/u2if. expect for maybe rotaryio. but in general, doesn't need to be a concern for adding the new support. those could be follow up efforts.

#

the firmware will simply provide i2c access. it won't do anything oled specific.

idle owl
#

@onyx hinge or @tulip sleet What's the VIM binding to get to the end of a line?

#

I guess I could have looked that up. I was already typing into Discord.

#

Wait, it's $? Really?

stuck elbow
#

yes

#

you can also use the END key, of course

idle owl
stuck elbow
#

all the usual keys work

idle owl
#

🤦🏻‍♀️ oi.

#

I genuinely did not know that.

#

I know 0 to get to the beginning of the line, and dd to delete the whole line. And i to get back to editing mode.

#

That's pretty much it.

stuck elbow
#

it's a good start

#

I also know "gg" to get to the beginning of the file and "G" to get to the end

#

and :linenumber to get to the specific line

idle owl
#

I used to know how to get to the beginning of a file, highlight all, copy, and paste. That was how I used VIM..... I copied things out of it, did something in a different editor, and then pasted it back in. 😄

#

But I have since forgotten that set of commands.

crimson ferry
#

same, except vi

stuck elbow
#

oh, do you know about v and V?

idle owl
#

gg vg something something

#

I do not

stuck elbow
#

V is for selecting lines, v is for selecting characters

idle owl
#

My bash has VIM bindings. So file manipulation isn't needed for my major use case at the moment.

#

It's moving around command lines.

stuck elbow
#

then you can either cut them with d (delete), or copy with y (yank)

idle owl
#

Huh. Nice.

stuck elbow
#

and p is paste, of course

#

P is paste before the cursor

#

so, ggVGy is "copy whole file"

idle owl
#

That! yes

stuck elbow
#

but you could also do ggyG to do the same thing without selecting everything first

#

because y and d take a movement command to select the other end

#

I often do "dw" to delete a word or "cw" to delete it and enter insert mode to replace it

gloomy shuttle
#

Carter any idea why the CI is failing on the PlatformDetect. I didn't change any of the lines of code that are failing PyLint. It passes 10/10 when I run pylint locally.

#

I had an older version of pylint

tidal kiln
#

@gloomy shuttle wrong ping just fyi

#

looking at ci now...

#

or...running latest push and will see what happens

gloomy shuttle
#

whoops

tidal kiln
#

hmmm. guessing new "fun" because new pylint version.

#

really? open doesn't have a default encoding?

gloomy shuttle
#

pylint complained about it

tidal kiln
#

yah. but why? why now?

idle owl
#

Is Pylint not pinned on Blinka?

gloomy shuttle
#

Using open without explicitly specifying an encoding It is better to specify an encoding when opening documents. Using the system default implicitly can create problems on other operating systems. See https://www.python.org/dev/peps/pep-0597/

#

It must not be

idle owl
#

Hmm. That's something to consider. We have it pinned on all the libs and such.

#

I kind of hate pinning it, but ... eh.

tidal kiln
#

oh. it can vary between platforms i guess.

gloomy shuttle
#

this is on Adafruit_Python_PlatformDetect not Blinka

idle owl
#

Oh.

#

Fair enough.

idle owl
#

Chances are Pylint added something then, if it's not pinned. And that's why it would start failing now.

#

Not pinned.

#

Would have to be --force-reinstall pylint==2.7.1 or whatever.

#

So it's definitely running latest on that repo.

tidal kiln
#

yah, so probably like that new consider-using-super-happy-new-fun-other-new-different-print gripe we ran into.

idle owl
#

Yes.

#

Though it's pinned on all the libs, so I'm still confused how it snuck through.

gloomy shuttle
#

Do you want me to revert and pin pylint in the build.yml to match Blinka?

idle owl
#

I would bring Melissa in on it, but it's definitely a valid option.

tidal kiln
#

yah. that's what i'd suggest also.

idle owl
#

@gilded cradle Are you ok with us pinning Pylint on PlatformDetect?

#

Same as Blinka, and the libs.

idle owl
#

Is that what you're asking about reverting?

gloomy shuttle
#

I did fix the issue that pylint was complaining about.

idle owl
#

Oh, excellent. Ok. I would not recommend reverting. But we can still consider pinning.

tidal kiln
#

but it was code unrelated to PR

idle owl
#

Unless you simply disabled it in which case, it might complain if we pin it.

gloomy shuttle
#

no, I corrected it but it was unrelated to the PR

tidal kiln
#

it's just the first PR that's grabbing latest pylint

#

so i think pin and revert

idle owl
#

I don't mind that it's unrelated. It will future proof the code for when we update Pylint again.

#

Or pin and revert. I am ok with either.

#

But let's get Melissa's final opinion on it before doing it.

#

@gloomy shuttle @tidal kiln Is that alright?

tidal kiln
#

yep

idle owl
#

Great.

idle owl
#

There we have it!

gilded cradle
#

Ultimately I'd like to get it on pre-commit, but haven't had time to update it to that.

idle owl
#

@gloomy shuttle Up to you whether you want to revert or not. I'm ok either way.

gloomy shuttle
#

Yes, it is possible that the change could break it depending on system because:

open() instead uses your environment to choose an appropriate encoding:

idle owl
#

Ok.

#

Then let's revert for now.

gloomy shuttle
#

I'll revert for now thanks!

idle owl
#

Thank you for sticking with this!

tidal kiln
#

is the pinning just the one line change in the yaml?

idle owl
#

Yes. Adding that ==2.7.1 to pylint on the install line.

tidal kiln
#

so could either PR that real quick, or have jfurcean sneak it in as part of their PR.

idle owl
#

Have jfurcean do it, that way the PR will pass.

#

I think anyway.

tidal kiln
#

yep. think so.

idle owl
#

I'm sure they're up for it, with everything else they've already done with this PR 😄

tidal kiln
#

@gloomy shuttle got it? revert changes to open. update yaml to pin pylint. push those changes.

gloomy shuttle
idle owl
#

Sure, no worries. @tidal kiln Handle the pinning PR first, obviously.

gloomy shuttle
#

@tidal kiln sorry about that and thanks! I am about to head out, but I will get that other PR reverted later and wait on dan for the PID.

manic glacierBOT
#

Yes, this does seem to be a duplicate of at least part of that earlier issue (though that one seems to be muddled with people reporting unrelated problems.

FWIW, the encoder I'm trying to use is supposedly an exact replacement of the one used in Panasonic car stereo volume knobs, so its definitely being purposed as a regular rotary encoder.

Looking deeper I see that rotaryio is implemented per-architecture which seems to make this a major undertaking.

manic glacierBOT
slender iron
manic glacierBOT
#

circuit_python_feathers2_crashing.zip

Here's the zip that contains a single folder lib. In that folder, I've been able to reliably reproduce the crash by changing the name of the adafruit_binascii lib to adafruits_binascii (something that ensures it's not importable). Once I do that, I can from the REPL run from adafruit_gc_iot_core import MQTT_API, Cloud_Core and it will crash. Once it...

tidal kiln
#

@slender iron responded. i got it from here. doubt it's anything cp related.

slender iron
#

thanks!

tidal kiln
#

np

manic glacierBOT
slender iron
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I think that the 2 (n_args_min) means that 2 positional (non-keyword) arguments are required, according to mp_arg_check_num_sig. Since all the arguments besides self can be given as kwargs, it should be 1 instead.

That makes sense. I think various of us misinterpreted n_args and n_args_min to mean all the args, not just the positional args. The names would be better as n_pos_args_min, but the other naming is pervasive. I'll vet these values everywhere.

orchid basinBOT
manic glacierBOT
#
  • Fix #5407.
  • Correct some signatures in busio and bitbangio.
  • Allow more args to be specified with keywords in socketpool and `storage.

#5407 and #5405 discovered that some routines and methods were requiring positional-only args for some required arguments. I think this was mainly a misunderstanding of what n_args_min in MP_DEFINE_CONST_FUN_OBJ_KW(obj_name, n_args_min, fun_name) meant. Thanks to @jepler for pointing this out. n_args_min here means the minimum of _positio...

manic glacierBOT
#

mypy doesn't like it, so I will fix:

$ mypy circuitpython-stubs/busio/__init__.pyi 
circuitpython-stubs/busio/__init__.pyi:260: error: Name 'buffer' is not defined
circuitpython-stubs/busio/__init__.pyi:274: error: Name 'buffer' is not defined
circuitpython-stubs/busio/__init__.pyi:292: error: Name 'buffer_out' is not defined
circuitpython-stubs/busio/__init__.pyi:294: error: Name 'buffer_in' is not defined
tulip sleet
#

@onyx hinge I changed to sys.maxsize. mypy complains on the stubs still:

$ mypy circuitpython-stubs/*/__init__.pyi
circuitpython-stubs/busio/__init__.pyi:104: error: Name 'sys' is not defined
circuitpython-stubs/busio/__init__.pyi:125: error: Name 'sys' is not defined
circuitpython-stubs/busio/__init__.pyi:149: error: Name 'sys' is not defined
circuitpython-stubs/busio/__init__.pyi:151: error: Name 'sys' is not defined
circuitpython-stubs/busio/__init__.pyi:260: error: Name 'sys' is not defined
...
#

but I'm not sure that's significant

onyx hinge
#

might have to write import sys in the doc-comment?

#

or change tools/extract_pyi.py to automatically print it in, like it does for things from typing

tulip sleet
#

there is this in circuitpython-stubs/setup.py: STD_PACKAGES = set(('array', 'math', 'os', 'random', 'struct', 'sys', 'ssl', 'time'))

#

not sure what that is for

onyx hinge
#

that avoids installing our stubs for those modules that are standard in Python

#

there's magic in extract_pyi to figure out what needs to be imported for the annotations, but not for the default values

tulip sleet
#

yes, I was looking at it, and I don't think it will see the sys, so maybe I always have to add it

onyx hinge
#

you can write import sys just above the def that refers to sys.maxsize, that'd be the shortest thing

tulip sleet
#

then it would go into the docs :/

#

it guess that's not terrible

onyx hinge
#

I don't think the import sys line would appear in the docs, but I could be wrong

tulip sleet
#
        elif isinstance(node, ast.Assign):
            collect_annotations(node.value)
#

I'd think this would pick up the right side of the assignment?

#

but it doesn't apparently

#

maybe it's an AnnAssign

#
>>> print(ast.dump(ast.parse("def foo(a: int = sys.maxsize): pass"))
... )
Module(body=[FunctionDef(name='foo', args=arguments(posonlyargs=[], args=[arg(arg='a', annotation=Name(id='int', ctx=Load()), type_comment=None)], vararg=None, kwonlyargs=[], kw_defaults=[], kwarg=None, defaults=[Attribute(value=Name(id='sys', ctx=Load()), attr='maxsize', ctx=Load())]), body=[Pass()], decorator_list=[], returns=None, type_comment=None)], type_ignores=[])
#

your solution is easiest; otherwise we'd have to interpret the default value expression

manic glacierBOT
blissful pollen
#

I see a bunch of this typing PRs coming in, is there a good editor to test them on? I just use Mu normally. I can check visually otherwise

lone axle
blissful pollen
#

Thanks @lone axle . I have VSCode so I'll take a look just to see too or PyCharm

lone axle
#

in pycharm hovering on a usage of something will pop up something like this.

#

ctrl + hover shows a more concise version as well.

blissful pollen
#

I will try that out. Figure you manage to get all those issues filed you shouldn't have to review all the PRs too!

manic glacierBOT
#

You missed an if None here.

I'm not thrilled about the phrasing. I know exactly what buffer[start:end] does, including if end == sys.maxsize but I do like that the docs are working to explain what happens without assuming advanced knowledge of how slicing works.

Maybe:

The default value causes the buffer to be used all the way to its end

which then suggests the doc could also say about start:

The default value causes the buffer to be used from its start

You could ...

tulip sleet
#

@onyx hinge there are a lot of place where that start/end stuff is documented. Befor I push another commit, how do you feel about this rewrite? This is for the most complicated case:

//|         """Write the bytes from ``out_buffer`` to the device, then immediately
//|         reads into ``in_buffer`` from the device.
//|
//|         If ``out_start`` or ``out_end`` is provided, then the buffer will be sliced
//|         as if ``out_buffer[out_start:out_end]`` were passed, but without copying the data.
//|         The number of bytes written will be the length of ``out_buffer[start:end]``
//|
//|         If ``in_start`` or ``in_end`` is provided, then the input buffer will be sliced
//|         as if ``in_buffer[in_start:in_end]`` were passed,
//|         The number of bytes read will be the length of ``out_buffer[in_start:in_end]``
//|
//|         :param bytearray out_buffer: buffer containing the bytes to write
//|         :param bytearray in_buffer: buffer containing the bytes to read into
//|         :param int out_start: beginning of ``out_buffer` slice
//|         :param int out_end: end of ``out_buffer`` slice; if not specified, use ``len(out_buffer)``
//|         :param int in_start: beginning of ``in_buffer`` slice
//|         :param int in_end: end of ``in_buffer slice``; if not specified, use ``len(in_buffer)`````
#

in the simpler read/write case it's one or the other, and I don't bother to backtick the buffer name

onyx hinge
#

//| The number of bytes written will be the length of out_buffer[start:end]
This one should be [out_start:out_end]

tulip sleet
#

to make it easier to read

onyx hinge
#

starting with a nit..

tulip sleet
#

yes, I've fixed them all several times already 🙂

#

I don't feel I need to explain slicing omitting the end; that's a python thing

#

it is in busio I2C and SPI, bitbangio I2C and SPI and I2Device

#

the memory allocation comment is superfluous when writing to the buffer, so I took that out in those cases

#

also the mentions of bytearrays should be ReadableBuffer or WriteableBUffer

onyx hinge
#

I think it's fine, I didn't spot any more real technical problems. I wouldn't state it all in exactly that way, but then such is the nature of doc & code

#

yes that would be nice to fix while you're there

tulip sleet
#

you write with a ReadableBuffer, and readinto a WriteableBuffer (Some of them were backwards)

onyx hinge
#

//| :param bytearray out_buffer: buffer containing the bytes to write you changed it down here too?

tulip sleet
#

now

//|         :param ReadableBuffer out_buffer: buffer containing the bytes to write
//|         :param WriteableBuffer in_buffer: buffer containing the bytes to read into
onyx hinge
#

👍

tulip sleet
#

I2C uses in_buffer and out_buffer; SPI uses buffer_in and buffer_out 🤦

jaunty juniper
#

is it like US english versus UK english ? 😉

onyx hinge
#

oops

tulip sleet
#

not gonna change the arg names now

onyx hinge
#

I don't suppose those were unusable names before this change

#

because of the wrong argument number

tulip sleet
#

maybe so, I'll check, what an excuse

#

@onyx hinge, well, for I2C, in_buffer and out_buffer were unusable (3 pos args specified). for SPI, only 2 pos args were specified, so buffer_out had no keyword, but buffer_in did

onyx hinge
#
jepler@bert:~/src/circuitpython$ git grep MP_QSTR_in_buffer
shared-bindings/adafruit_bus_device/I2CDevice.c:        { MP_QSTR_in_buffer,     MP_ARG_REQUIRED | MP_ARG_OBJ },
shared-bindings/bitbangio/I2C.c:        { MP_QSTR_in_buffer,  MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} },
shared-bindings/busio/I2C.c:        { MP_QSTR_in_buffer,  MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} },
jepler@bert:~/src/circuitpython$ git grep MP_QSTR_buffer_in
ports/raspberrypi/bindings/rp2pio/StateMachine.c:        { MP_QSTR_buffer_in,     MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} },
shared-bindings/bitbangio/SPI.c:        { MP_QSTR_buffer_in,     MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} },
shared-bindings/busio/SPI.c:        { MP_QSTR_buffer_in,     MP_ARG_REQUIRED | MP_ARG_OBJ, {.u_obj = MP_OBJ_NULL} },
``` half-half
tulip sleet
#

There are no examples in the bundle of people specifying either choice as a keyword arg

#

I like in_buffer better than buffer_in

onyx hinge
#

if you want to wink at the compatibility rules and change it, it's fine by me

#

you'll get back 15 bytes or something from reduced qstrs

tulip sleet
#

I think no one ever used thes

#

because the 2 pos args of SPI would have been extremely confusing

#

I think I will make them all in_buffer and out_buffer

#

i've found a bunch of other typos as well

onyx hinge
#

@tulip sleet thanks! I'd better wait until tomorrow to review it, my attention to detail is not great. ping me if I let it go long. I'll also wait for scott's reaction to the inconsequential incompatible change.

tulip sleet
#

I am writing up a comment for Scott

#

This is like the most nit-picking copy-editing I have ever had to do with the doc.

manic glacierBOT
#

@tannewt Correcting the doc revealed that I2C was using in_buffer and out_buffer for the write_readinto(), and SPI was using buffer_in and buffer_out. However, because of the original bugs this PR fixes, the I2C keywords were not usable at all, and for SPI, only the second buffer arg could be specified with a keyword.

I found no uses of any of these keyword args in the bundle. @jepler and I discussed it briefly, and I made the SPI ones match the I2C ones: in_buffer and `out_buf...

onyx hinge
#

As some wiki I once used said after every edit, your attention to detail is appreciated.

tulip sleet
#

I think it is now time to practice a plucked string instrument

manic glacierBOT
#

Can someone please help, I have latest CircuitPython 7.0 (downloaded 8-Oct-2021) and MU 1.1.0beta5
I want to make a simple analog data logger on Matrix Portal M4 using a while loop and analogio.AnalogIn
I get the ValueError A1 in use
Here's the code with no while loop but A1 value request twice, the second time causes the issue.
I through in some prints and a sleep in case there needed to be time to reset the pins.. please help

import analogio
import board
import time
from board imp...

#

Can someone please help, I have latest CircuitPython 7.0 (downloaded 8-Oct-2021) and MU 1.1.0beta5
I want to make a simple analog data logger on Matrix Portal M4 using a while loop and analogio.AnalogIn
I get the ValueError A1 in use
Here's the code with no while loop but A1 value request twice, the second time causes the issue.
I through in some prints and a sleep in case there needed to be time to reset the pins.. please help

import analogio
import board
import time
from board imp...

manic glacierBOT
#

You do not need to do adc1 = analogio.AnalogIn(A1) each time you want to read A1. Instead, just create adc1 once, and then use adc1.value each time you want to read the value.

Here is a loop that will read from A1 and A2 in succession, over and over.

adc1 = analogio.AnalogIn(A1)
adc2 = analogio.AnalogIn(A2)

while True:
    print("Hello 1")
    val = adc1.value
    print(val)
    print("Hello 2")
    val = adc2.value
    print(val)
    time.sleep(1)

More...

manic glacierBOT
manic glacierBOT
#

This PR is for a new variant of the Seeed XIAO targeted for users wanting to build keyboards.

Before merging this commit, I would appreciate comments on the modules added and removed. I would like this to be generic enough so that many people can use this variant without the need to revert to the original one or having to create new ones.

Selection of the modules is governed by the following criteria:

  1. Selected modules must fit on samd21 flash space
  2. keyboards have "local" i...
manic glacierBOT
#

I cannot reproduce this problem, using the code above in the REPL. The blue LED stays on when I create the PWMOut, and continues to stay on even when I vary the .duty_cycle.

Do you have something connected to the A0 pin, like a buzzer or a speaker? If it's drawing too much current, it can affect the state of other pins. Are there other cthigns connected to the board?

manic glacierBOT
#

it's weird that https://github.com/adafruit/circuitpython/pull/5442/checks?check_run_id=3839103958 ran for all boards, even though just files for a single (new) board were modified.

The list of modified files detected by that action seems right,

   Invoking listFiles(pull_number: 5442, page: 1, per_page: 100)
  Received 4 items
  [added] ports/atmel-samd/boards/seeeduino_xiao_kb/board.c
  [added] ports/atmel-samd/boards/seeeduino_xiao_kb/mpconfigboard.h
  [added] ports/atmel-sa...
manic glacierBOT
manic glacierBOT
#

I could reproduce it with a NRF52840 Feather Express, from code.py or the REPL. Nothing connected to the board, just female headers soldered to the pins. I also tried with an LED on the PWM pin to check it does its thing, and a few different PWM pins.

Then, I updated the bootloader from - I think it said 0.2.1 - to the latest (0.6.2), and that solved it. Then I downgraded to the earliest version I could find (0.2.5) and the issue came back.

manic glacierBOT
#

@geudrik Your help would be awesome. ESP32-S2 is a bit trickier than the Cortex-Ms. Generally I build CircuitPython with DEBUG=1 on the make line. It'll then output debug serial to UART0. On a crash, this may include a Backtrace: line that can be used to get a call stack.

I don't know of a doc for ESP32-S2 debugging. I'd encourage you to join the Adafruit Discord and get help from us in #circuitpython-d...

idle wharf
#

@lone axle since you've been driving most of this (it seems) I wanted to ask if there was a discussion about adding Type Hints to the libraries you could refer me to (maybe it was in the weeds the week with the bad audio?).

I have zero objection to it, just wanted to understand the thinking and learn more about the approach.

lone axle
# idle wharf <@!382939733107408897> since you've been driving most of this (it seems) I want...

There was some discussion in the weeds, I'm not certain which week it was. Motivation for it from my end was two-fold. It helps make the IDE experience (I tend to develop mostly in PyCharm) more pleasant because it's able to offer up better suggestions for various things. And secondly it provided lots of "good first issue" type fodder for hacktoberfest when we knew we'd have an influx of folks looking to contribute.

idle wharf
#

OK, I was thinking there was some CP related feature coming. Got it.

lone axle
#

Scott mentioned at one point and I definitely agree it can be very helpful for smartphone based editors as well because suggestions can be easy to press buttons and take away lots of the actual typing which is not so fun on mobile keyboards.

#

All of the typing information is ignored by circuitpython microcontrollers themselves. Primarily just provides QoL for development in environments that support it.

idle wharf
#

OK, all good stuff to learn more about. Thank you! 🙏

idle owl
#

@tidal kiln So... for this seesaw board. I noticed the built-in LED is backwards. It's lighting up when set to False and turning off when set to True which according to the comments in the code, is backwards.

#

Does it need a different pin_mode or something? I only see OUTPUT and three versions of INPUT. So that probably isn't it.

tidal kiln
#

looks like that's just how it's wired

idle owl
#

ah oki

#

That's going to be a bit confusing, maybe, but oh well.

#

Got NeoPixels working, time to find a button and some bare LEDs.

idle owl
#

@tidal kiln I hooked up a button, and it's doing weird things.

#

It's like the pin is floating or something?

tidal kiln
#

yah. could be.

manic glacierBOT
idle owl
#

I'm getting this: ```
True
False
True
True
False
True
True
False
True
True
False
True
True
False
True
True
True

#

When doing nothing with the button

#

If I press the button, it goes all False.

#

I'm confused.

#

Tried it with and without a software PULLUP.

#

No difference.

tidal kiln
#

you're using CP lib?

idle owl
#

yes.

tidal kiln
#

ok, let me change to that. one sec.

idle owl
#

digitalio.DigitalIO

#

Thanks

#

Current working code: ```py
import time
import board
from adafruit_seesaw import seesaw, neopixel, digitalio

seesaw = seesaw.Seesaw(board.I2C())

seesaw.pin_mode(5, seesaw.OUTPUT)

pixels = neopixel.NeoPixel(seesaw, 19, 12)

pixels.brightness = 0.2

switch = digitalio.DigitalIO(seesaw, 0)
switch.switch_to_input(pull=seesaw.INPUT_PULLUP)
led = digitalio.DigitalIO(seesaw, 12)
led.switch_to_output()

while True:
print(switch.value)
seesaw.digital_write(5, switch.value) # turn the LED on (True is the voltage level)
time.sleep(0.2)```

#

Haven't done anything with the external LED yet, only did setup code.

#

And looking at it, I'll probably need help with that. There's no example of how to PWM an LED that I see.

#

Tried different pins with the button, no change.

#

In case pin 0 was weird.

manic glacierBOT
idle owl
#

hmm, seems like I should be able to PWM it on this pin, but it's saying no.

#

Says invalid pin, product copy says I am right.

#

5 x 8-bit PWM outputs - pins 0, 1, 9, 12, 13

#

I'm on 12.

manic glacierBOT
#

Good Point... I have everything here already tested and working for a 9 key and rotary encoder macropad...
Had to get a "keyboard" library "precompiled" as a mpy
The cope.py code is similar to the adafruit macropad with the keymap in a py file a subfolder.

I tested this about a month ago (was waiting for the PID for a while). I'll get a fresh uf2 on there and see if anything changed (doubt it).

idle owl
#

I think the library needs a pin map for this board.

#

Yup.

#

OK, going to try to add this as well.

tidal kiln
#

@idle owl try this:

import time
import board
import digitalio
from adafruit_seesaw.seesaw import Seesaw
from adafruit_seesaw.digitalio import DigitalIO

ss = Seesaw(board.I2C())

button = DigitalIO(ss, 0)
button.direction = digitalio.Direction.INPUT
button.pull = digitalio.Pull.UP

while True:
    print(button.value)
    time.sleep(0.2)
idle owl
#

wth?

#

It works.

#

My code should be the same.

#

Works like that for digitalio in CP as well.

#

Which I thought this emulated.

tidal kiln
#

now try this:

import time
import board
from adafruit_seesaw import seesaw, digitalio

ss = seesaw.Seesaw(board.I2C())

button = digitalio.DigitalIO(ss, 0)
button.switch_to_input(pull=ss.INPUT_PULLUP)

while True:
    print(button.value)
    time.sleep(0.2)
manic glacierBOT
idle owl
#

All over the place again.

#

wait

#

now it's .. no it stopped bouncing for a bit there, but I pressed and released, and it's back to bouncing.

manic glacierBOT
idle owl
#

huh.

tidal kiln
#

it's not actually setting pullup with second approach

idle owl
#

Should be though, shouldn't it?

#

As in, is that a bug?

tidal kiln
#

seems like that was the intention

idle owl
#

Ok

manic glacierBOT
#

With 11 GPIOs, the largest matrix the Xiao could have would be 5x6 or 30 keys. I haven't tested for that large.

My current test bed is a macropad that looks like the CNCEncoderpad. The encoder sends reports so fast that the QMK tester detects it as chattering...

I could use one of my gherkins and bodge a few wires between the PCB and the Xiao to see if it works fine....

idle owl
#

@tidal kiln I tried my hand at making the pinmap file. And there's no "pid" to check for the ATtiny, so I made it check the HW_ID I added earlier, and it worked (I did a test print inside the place where it chooses the right pinmapping, and it did), but it's still saying invalid PWM pin. Any suggestions? Or should I shelve this until next week. Probably shelve it. Bleh.

#

Anyway, thanks for your help with this. I'm off on Monday so I'll be picking it up Tuesday.

tidal kiln
#

oh. one sec. i missed the PWM discussion...

idle owl
#

OK

tidal kiln
#

how were you getting error?

idle owl
#

Created a PWM pin, which worked, and then tried to set pwm.frequency or pwm.duty_cycle and that line throws ValueError: Invalid PWM pin

tidal kiln
#
Adafruit CircuitPython 6.3.0 on 2021-06-01; Adafruit QT Py M0 with samd21e18
>>> from adafruit_seesaw import seesaw, pwmout
>>> import board
>>> ss = seesaw.Seesaw(board.I2C())
>>> pwm = pwmout.PWMOut(ss, 12)
>>> pwm.frequency = 4000
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_seesaw/pwmout.py", line 32, in frequency
  File "seesaw.py", line 372, in set_pwm_freq
ValueError: Invalid PWM pin
>>> 
idle owl
#

Yeah. You don't have the necessary pinmapping file

#

That is expected for you for sure

#

I created a pinmap file, and added a check for it into seesaw.py.

#

But it's still not working.

#

The check I added works, it is trying to use the right file

#

but I guess I did it wrong or something?

tidal kiln
#

but you're getting same error still?

idle owl
#

Yes.

tidal kiln
#

upload your pin map file

idle owl
#

do you want another zip so you have the check as well?

#

Or just the changed files

tidal kiln
#

hmm....zip

idle owl
#

Wasn't sure if it would let me upload a .py as long as seesaw anyway without complaining.

tidal kiln
#
_PWM_3_PIN = const(0x12)
#

12 != 0x12

idle owl
#

hmm.

#

The one digit numbers matched in the SAMD09 mapping

#

so I thought two digit numbers were also the same

#

Ok

tidal kiln
#

the pin is 12 in decimal

idle owl
#

const are actual hex then?

#

Or?

tidal kiln
#

_PWM_3_PIN = const(12)

#

can just do that

idle owl
#

ohhhhh

#

facepalm. Ok checking.

tidal kiln
#

_PWM_3_PIN = const(0x0C)

#

or that

#

same for the other pins

#

issue only kicks in for pins above 9

#

since 9 == 0x09

idle owl
#

Yeah I just made them all the direct value

#

It's at least trying to PWM now.

#

Now the code isn't right, but that's a different story

#

OverflowError 😄

#

Basically no matter what I do when trying to set duty_cycle.

#

hmph.

#

Ok, I think I'm done for today. Longer day than I intended. Back Tuesday to pick this up. Thanks for your help, Carter!

tidal kiln
#

cool. np!

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I am now working on this. I ran into an issue of BIOS's expecting the interface number to be 0 for the keyboard, and not handling non-zero values properly. See https://github.com/hathach/tinyusb/issues/1129. I can push the HID interface to position 0, but right now the Windows drivers package we have assumes the CDC is in position 0. I think I have a way of restructuring the drivers to handle that, though, by imitating [what Windows 10 does](https://docs.microsoft.com/en-us/windows-hardware/d...

orchid basinBOT
#

Adding a new build variant targeted for keyboard projects. Same hardware, different circuitpython build...

Reusing the same pictures as the original Xiao. I am not sure if this OK or not.

I also kept the same manufacturer and same hardware/buy links. I simply added a description of the differences with the original one.

Can you review and comment if I got everything I needed to do?

manic glacierBOT
#

Hi Guys,

I love CircuitPython - it is awesome.

I am very new to compiling / building CircuitPython. I have designed a custom PCB with an NRF52840 which has a non-supported SPI flash chip: a Winbond W25N01GV chip. I naively assumed that this would be a drop in replacement or a quick datasheet read with updated addresses as I had seen on the GitHub support, however, I am just a little confused as to where to begin.

It looks as though the flash chip descriptions are no longer part of C...

manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; Raspberry Pi Pico with rp2040
Board ID:raspberry_pi_pico

Code/REPL

import board
import displayio

displayio.release_displays()

dc = board.GP8
cs = board.GP9
reset = board.GP12

displayio.FourWire(None, command=dc, chip_select=cs, reset=reset)
print("after initialize fourwire bus")

Behavior

Most convenient way to test is save into a file not called code.py and then imp...

manic glacierBOT
manic glacierBOT
#

I'm getting make errors. I'm using a Mac (Apple Silicon), and followed the guild for getting going on OSX. One of the deps that was missing was Ninja (brew install ninja), but I'm not sure how this build chain works :S

circuitpython/ports/espressif on  main via △ v3.21.3 took 3s 
❯ make DEBUG=1 BOARD=unexpectedmaker_feathers2 -j8 
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
IDF_PATH=/Volumes/CircuitPython_Dev_Playgro...
manic glacierBOT
manic glacierBOT
lone axle
#

What could cause &busio_spi_type to be undeclared on certain builds?

manic glacierBOT
#

I'm not sure why more boards didn't fail, but it seems you need to include the header that gives the declaration of busio_spi_type:

--- a/shared-bindings/displayio/FourWire.c
+++ b/shared-bindings/displayio/FourWire.c
@@ -32,6 +32,7 @@
 #include "py/binary.h"
 #include "py/objproperty.h"
 #include "py/runtime.h"
+#include "shared-bindings/busio/SPI.h"
 #include "shared-bindings/displayio/Group.h"
 #include "shared-bindings/microcontroller/Pin.h"
 #include "shared-bindings...
onyx hinge
#

@lone axle it looks boards that enable sharp memory display work, because they already included shared-bindings/busio/SPI.h from SharpMemoryFramebuffer.h -- In C, things indirectly "#include"d can be seen from the current C file

manic glacierBOT
#

Huh.. apparently the pipe to tee didn't capture the error... I should have checked before I uploaded.

This is the error

/Users/grodik/.espressif/tools/xtensa-esp32s2-elf/esp-2021r1-8.4.0/xtensa-esp32s2-elf/bin/../lib/gcc/xtensa-esp32s2-elf/8.4.0/../../../../xtensa-esp32s2-elf/bin/ld: build-unexpectedmaker_feathers2/firmware.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
/Users/grodik/.espressif/tools/xtensa-esp32s2-elf/esp-2021r1-8.4.0/xtensa-esp32s2-elf/bin/../lib...
manic glacierBOT
#

Do you mind checking out the I2CDisplay code while you're working on it?

Indeed I2CDisplay does exhibit a similar hard crash with this reproducer:

import board
import displayio
import adafruit_displayio_ssd1306

displayio.release_displays()
oled_reset = board.D9

# Use for I2C
i2c = board.I2C()

display_bus = displayio.I2CDisplay(None, device_address=0x3C, reset=oled_reset)

WIDTH = 128
HEIGHT = 32  # Change to 64 if needed

display = adafruit_displayio_ssd1306...
manic glacierBOT
manic glacierBOT
#

CircuitPython version

adafruit-circuitpython-matrixportal_m4-en_US-7.0.0

Code/REPL

# Adapted from ...
# ON AIR sign for YouTube livestreaming
# Runs on Airlift Metro M4 with 64x32 RGB Matrix display & #shield
#https://cdn-learn.adafruit.com/downloads/pdf/rgb-matrix-
#automatic-youtube-on-air-sign.pdf?timestamp=1633673486

import time
import board
import displayio
import adafruit_display_text.label
from adafruit_display_shapes.rect import Rect
fro...
manic glacierBOT
#

dispayio.Group does not take a max_size argument anymore in CP7.
https://circuitpython.readthedocs.io/en/latest/shared-bindings/displayio/index.html#displayio.Group

You link the pdf in your code, it looks like the pdf has an outdated version of the code compared to the web version, I don't know how that works, but I'll try to get the info to the right people if they miss this.

I advise using the "download project bundle" button here instead:
https://learn.adafruit.com/rgb-matrix-aut...

manic glacierBOT
#

The DEBUG=1 builds don't fit anymore on ESP32-S2. Your build is probalby fine otherwise. You can turn off several modules and make them fit. See https://github.com/adafruit/circuitpython/issues/4984#issuecomment-915384864 as an example of what to turn off. The code region is not overflowing; it's something else, and we need to figure out the best way to make the DEBUG builds easier.

manic glacierBOT
manic glacierBOT
#

Thanks for doing this!

I have a not-yet submitted PR that uses the other validators, and uses %q where possibe. I started with all the modules in the smallest SAMD21 builds, hoping to save a few hundred bytes. Unfortunately, it is a few steps forward and a few steps back in many cases, and so far it is only saving a couple of dozen bytes. @jepler had a similar experience.

Diff is https://github.com/adafruit/circuitpython/compare/main...dhalbert:arg-validation-updates

Even if it doe...

manic glacierBOT
#

Oookiedoke, after getting the debug build set up and running, I no longer get hard crashes, but instead a permanent hang. Once I get here and it's hung, if I continue to wait, it eventually .. does something (it removes itself from connected to my laptop, and screen terminates since the device vanishes). I then am unable to reconnect to the device at all (no such file or directory) until I press the reset button. No output is generated when it crashes (logging from screen shows the last line ...

#

here's the diff of mpconfigport.mk in case I messed something up

diff --git a/ports/espressif/mpconfigport.mk b/ports/espressif/mpconfigport.mk
index 206de09ab..5adbd3163 100644
--- a/ports/espressif/mpconfigport.mk
+++ b/ports/espressif/mpconfigport.mk
@@ -12,25 +12,25 @@ LONGINT_IMPL = MPZ
 # These modules are implemented in ports/<port>/common-hal:
 CIRCUITPY_FULL_BUILD ?= 1
 CIRCUITPY_ALARM ?= 1
-CIRCUITPY_AUDIOCORE ?= 1
+CIRCUITPY_AUDIOCORE ?= 0
 CIRCUITPY_AUDIOMP...
manic glacierBOT
timber mango
# manic glacier

LPC1768 has Cortex-M3 & 64 KiB and LPC55S28 Cortex-M33 and possess 256+ KiB

timber mango
# manic glacier

There is a regression of submodules in frozen/. Could you pull these forward to match what is in main?
Sure, I'll do. How did you discover the regression?
In fact just before creating PR, I had merged the main into nxp-lpc branch of my fork.

tulip sleet
#

The submodules show up as changed in "Files changed". The submodules do not always update automatically on a merge. after merging I do this; I do it so often I made an alias:

alias gitsubupdate='git submodule sync --quiet --recursive && git submodule update --init'
#

But sometimes if git thinks you made the change deliberately, it will not update automatically, and you'll need to fix it manually

tulip sleet
#

Is the LPC1768 still recommended for new designs, since M3 is getting long in the tooth now?

#

I had looked at LPC55xx a bit, but availability was poor a while ago.

timber mango
timber mango
# tulip sleet I had looked at LPC55xx a bit, but availability was poor a while ago.

Is the LPC1768 still recommended for new designs, since M3 is getting long in the tooth now?
I believe it's not yet displaced. However there is already pin-compatible replacement for LPC1768 called LPC4088 with Cortex-M4 and 96 KiB of RAM.
I am going to add LPC4088 to CPY NXP port as well later.
Anyway the LPC1768 is not far away to be outdated soon. But still I would like to support it, since it used in multiple existing products our company is building.

tulip sleet
timber mango
tulip sleet
#

did you do get fetch adafruit; git merge adafruit/main where adafruit is upstream?

timber mango
tulip sleet
#

no, just commit and re-push your PR

#

it will update

manic glacierBOT
#

Thanks! Could you say more about this chip family? Is it Cortex M0+? It looks like they have limited RAM (like 64kB max)?

There is a regression of submodules in frozen/. Could you pull these forward to match what is in main?

LPC1768 has Cortex-M3 & 64 KiB and LPC55S28 Cortex-M33 and possess 256+ KiB.
LPC55S28 is a modern single MCU with fancy FlexCOMM peripheral units just like SERCOM on SAMD5x.
There is already pin-compatible replacement for LPC1768 called LPC4088 with Cort...

timber mango
tulip sleet
#

I am cancelling the action runs since it will need to re-run after the next change, and they take a long time

timber mango
#

I noticed there is new file, which I did intend to deliver: https://github.com/adafruit/circuitpython/pull/5453/files#diff-d1220db10403147e832040df7b1c5241972d4a13eeb534aba127e4fa197fba75
It is short bash-script to update submodules.
Should I delete it?

GitHub

Here is initial NXP LPC1768 and LPC55S28 support.
So far CPY NXP port has been tested on two boards: up and running on Keil MCB1700 and NXP LPCXpresso55S28 boards.
Serial interface, HAL digitalio a...

tulip sleet
#

it's specialized, because we only want to update a frozen module to the latest tagged release, not the latest commit.

turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Channel Categories

8

Text Channels

60

Voice Channels

6

Members

31271

Roles

35

manic glacierBOT
#

I took a peek at WDT stuff while implementing deep sleep via https://github.com/adafruit/circuitpython/pull/5425.

My take away is that it's super doable. I don't have time atm, but for anyone wanting to attempt this, here are some tips:

  • use \ports\nrf\common-hal\watchdog\ as a rough starting point
  • you'll likely need to reference \ports\atmel-samd\asf4\samd51\include\component\wdt.h quite a bit for specific register twiddling
  • Just checked the D5x/E5x errata (document DS80000...
slender iron
#

<@&356864093652516868> Just wanted to drop a reminder here that the meeting is 24 hours later than normal because tomorrow is a US holiday. See you on Tuesday at the normal time!

manic glacierBOT
manic glacierBOT
tidal kiln
#

is the "how not to show CIRCUITPY drive" info in a guide somewhere?

tidal kiln
#

@jaunty juniper thanks!

slender iron
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

I am now working on this. I ran into an issue of BIOS's expecting the interface number to be 0 for the keyboard, and not handling non-zero values properly. See hathach/tinyusb#1129. I can push the HID interface to position 0, but right now the Windows drivers package we have assumes the CDC is in position 0. I think I have a way of restructuring the drivers to handle that, though, by imitating [what Windows 10 does](https://docs.microsoft.co...

slender iron
#

@onyx hinge @vale spire pointed out we'll get #7680 and #7688 with 1.17. we should make sure they are enabled

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit CircuitPlayground Express with samd21g18

Code/REPL

# This is a pruning of https://learn.adafruit.com/perk-up-ears/code 
# test.py

import array
import board
import audiobusio

NUM_SAMPLES = 90

mic = audiobusio.PDMIn(board.MICROPHONE_CLOCK, board.MICROPHONE_DATA,
                       sample_rate=16000, bit_depth=16)


samples = array.array('H', [0] * NUM_SAMPLES)
mic....
manic glacierBOT
#

Actually this is good point!
The only reason is this commit: https://github.com/EmergReanimator/mcux-sdk/commit/3a5047bb09d88057abc239eb9e579a78a7efb255

There I fixed unsafe float comparison warning which caused build failure. The better approach would be fix it in upstream. But I am still not completely certain whether the mcux-sdk ought to be reused. It requires significant changes to be integrated (e.g. pin allocation).

timber mango
# manic glacier

Please go ahead! But you need to add mbed LPC1768 board definition.
I should be able to control GPIOs via digitalio HAL module. Other than that is currently not supported.

manic glacierBOT
#

Hi @tannewt,

Thank you so much for looking into this - I figured this out on Sunday (the NAND vs NOR chip) I thought they would be used interchangeably generally - but I guess that I was wrong! It was a last minute chip-change due to shortage of the chip I wanted to put on the board, so I guess that I didn't spend enough time to read the details... I have some W25Q128 arriving... It'll be a bit of fun to un-solder WSON NAND and solder the NOR! I'll let you know how that goes :-)

Thanks ...

manic glacierBOT
manic glacierBOT
manic glacierBOT
idle owl
lone axle
#

Will take a look

idle owl
#

Thanks!

tulip sleet
#

@idle owl @slender iron @onyx hinge I am back from morning errands and can run the meeting today. I'll try the Game Bar recorder and will review the mtg document.

slender iron
#

@tulip sleet did you try obs yet? That’s what the rest of us use

tulip sleet
#

no, but i will. I'll be afk 12-12:40 or so eT.

#

I know the game bar recorder works. I tested it with Kattni

slender iron
#

Kk

manic glacierBOT
#

I am looking at an implementation like that. My original intent was that the new code did not take any more space that the old one when not used, which led me to do an ugly duplication, but that's not good... Also I was not sure how to implement some of that. I'll commit an update soon.

I am not in favor of adding a parameter to the python API of board.I2C(). The idea is to add named dedicated I2C ports, in particular the STEMMA port in the case of the QT PY 2040, for discoverability. It...

idle owl
# slender iron Kk

Someone should do a back up recording regardless so there's less stress on Dan. @onyx hinge Ideally not me because I lose a monitor when recording. 🙄

slender iron
#

I can do it

idle owl
#

Thanks

tulip sleet
#

The Game Bar recorder has a nice mini-window showing elapsed time. I see that in OBS in the bottom bar, but I don't see some detachable window for that. Is there something? Do you just shrink the OBS window?

idle owl
tulip sleet
#

could I test an OBS recording with you?

#

@idle owl only a couple mins

idle owl
onyx hinge
#

<@&356864093652516868> Hope to see you at the rescheduled meeting in about 55 minutes here in the text channel and in the CircuitPython voice channel. Please add your notes to the document, and if you won't be reading them yourself please make a note of it. If you're just listening in, no need to do anything. Notes doc: https://docs.google.com/document/d/1gFsjyqQCprD-4CVVsiNf6XFNNv7XcZ7RQcV6IHRssI8/edit?usp=sharing

slender iron
#

I use this command from Jeff to resize discord xwit -resize 1920 1080 -select

tulip sleet
#

yes, mine is probably slightly taller

#

my screen is 1920x1200

slender iron
#

you could record at 720p @tulip sleet

tulip sleet
#

what do you usually record at ?

slender iron
#

1080p but I have a giant screen

tulip sleet
#

I resized the window just fine. I have two monitors both 1920x1200, so np

slender iron
#

ah, ok

solar whale
#

Sorry, I won’t be able to make the meeting this week. Nothing to report.

idle owl
solar whale
#

It is. Thanks!

manic glacierBOT