#circuitpython-dev

1 messages Β· Page 322 of 1

slender iron
#

@silver tapir enabled πŸ™‚

silver tapir
#

thanks.

hybrid scarab
#

The CookieCutter is about as fun as gargling glass though

slender iron
#

I like evolving APIs to keep folks used to things evolving

lapis hemlock
hybrid scarab
#

Keep people on their toes, just randomise all the method names, GO!

thorny jay
#

If there is one example library that only care about one chip, and then other library that rely on that for implementing board specific... then I am interested in analysing how that work and how it is done.

slender iron
#

I don't think anyone would like that very much

thorny jay
#

I don't really want to invent something, but I can copycat.

slender iron
#

sounds like JS obfuscation

thorny jay
#

Pimoroni ( or @hybrid scarab ) made some interesting variation in very similar library, doing the same thing mostly but with slight difference in the available function.

#

Like on library had brightness, the other not.

hybrid scarab
#

Oh yeah that's just classic me making a mess of things

thorny jay
#

And I was trying to port from one to the other trying to figure out why it was different.

hybrid scarab
#

I'll let you in on a secret- I have no idea what I'm doing

thorny jay
#

Well some hardward do not have brightness...

#

Big warning... I learned a lot about python by reading code from Gadgetoid!

hybrid scarab
#

(okay CookieCutter isn't that bad)

thorny jay
#

Ok, now I should figure out what resistor I need for SDA/SCL and if it's Ok to have not exactly the right value because of what I have in stock... and maybe why this is needed on the FeatherCap and what is the difference between a Pi and a Feather.

onyx hinge
#

Well this is weird. circuitpython's ports/unix crashes with "import ulab.linalg"

#

so does "import ulab.fft", so it's not special to linalg...

lapis hemlock
#

This works on micropython import ulab from ulab import linalg

#

But I konw that on circuitpython you import differently.

hybrid scarab
#

You should get away with a pretty wide range of SDA/SCL resistors in my experience, as long as you're not doing anything challenging with i2c

ivory yew
#

at low speed it doesn't matter much

#

at high speed it does

#

what's this about pull-up sensing?

hybrid scarab
#

It throws a little message if you don't have pull-ups on your i2c lines, it's cute

ivory yew
#

oh

#

neat. πŸ™‚

hybrid scarab
#

But also makes me think I've broken something

onyx hinge
#

yeah in micropython import ulab.linalg is not accepted, it says no module named 'ulab'

ivory yew
#

that is ... weird, @onyx hinge. That should be valid.

lapis hemlock
#

I am trying to figure out what has changed since 11a7ecf, which is the version you have.

onyx hinge
#

@ivory yew in micropython it's a (I think) deliberate choice; they don't facilitate having hard-coded submodules. We added patches to make it work better

ivory yew
#

ah

onyx hinge
#

import ulab.linalg works on circuitpython, phew

lapis hemlock
#

Oh, so was it a false alarm, then?

onyx hinge
#

I mean, on hardware

#

@lapis hemlock for what it's worth, ulab.linalg.cholesky exists for me without your change in ulab

#
'0.54.0'
>>> ulab.linalg.cholesky
<function>
hybrid scarab
#

Oh my APDS9500 I'd almost forgotten about that

lapis hemlock
#

I haven't checked it, I worked from the issue that was posted on circuitpython, and then I realised that it didn't work on micropython.

#

@onyx hinge So, what do we do, then? Just close the issue, and walk away?

onyx hinge
#

Figure out why it didn't work for the user?

lapis hemlock
#

I would also like to know, why it worked for you, and why it didn't work on your unix port.

#

Something is definitely fishy here.

onyx hinge
#

yeah but almost certainly not ulab's fault

lapis hemlock
#

As I said, there was a problem in 0.54.0, I just don't understand, why it didn't affect circuitpython, and why the user claimed that it did.

onyx hinge
#

the import-crash is not ulab's fault

thorny jay
#

One day, I will have a deep look at ulab. But it seems to be math... some of it I did understand in the past and succeeded at exam. Even if it was fun at the time, I manadge to forget almost everything. Now I start to see a lot of interesting use of math, maybe I should re-learn. My kids are not far enough that I cannot help them with homework. Let's hope one of them get deep into math and I have to help them!

lapis hemlock
#

@onyx hinge OK, but then I think either you, or @tulip sleet should respond to that specific issue.

#

It wouldn't be proper, if I mingled in circuitpython matters.

onyx hinge
#

let me check whether circuitpython 5.3 behaves or not ...

manic glacierBOT
#

I can't reproduce that here with git 2.20.1 running on debian linux amd64. I used a fresh clone for testing:

jepler@eric:/tmp$ git clone https://github.com/adafruit/circuitpython
Cloning into 'circuitpython'...
remote: Enumerating objects: 29, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 128614 (delta 14), reused 13 (delta 11), pack-reused 128585
Receiving objects: 100% (128614/128614), 77.30 MiB | 32.04 MiB/s,...
#

Hi @kevin-tracy and thanks for your bug report. Can you let us know a little more about your setup? What version of CircuitPython are you using, what board is it on, and what steps did you follow to produce the problem?

I tried 5.3.1 on a Grand Central M4, and the function is present. However, I did not test its functionality.

Adafruit CircuitPython 5.3.1 on 2020-08-17; Adafruit Grand Central M4 Express with samd51p20
>>> from ulab.linalg import cholesky
>>> cholesky
<function>...
#

I can't reproduce that here with git 2.20.1 running on debian linux amd64. I used a fresh clone for testing:

jepler@eric:/tmp$ git clone https://github.com/adafruit/circuitpython
Cloning into 'circuitpython'...
remote: Enumerating objects: 29, done.
remote: Counting objects: 100% (29/29), done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 128614 (delta 14), reused 13 (delta 11), pack-reused 128585
Receiving objects: 100% (128614/128614), 77....
#

Yay! Tested irremote_simpletest on both feather_m0_express and pirkey_m0 --- all good now!
code run on pirkey_m0

[Jerry-desktop-mini:~/projects/feather_stm32f405] jerryneedell% cat /Volumes/CIRCUITPY/irremote_simpletest.py 
# Circuit Playground Express Demo Code
# Adjust the pulseio 'board.PIN' if using something else
import pulseio
import board
import adafruit_irremote

pulsein = pulseio.PulseIn(board.REMOTEIN, maxlen=120, idle_state=True)
decoder = adafruit_irremote.Generic...
hybrid scarab
#

@half sedge PM25 library works nicely, I wonder if we can get Enviro+ added into the simpletest πŸ˜†

idle owl
#

@hybrid scarab That depends, do you want to submit an update to the simpletest? πŸ˜‰

hybrid scarab
#

Got me there πŸ˜„

manic glacierBOT
#

also tested dht_simpletest with dht22 on a feather_m0_rfm9x build (with pulseio) -- it works!


Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-alpha.2-152-g333a10ded on 2020-08-17; Adafruit Feather M0 RFM9x with samd21g18
>>> import dht_simpletest
Temp: 76.8 F / 24.9 C    Humidity: 50.6% 
Temp: 76.6 F / 24.8 C    Humidity: 50.9% 
Temp: 76.6 F / 24.8 C    Humidity: 50.9% 
hybrid scarab
manic glacierBOT
#

perhaps we should hold off on this until #32327 is merged and I can see if I can fit pulseio back into the build.

@jerryneedell I don't see any learn guides/projects which utilize the DHT+LoRa RFM9x (aside from TTN ones, and those should be run on the SAMD51). Are you OK with merging this as-is, and we can create another PR to fit pulseio after?

Yes -- absolutely -- go ahead -- pulseio may not fi anyway

hybrid scarab
#

Why is the PM25 header... b"BM" πŸ˜†

#

Also is the any reason why- in CircuitPython- you would do

if (self._buffer[0] != 0x42) or (self._buffer[1] != 0x4D):

instead of

if not self._buffer[0:2] == b'BM'
slender iron
#

the first uses less memory but I'm not sure it's worth the worse readability

hybrid scarab
#

Oh lord what eldritch horror does indexing into a bytearray involve?!

slender iron
#

the slice generates a new bytes object

hybrid scarab
#

Ah!

#

That is logical

slender iron
#

and the b'BM' itself is another bytes object

#

numbers < 31 bits are special too

hybrid scarab
#

So raw bytes + overhead * 2

#

Ah yes I'm aware of the magic of numbers < 32 bits

#

This is clearly written with a very keen eye for memory usage

slender iron
#

yup, and bytes objects are actually two allocations

hybrid scarab
#

Similarly I would do self._buffer[2:] = data

slender iron
#

one for the object and one for the array contents

#

I would only worry about this if you are doing it very often

hybrid scarab
#

But the O.G. code has a for-loop, copying each byte from the bytearray returned by serial read into the bytearray of the buffer

slender iron
#

that sounds silly

#

πŸ™‚

hybrid scarab
#

Now IIRC some serial libraries like to return surprising things

slender iron
#

we've had a lot of libraries written by folks coming from C so they may lack python-isms like slicing

hybrid scarab
#

Aye you did mention

slender iron
#

including libraries ported from arduino

hybrid scarab
#

This strikes me as some tread-very-carefully code though

slender iron
#

which is why I'm excited to get you on board πŸ™‚ another person coming from python land

hybrid scarab
#

But I will base a PR upon David's work to package-ize this, to hopefully bring some idiomatic python (or idiotic python if I trounce some careful optimisations) into the mix

#

I come from javascript land, I'm just passing through Python while the jobs are exciting πŸ˜†

slender iron
#

I would only do the optimization if its in frequently called code

hybrid scarab
#

Yeah this is... infrequent to say the least

slender iron
#

then readable is better

hybrid scarab
#

Usually every second, but the PM sensor will actually speed up if it detects a change

hybrid scarab
#

Knowing my luck this will catch fire on the Pi

manic glacierBOT
#
hybrid scarab
#

Actually it might break SoF sync

#

Since if it's never read a-byte-at-a-time it's possible to get one byte out of sync, and break indefinitely

#

I think flushing the input buffer is probably the right way to fix that on any system that has one, though, and not my weird bytewise read

thorny jay
#

Yeah, checking one byte only might not be the best... and checking the two from the signature might be best. I believe the UART code is doing minimal check and attempt to sync. Then code in init.py is (or could) do more test.

#

That split and reuse of code between I2C and UART is confusing to me. I guess I2C has no issue of that kind.

hybrid scarab
#

I can't seem to beak it on my m4

#

for _ in range(5): # try a few times, it can be sluggish πŸ€”

thorny jay
#

I was poorly inserting the connector and moving the cable to try to produce bad reading.

hybrid scarab
#

I'm guessing i2c.readinto(self._buffer) just performs a straight read of 32 registers right from the device into the buffer

#

But, yes, generally i2c doesn't have the same kind of problem space that fuzzy horrible UART does

#

To be fair you can still get erroneous bytes on i2c, but it'll normally bail the whole protocol and fail with an IOError before you manage to do anything with them

thorny jay
#

I believe that what I did in PM25 is the best I can do. But feel free to improve. At least it changed from an unreliable library to something that work for me.

hybrid scarab
#

Yeah I'd be interested to know if my change breaks reliability for you

#

I can omit the change to reading the SoF packet, the other changes just clean up some non-idiomatic Python

#
-        for i in range(31):
-            self._buffer[i + 1] = remain[i]
-        # print([hex(i) for i in self._buffer])
+        self._buffer[2:] = data

for example

thorny jay
#

So now I need to understand how to deal with a PR on a fork that is a branch that is already a PR from me. I guess this is standard practice, but I usually only do one level. This is going to confuse me... I guess I need to git pull from your repo, take that branch and test on the board and wiggle the cable.

hybrid scarab
#

Checking just one SOF byte means it's possible for the sensor to read total garbage, but since there's a checksum test anyway it'll throw a RuntimeError("Invalid PM2.5 checksum")

#

Haha, I haven't raised as a PR against your feature yet

#

I just linked the GitHub diff URL so you could see the changes

#

I aim to raise them as a PR once yours is merged

thorny jay
#

Yes, that would be best!

#

At least I will understand.

hybrid scarab
#

Keeps the breakage nice and separate πŸ˜†

thorny jay
#

And it will not be my take.

hybrid scarab
#

The comments can probably be deleted from the __init__.py too, they are... perhaps a little obvious πŸ˜†

#

Not that they hurt

thorny jay
#

Not sure how much is mine and how much was there first. From memory, I just made a few more check in the UART version, and then the splitting.

hybrid scarab
thorny jay
#

If you go into the detail, you will see that my contribution is minor or mechanical.

hybrid scarab
#

Yeah you poll the start byte on a loop, versus just checking it once

thorny jay
#

and that also maybe empty the buffer if needed.

hybrid scarab
#

Near as I can tell, there's either a very small buffer or no buffer to speak of

thorny jay
#

What I don't get is how things works... I mean, the hardware send 32 bytes every seconds? The driver does not read every second, it is only because the user code read every second. So what if I don't read for 10 seconds? Do I get 10 seconds old data? What if I try to read every 0.5s? How does that "sync"?

#

Does the hardware know that we want to read?

#

I have been VERY confused with this hardware.

hybrid scarab
#

Two quick successive reads will fail if the serial timeout is 0, or block until some bytes are read

thorny jay
#

I lost all my basic understanding of UART, buffer and things like that.

#

So reading too fast will just fail or wait.

#

But reading too slow???

hybrid scarab
#

So the PM25 hardware just squirts 32 bytes over UART every 1sec, and if it sees a particulate change big enough it will speed up to something like 50x/sec (I can't remember the exact numbers)

thorny jay
#

Also, there is that thing where the value only change every 3 seconds or so. Was is with PM?

#

But in some test, I could see always the value repeating 3 times.

hybrid scarab
#

Reading too slow will, depending on your client:

  1. Slowly fill up your UART receive buffer with garbage/unread data
  2. If it's a FIFO buffer you will get the data in order, as long as you keep up with reads- so "old" data
  3. If your buffer overruns... AAAHHH
  4. If there's no buffer at all, you will get data as you request it
#

Could be the hardware itself doesn't update even as fast as the value is propagated out to UART I'm not sure

#

But the PM25 doesn't know you're asking for data, it's just diligently throwing it out there into the abyss

thorny jay
#

I read some documentation, and it was like: "Yeah, we send data every seconds, but in reality it only change every 3 seconds".

hybrid scarab
#

And that's half the problem with people running the sensor for six weeks and slowly filling the receive buffer on the Pi with unread data until you get a short read and it blows up

thorny jay
#

There is a reset pin... but not in use on the EnviroPlus. But I have the breakout now, so I could see if that part is helpfull.

hybrid scarab
#

I have PMS_RESET documented as being on D11 in the schematic

#

(though it might be an old schematic)

thorny jay
#

OMG, maybe now I start to prefer the I2C version? Maybe that one overwrite the memory with the lattest value and when you read, you always read the lattest.

hybrid scarab
#

Yeah with i2c you're explicitly asking for the contents of the registers, and clocking them out one-by-one as and when you ask for them

thorny jay
#

Wait... need to check if your code is using it. But in Adafruit simpletest, I remember it was not put to use.

hybrid scarab
#

So it makes not a lick of difference if you're too fast or too slow

thorny jay
#

I believe the issue is that it is asymetrical UART. You are not asking for the value, you are flooded with values.

hybrid scarab
#

Yep!

#

Like sticking your head under a waterfall for a drink of water, versus turning on a tap

#

This is broadly why:

  1. I hate UART
  2. People have to contrive horrible packet formats to make it work, including checksums and SoF bytes
#

Oh and
3. Inevitably some design-for-UART format ends up implemented in i2c and makes me cry

thorny jay
#

That is to make migration from UART to I2C more easy... they keep the same format.

hybrid scarab
#

Though I will yield that having a checksum is probably still useful in very extreme cases over i2c- ie: if you want to be 1000% sure the data you read is perfect and hasn't been bitflipped

#

But IMHO 99.99% of all sensor implementations wont care about a bitflip because it will be too incidental for any sensible algorithm to care

manic glacierBOT
#

I think it's a bit tricky because CircuitPython isn't simply "decode image to screen". There is machinery around it that mixes pixels and tracks dirty areas.

There are a couple questions we'd need to answer:

  1. Is it ok to store the decoded bitmap in memory?
  2. Is it ok to store the JPEG in memory?
  3. Could we cache decoded blocks in memory?

If 1, then simply decode into an existing Bitmap.
If 2, then decode the needed block from memory into memory when we get a pixel.
If 3, do 2 b...

hybrid scarab
#

If you're reading temperature from a sensor at 1000Hz and you need to know in 1/1000th of a second if the temperature has just gone from 3C to 131C and isn't a result of a bitflip then... yes.. you're gonna care about checksums πŸ˜†

thorny jay
#

Here for PM... I guess filtering creazy data, taking some kind of average, ... that would be the way to go.

manic glacierBOT
hybrid scarab
#

Yeah the accuracy on the data is questionable anyway

hybrid scarab
#

Though with UART you have to have a SOF and a checksum because you could be reading total random garbage

#

It's the only way to tell whether you've got a PM connected, or some random GPS module

#

And I really need to go to bed πŸ˜†

thorny jay
#

"RuntimeError: SDA or SCL needs a pull up" ... Maybe I should have put 4.7K rather than 1K ???

hybrid scarab
#

1K should work, in theory

#

As long as your resistor value isn't so low that the chip can't pull the pin low

hybrid scarab
#

I think the rule of thumb might be "use the highest value you can get away with before your signal turns into mush"

#

But that probably only applies if you're worried about burning tiny amounts of power or something

#

Like- if you put a 10M resistor on there then it might take so long for the line to go to 3.3V when it's released that your device has tried to pull it low again before it finishes

thorny jay
#

Yeah, I have read 2 or 3 page that google gave me to read... and yeah, gave 1K a try... now I am going to try 4.7K. If that also fail... then... I will start to instigate further.

#

Not even sure if that is a Pull Up resistor or some magic adaptation between what the Pi does and what the Feather does.

hybrid scarab
#

I've done some slightly crazy things with i2c (running it over long cables for Flotilla) but that's about as far as my "engineering" creds will take me

thorny jay
#

I NEVER had to worry about that because every board I use do the right thing.

hybrid scarab
#

Yeah Feather not having onboard pullups is weird to me, but I guess it makes those pins multi-purpose

#

Also no pre-populated resistor will ever be the right resistor for some specific edgecase, I guess

manic glacierBOT
#

Not sure what you mean with caching decoded blocks, isn't that essentially the decoded bitmap?
My thinking so far was to do 1) and load JPEG from disk given that it is unlikely that M0+ could be supported with the already high memory requirements from CPY itself. Which pretty much leaves only MCUs which can easily hold a couple bitmaps in memory for even "higher res" 320x480 screens.

slender iron
#

@onyx hinge what do the _reconstruct calls for rgbmatrix and sharp do?

#

ooooh, folks will be happy. terminalio is 6k

manic glacierBOT
#

Has the testing covered the case in which this line is reached? I expressed concern about it but that was from an abstract standpoint not a testing standpoint:

/// added code in pulsein_interrupt_handler
    if (!supervisor_background_tasks_ok() ) {
        common_hal_mcu_enable_interrupts();
        mp_raise_RuntimeError(translate("Input taking too long"));
        return;
    }

Here's what I'd written earlier:

Raising an exception from an interrupt context seems even...

onyx hinge
#

@slender iron when the framebuffer displays are initially created they allocate heap memory. "reconstruct" lets them recreate them as supervisor allocations on soft-reset.

slender iron
#

ok, I think I fixed a bug then where the move memory would exit early if there was no terminal

onyx hinge
#

(if they were ever allocated as a "built in" display it would probably not be necessary as they would already be supervisor allocations)

#

oh cool, thanks for fixing my bugs

slender iron
#

np, I think it's very rare that it'd happen

onyx hinge
#

it's in that "turn off terminal" PR?

slender iron
#

yup

onyx hinge
#

This would break any demo that used terminalio.FONT for displaying ASCII text and numbers, they would have to use external fonts instead, but only on ja and ko builds?

slender iron
#

yup

#

and those users don't likely have the characters they want anyway

onyx hinge
#

OK, making sure I understood the impact of this change.

manic glacierBOT
#

Scott and I discussed on Discord that this change means any program that uses terminalio, approximately 32 files in the Adafriut Learning Systems Guides git repo, will stop working on ja and ko translated versions while continuing to work as written for other translations.

Those programs could hypothetically be modified to use a bitmap font read from flash, if there is enough RAM memory to hold the font. This is likely to be feasible for all but the most resource constrained builds, s...

idle wharf
#

I'm on adafruit/main, built and flashed espressif_saola_1_wrover.
Should I see a network module in help('modules')?

manic glacierBOT
#

With the early return we were seeing a hang condition with no notification
to the end user as to a cause.
I agree that raising an exception from an interrupt handler is less than
ideal, but in this case the incoming pulse
would have lasted more than 1 second, which means that it would not be
valid anyway. The DHT and IR remotes
I've tested all complete the pulsein in less than 100 milliseconds, so a
pulse lasting 10x that would mean something's
wrong with the sender. Jerry did hit the "Input...

crimson ferry
idle wharf
#

@crimson ferry Sorry, I worded that poorly. I don't see a network module. I assumed with the native_wifi merge for an esp32s2 port I would see one now. I wonder if only the IDF\C part is implemented so far and not the CP Library...

#

Actually, looks that is exactly what that PR says... "coming soon" πŸ˜‰

#

Thanks @crimson ferry !

crimson ferry
#

I'm looking at Scott's fork now to see how it manifests

#

anticipation is high for playing with the new networking stack πŸ™‚

idle wharf
#

I'm borderline giddy

crimson ferry
#

same. I like the finer granularity in the modules and eventually the libraries

manic glacierBOT
idle wharf
#

@crimson ferry I think I missed the information on that. How will the modules be changing?

crimson ferry
#

The finer-grained library re-factoring is just my impression from some commentary in the Deep Dives.

idle wharf
#

Gotcha... As a C dev, you're able to see deeper in the dives than I can. πŸ˜‰

crimson ferry
#

uh, it's actually quite alien to me (not a C dev; not a Python dev really either)... it's taken me over a year working with CP to be able to navigate those directories and grok any meaning from it at all

slender iron
#

@idle wharf the native_wifi branch adds wifi and socketpool modules

idle wharf
#

@slender iron AH, so I need to build the native_wifi branch in your fork, correct?

slender iron
#

yup!

#

will hopefully get a PR out tomorrow for the basics

#

it'll require my version of requests I think too

idle wharf
#

Got it, thanks! I'll try out a built tonight on the Wrover and the FeatherS2

crimson ferry
#

@slender iron Seems the library APIs will change? Will the break be 5.x vs. 6.x (different libs in the bundles)?

slender iron
#

they will a bit but they'll apply backwards

#

all of the existing native networking is disabled

#

we have a python wiznet driver anyway

crimson ferry
#

we never used that anyway did we? not since 3.x or 4.x with esp32spi or wiznet

#

(libraries)

slender iron
#

not really no. anything we've used heavily is all python side

manic glacierBOT
#

tested on:

  • CLUE
  • master branch. hash: 94ecf33a5ccd3682075e7a849621148ac72142a4

steps to repro:

Open REPL and then:

import _bleio
_bleio.adapter.erase_bonding()

It fails while trying to erase page address 0xea000 (page number 0xea).

circuitpython-6.0-alpha2 works Ok.
I compiled circuitpython following the instructructions from here: https://learn.adafruit.com/building-circuitpython/build-circuitpython using BOARD=clue_nrf52840_express

forest musk
#

@tulip sleet I've just filed the bug posted by the bot (previous post)... not sure whether I'm compiling the firmware with incorrect parameters or what... but it seems that BLE cannot bond because of an issue with NVM.

tulip sleet
#

thanks, I will take a look tomorrow

forest musk
#

thansk!

manic glacierBOT
manic glacierBOT
#

@gmeader I wrestled with this for a while, had even reformatted my card at one point during initial testing. Always something odd at 1024 bytes.

I just tried a new card, formatted with the official SD Card format utility, and it worked fine (your example gist code and mine). Odd that we both see errors at around 1024 bytes, which leads me to believe it's not random corruption, but some underlying card characteristic or state that triggers the IO error.

Curious if a new card, newly-forma...

orchid basinBOT
manic glacierBOT
hybrid scarab
#

My kingdom for a CircuitPython library manager πŸ˜†

#

Though tbf I can search the "lib" folder in Windows

solar whale
lone axle
#

+1 for Circup, I've started using it more recently. If you are familiar with using pip or npm for other projects to install and keep updated the requirements then you'll probably be able to pick up Circup quickly and use it for installing and updating Circuit Python libraries on your devices.

hybrid scarab
#

Aha thank you @solar whale

thorny jay
#

I guess circup is better... but I have a small python script for that. I download the new bundle, unzip, create a few folder, then run my script. It check the file/folder I have in D:\ (CircuitPython drive) and copy those from the bundle. Then I have my folder full of all the file I should copy over. So it assume that my board already has the set of usefull library, and get me the latest. Not fool proof, but I used it a lot recently: https://gist.github.com/dglaude/f5f3423288861bc44fe758212dbaac61#file-update-py

Gist

Aggregate all the CircuitPython libs needed for PyPortal usage - pyportal_lib.py

#

Initially the Gist was about PyPortal, and I created a list of file/folder I wanted. But then it became a way to get the latest version of all thing.

manic glacierBOT
#

The Huffman code book for the translation is currently calculated with the translation and MP_QSTRs. However, I don't think they are actually used for QSTRs.

We can decrease the entropy a bit by calculating the codebook based only on the translation texts.

BOARD=feather_m0_express TRANSLATION=ja

(before) // 9342 bytes worth of translations compressed
↓↓↓
(after)  // 9149 bytes worth of translations compressed

BOARD=feather_m0_express

  • en: 8398 bytes β†’ 8239 bytes
    -...
#

This is ready for a fresh look! Instead of adding a special case I removed one, so it's sure to be right(-er) this time.

@tannewt Is this specific change (to check the type of the bus before checking its bus property) right? I assume it's right (because if it's, say an I2CDisplay then the content at that address is unrelated but also would never equal the spi_singleton) but if it's intentional I'd change it back and add a comment explaining it.

manic glacierBOT
ionic elk
#

The bdmicro_vina_m0 atmel-samd board is failing CI for me with just 76 bytes over. Probably had to do with me adding a new translation. Seems to me like no board should probably be that close without a little margin for error, but should I take something out or modify the translation somehow?

tulip sleet
#

@ionic elk I just fixed that yesterday, and gave it plenty more room; is this new?

ionic elk
#

Oh did you? I put in my PR on Friday so I probably just haven't merged it yet.

#

my b

manic glacierBOT
#

There aren't a lot of devices that need this -- the other one I knew about, AD9850, doesn't appear on an Adafruit breakout. The driver complexity in Sharp Display from this is nearly nonexistent. So the only reason to do this would be "completeness". If we decide LSB first is not important, breaking out the bits that bring bitbangio.SPI up to compatibility with busio.SPI would be nice though.

At this point, I don't have a vested interest in whether we merge this or close it.

manic glacierBOT
idle owl
lone axle
#

I think it's most likely that they need to update to the newest version of Adafruit_CircuitPython_HID

tidal kiln
#

@idle owl @lone axle yep. agree. most likely. i responded and will cover it.

idle owl
#

@tidal kiln Much appreciated!

manic glacierBOT
manic glacierBOT
manic glacierBOT
crimson ferry
#

sys.getsizeof would be really handy

idle wharf
#

Hey just a quick FYI on trying the native wifi branch from @slender iron's repo.
I successfully built and flashed the FeatherS2 and I could see the wifi module. Didn't see a Mac address nor did wifi.radio.start_scanning (not the right name) work. But I'm not sure I was doing it correctly and didn't spend much time looking at it.

On the Espressif WROVER, I couldn't get it to flash. I had a parameter error.

Anyway, nothing specific for anyone to act on, but I wanted to share the info in case it was a pattern someone else is seeing. I'll pull the branch and give it all another go tonight, be more methodical and take notes.

slender iron
#

thanks @idle wharf. I'll be poking it after lunch. splitting pulseio now

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

makes sense, thanks.

I debugged it a bit further, and:

  • there is a while (sd_flash_operation_status != SD_FLASH_OPERATION_IN_PROGRESS) {}... and code cannot exit this loop.
  • sd_flash_operation_status gets updated on SD_EVT_IRQHandler
  • but SD_EVT_IRQHandler is not being called after sd_flash_page_erase() is called. Not sure whether there is a race condition, or interrupts are masked

Might not be related to this bug, but seems to be safer to protect `sd_flash_oper...

crimson ferry
slender iron
#

looks

#

@crimson ferry this is a better place to ask implementation questions because the help-with channel is for more basic qs

#

OnDiskBitmap should use relatively little because it never loads the image into memory

#

it always fetches pixels from the disk to put them in the final bitmap portion that is output to the display

crimson ferry
#

does it continually fetch from disk on every refresh? if not, how can it be displayed without taking up enough memory for all the pixels and color depth?

slender iron
#

ya it does fetch every time. that's why it's slow

crimson ferry
#

wow, OK, but still I saw a big memory drop after exiting the with... I couldn't account for that

slender iron
#

ya, that seems weird did you gc.collect before doing gc.mem_free?

crimson ferry
#

no, did that a couple lines later after some clean-up and checked again and free mem was back up

slender iron
#

k, may be some intermediate memory then

crimson ferry
#

thanks, that helped

slender iron
#

np, Bitmap/OnDiskBitmap are really meant to be the two extremes

#

small in memory and fast vs large on disk and slow

slender iron
#

@silver tapir usb doesn't work for me either... I get a dmesg error saying cannot set config

manic glacierBOT
solar whale
#

@slender iron just finished soldering up a v3 soala feather adapter -- The QWIIC connector works!.. I had a real struggle getting the microusb connector soldered w/o shorts..... Thanks for creating the board -- it will make things a lot easier to test.

slender iron
#

great!

#

I always do usb first and use flux

solar whale
#

I used flux, but not enough I guess -- and definitely first next time!!

slender iron
#

πŸ™‚ practice helps too and you are well on your way

solar whale
#

Yes -- this was great practice. And a good test of patience and resilience

manic glacierBOT
solar whale
#

what is the purpose of the R/C parts you added?

slender iron
#

it's for the double tap to reset

#

(which I don't usually use yet)

solar whale
#

ah -- good.

manic glacierBOT
#

The code is very flexible about the output. It needs about 13.5K RAM for the internal tables, plus it defaults to a 4K output pixel buffer. This is to buffer as many MCUs as possible before sending to a display. You can tell it to only buffer one MCU at a time if you prefer. You can capture the pixels coming out and do with them as you please. It can generate RGB565 little or big-endian as well as 8-bit grayscale. If you have any questions, just ask.

manic glacierBOT
manic glacierBOT
thorny jay
#

Hi @onyx hinge I have now the FeatherWing for M0 and M4 (actually, I am a bit confused because there is a different bonnet for nRF52840... but that's fine).

@thorny jay I haven't used the 64x64 matrix. The code should support the 5 address lines A through E, but the existing featherwing for feather m4 express would need to be modified to actually bring the signal to the header.
@onyx hinge Would love to get your feedback if you try it

#

I have identified where the E should be. But I need to figure out what pin from the Feather are in use for the [RGB][12] and other [ABCD] and what pin am I left with to solder E to it. It seems easy, I just need to make an informed choice.

onyx hinge
#

@thorny jay I think that you are free to choose from any pin for the "address pins". Before committing, I would test that the RGBMatrix constructor will accept your chosen pin.

manic glacierBOT
onyx hinge
#

It's the RGB and LAT (I think?) pins that are highly restricted.

onyx hinge
#

This is the one part of the Arduino code where some knowledge of the underlying hardware is required. rgbPins[] and clockPin must all be on the same GPIO PORT peripheral (e.g. all PORTA, all PORTB, etc.). The other pins have no such restrictions

#

OK, so it's RGB and clock ...

prime cove
#

Is there a reference for which circuitpython features work on which hardware platforms e.g. the SAMD51(grand central) doesn't currently support RS485

thorny jay
#

@onyx hinge I added board.A1 and it did not complain. It did when height was still 32: "ValueError: 5 address pins and 6 rgb pins indicate a height of 64, not 32
" so there is a fair among of testing of the parameter. I guess now I need to solder that:
'''
matrix = rgbmatrix.RGBMatrix(
width=64, height=64, bit_depth=1,
rgb_pins=[board.D6, board.D5, board.D9, board.D11, board.D10, board.D12],
addr_pins=[board.A5, board.A4, board.A3, board.A2, board.A1],
clock_pin=board.D13, latch_pin=board.D0, output_enable_pin=board.D1)
'''

lone axle
#

If anyone finds themselves with a moment to spare today, I would be very grateful to get a quick review on this PR https://github.com/adafruit/Adafruit_CircuitPython_Display_Text/pull/88. This issue came from a recent change that was initially released yesterday, so it's only been in the bundle for 1 day I believe. But I do think it's likely going to be a relatively widespread issue so the sooner we can get the fix merged in the fewer people who will end up with the affected version of the library.

ivory yew
#

darn, I was gonna look but Jeff beat me to it. πŸ™‚

thorny jay
#

Hi @slender iron the recent discussion about rgbmatrix make me think about ESP32S2. If ESP32S2 is going to make a Feather, then choosing the pin so that it can respect the rgbmatrix constrain (to have various GPIO in the same register) would be great. It could even be better if the FeatherWing for M0+M4 or the FeatherWing for nRF52840 could work directly for the ESP32S2, that way there would be no need for yet another FeatherWing. I am clueless about the constain and if they would be the same for ESP32S2. But it would be sad not to verify if it will be possible before commiting to pin and pin usage? Cc: @onyx hinge

onyx hinge
#

It's above my pay grade @thorny jay

solar whale
onyx hinge
#

By which I mean, I'm not the one who makes such decisions. It's an idiom, intended to be humorous, and perhaps missed the mark

lone axle
#

Thank you Jeff and stargirl!

prime cove
#

@solar whale thank you, that was what I was looking for. RS485 settings are listed under the busio>uart documentation, but running them gave an unsupported error

onyx hinge
#

It looks like maybe esp32s2 and mimxrt10xx have at least some rs485 support, while samd, cxd56, nrf, stm do not. That's just based on quick searching within the source code and could be inaccurate.

prime cove
#

Thanks! Any idea why the samd does not? I believe it's supported in hardware, though even without it you just need to be able to toggle 1 or 2 GPIO pins and have a uart to get it to work with most interface chips.

manic glacierBOT
solar whale
prime cove
#

I suppose the best way for me to approach it would just be a wrapper class around the UART to handle DE and RE GPIO. I don't think being limited to 8 data bits is an issue; most 485 devices I've run into have configurable parameters or just use 8N1 or 8N2. Thank you for the help @solar whale and @onyx hinge

solar whale
#

good luck!

slender iron
#

@prime cove if you are comfortable in C you could expand the SAMD UART implementation

#

RS485 is a bit weird because its a specific form of a broader protocol (UART)

#

usually we have functionality enabled or disabled at the module level but this case is different

#

@thorny jay that's a good point! I'll chat with limor and philb about it

#

@onyx hinge want to chat CAN?

onyx hinge
#

@slender iron I'm around, if you want to go to voice or video you'll have to give me 5 though

slender iron
#

its a 405 feather

#

@onyx hinge that'll be easier and no rush

onyx hinge
#

OK I'll ping you back in a few

slender iron
#

k np

ionic elk
#

@slender iron I will check it out, thanks for the ping

slender iron
#

np, thank you

onyx hinge
#

@slender iron I'm back at my desk, do you want to DM-video, try one of the public voice chats (that didn't work well for us last time for some reason), or what?

slender iron
#

we can try amelia first

idle wharf
#

@slender iron @thorny jay I saw that thread about S2 Feather Pins...
Have you also mentioned this to @atomic summit ? I have his pre-release FeatherS2 and I know he's changed two pins in his production design.
https://unexpectedmaker.com/shop/feathers2-esp32-s2

onyx hinge
#

from pyb import CAN

while True:
    print("I am the receiver")
    can = CAN(1, CAN.NORMAL, prescaler=2, sjw=1, bs1=14, bs2=6, auto_restart=True)

    can.setfilter(0, CAN.LIST16, 0, (11, 12, 13, 14))

    while True:
            while can.any(0):
                _id, rtr, fmi, data = can.recv(0, timeout=10000)
                print(str(_id), '1' if rtr else '0', str(fmi), str(data), sep=',')
                #f.flush()
                data = int.from_bytes(data, 'little')

                print(_id, rtr, fmi, data)
thorny jay
#

In a package, I have an abstract class (the parent class) that should not be instanciated without overriding a function. Should I use @abstractmethod decorator and/or raise NotImplementedError() to indicate that? I may also want to have abstract @properties so that you cannot derive without defining (in my case width and height). I am really rusty on OO concept and their name... and clueless about the Python way of doing thing, and what exist in CircuitPython. Any hint is welcome. Or better, existing CP code that does that so that so that I can copycat.

#

For the record, I learned OO with Ada9X ... in a year where the value of X was still unknow. πŸ™‚

#

Ok, I am lost in slackoverflow... I will do a few test, and it is always possible to make comment on the PR. PM25 does use "raise NotImplementedError()".

slender iron
#

@thorny jay I think raising not implemented is the easiest way to do it

#

@onyx hinge can can messages be non-byte lengths?

onyx hinge
#

@slender iron not in micropython's implementation at any rate

slender iron
manic glacierBOT
onyx hinge
#

@slender iron I think the "id" is some number that the sender and receiver agree on, I guess it could be said to identify the sender's address..

slender iron
#

is that what the filter matches on?

onyx hinge
#

yup

slender iron
#

ah

manic glacierBOT
#

Thanks again for fixing this up @DavePutz.

I think the core issue here is that we don't actually need to run background tasks every second anymore because things are added to the queue as needed. So, we need to modify the idea of what OK is to account for stretches where no background stuff is needed. I've commented inline how to do this by making last_background_tick mean the tick when the oldest background task was queued.

Another approach to detecting when pulses come in too quickl...

onyx hinge
#

@slender iron the Data length code is a 4 bit number, and only values from 0 to 8 may be placed in it. so yes, the messages are always whole bytes. Not just as a matter of implementation.

idle wharf
#

Hey @slender iron I've been doing the testing I mentioned I'd do last night. I can't get my builds of Adafruit/main or your native_wifi branch to flash onto the Saola and boot CP.

At first they would only flash if i left off --no-stub from the esptool command. I then updated ESP-IDF and now that isn't an issue. I can use make BOARD=espressif_saola_1_wrover flash and the board successfully flashes.

BUT, it still does not boot to CP, mount the drive or show up in /dev/tty.* the output on the external USB (the one on the wrover board) is here: https://gist.github.com/askpatrickw/36be63d1b96fd57b043c0d0065c87af3
the last line is I (627) cpu_start: Starting scheduler on PRO CPU.

Worst part is nightly builds from S3 work. AND my builds for the FeatherS2 work. I'm stumped... Any suggestions?

manic glacierBOT
#

I wouldn't store the full decoded bitmap (aka all of the blocks) because it'll be one large allocation. If you store it at the decoded block level you have less memory overhead and more, smaller allocations. When evicting a block in favor of another the allocation can be reused then too.

ah ok thats fair. So you want to have the ability to use up possibly fragmented memory space by normally dealing with the blocks instead of a continuos bitmap block? Though is this really more me...

#

Hmm,
in CPython I do:
exc_type, exc_value, exc_traceback = sys.exc_info()
errorlines = traceback.format_exception(exc_type, exc_value, exc_traceback)
and this will give me what I want!
Somewhere inside CircuitPython there must be code which generates "errorlines".
And these "errorlines" are printed inside "sys.print_exception"
I am looking for a way to get to these "errorlines" without the need to print them!

slender iron
#

@idle wharf I'm not sure why CP isn't starting

#

but USB is definitely broken atm

#

gonna look into that right now

idle wharf
#

OK.. well that you are aware of a related issue makes me feel better. I'll wait and try later. tx !

slender iron
#

πŸ‘ keep an eye on the commits

manic glacierBOT
#

I would say it should be possible without violating the CPY philosophy. You would want to pass a displayio object to the JPEG library and have some functions in there to tell it where on the screen to draw the picture and possibly scale, color format etc.
The other use case would be with the GFX library where you might want to compose a framebuffer with the picture and not just draw it to the screen, I guess that might be the use case that Scott sees where you would have to handle it differe...

slender iron
#

do we have a way to check that we don't create a usb descriptor with too many endpoints?

onyx hinge
#

@slender iron no, I don't think so

#

When I did cleanup of some of the #ifs and makefile settings around USB configuration I think you mentioned it was a "would be nice"

#

is it what bit you this time?

slender iron
#

yup, I enabled MIDI

onyx hinge
#

ah

slender iron
#

and now it's disabled again πŸ™‚

onyx hinge
#

how would one check the number of supported endpoints? does tinyusb provide it as a macro or anything?

slender iron
#

no, I think we'd need a port setting or something

#

Β―_(ツ)_/Β―

#

I'm not going to worry about it now

manic glacierBOT
#

ah ok thats fair. So you want to have the ability to use up possibly fragmented memory space by normally dealing with the blocks instead of a continuos bitmap block? Though is this really more memory friendly given that you have to keep track of all these blocks?

Right. It's easier to allocate small blocks into fragmented memory instead of small ones. I don't know how big each block would be but I'd do it at the JPEG unit level.

Is it difficult to pass each block to the display rath...

#

If you are OK with it, I would be quite happy to get rid of all the tick
checking in the Pulsein code and just set
the self->errored_too_fast flag if the buffer overflows. An overwritten
buffer will not have valid data in any case.
I am not quite sure where to check the self->errored_too_fast flag and
raise an error though. Looking at the
library code for irremote and the dhts it looks like they are looping and
calling popleft() until the pulsein object has a zero
length. Maybe check & raise...

thorny jay
#

@idle owl For the PM25, maybe it would be more readable if I split the simple test into two copy, one purely I2C and one purely UART. Each will be more simple and not make unecessary include.

idle owl
#

@thorny jay I believe we'd like a self-contained simpletest specifically for the simpletest file. If you'd like to do something different as an I2C or UART example, that would be something we could consider.

#

I'm heading out for the night. I will reply to any further discussion tomorrow. Have a good rest of your day!

thorny jay
#

I have been overwelm by the number of comment and the interface of GitHub to resolve that. I hope I did not mess too much, I did everything "online".

#

Ok, I think I fixed everything.

idle owl
#

@thorny jay You didn't mess anything up, it's simply little tweaky things the doc rendering needs.

thorny jay
#

Doc, I need to check your Sphynx thing. Have a good night.

manic glacierBOT
#

Circumventing displayio to talk with the display directly would break down whenever you have something about the image like text because the composition is done MCU side, not on the display itself.

Sure! Thats why I thought it might be nice to have both ways. Either decode JPEG into bitmap and do composition with other elements or if you just want to draw it on the screen directly you can do that too by passing the decoder the displayio object to write to
For the case where f.e. you hav...

slender iron
#

just pushed a new native_wifi with fixed usb

idle wharf
#

@slender iron Awesome! I’ll check it out tonight. First up. Go Flyers! (Hockey sport ball)

slender iron
#

πŸ˜„

#

πŸ’

manic glacierBOT
turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Region

us-west

Channel Categories

8

Text Channels

54

Voice Channels

6

Members

24652

Roles

34

manic glacierBOT
thorny jay
#

@idle owl maybe this issue will be interesting for you. I wanted to run the Pedometer learn guide https://learn.adafruit.com/clue-step-counter-st-lsm6ds33 on the CLUE. But the step count was missing from the library. Now the library https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS has been fixed and splitted from library to package. So I wanted to manually do things... but now I discover that the CLUE library also used LSM6DS and so will fail as soon as it is release: https://github.com/adafruit/Adafruit_CircuitPython_Clue . This is where I give up (for the moment?)! There is some library dependancy and release management that will be required. Possibly, a lot of CLUE related learn guide will stop working when any of those two library change. Maybe there is a way to smooth the transition, like having two different library, the old one, and the package. And not remove the old one until a lot of things have been migrated.

Adafruit Learning System

Clue into your daily step count!

thorny jay
#

I did give a "try" and catching import error, but I don't find a way with "import" "from" "as" to make the package look like the library or the library look like the package. It might be possible, but I failled. If there is a solution, then I am interested for PM25 and IS31FL3731, as the same kind of thing take place there.

onyx hinge
#

hm I have to remember how to connect to the debug interface on the SAM E54..

manic glacierBOT
slender iron
#

I'm on a roll

manic glacierBOT
slender iron
tulip sleet
#

@slender iron are you declaring all functions in .h files as extern now, for gcc10? I thought you were doing that for globals, but not necessarily functions. I think extern is the default for non-static functions.

slender iron
#

Β―_(ツ)_/Β―

#

whatever the compiler complains about

tulip sleet
#

Use of extern with C functions:- By default, the declaration and definition of a C function have β€œextern” prepended with them. It means even though we don’t use extern with the declaration/definition of C functions, it is present there. For example, when we write.

slender iron
#

variables and types I think

tulip sleet
#

I see stuff like that a bunch of places. ... OK, I just did a merge and a bunch of extern's were added

slender iron
#

to functions?

tulip sleet
#

yes, in _bleio

slender iron
#

definitely have been adding them. not sure where

#

but I've been chasing compiler complaints so they must be needed

tulip sleet
#

so the point is it's not necessary for functions, but is necessary for globals. On the other hand, it's a lot easier to be consistent.

#

i have NOT tried to build with gcc10 yet. I'll take another look. I just wanted to know if you had made a deliberate decision. tnx

slender iron
#

πŸ™‚

manic glacierBOT
orchid basinBOT
thorny jay
#

anyone want to help test led matrix improvements here: https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731/pull/32 ?
Thanks @slender iron Actually, I tested all the driver with my hardware. It give strange result as they don't use the same height and width, but the strange result are consistant (I should video record the original output and the new output, but mostly that part is unmodified). My last fight was with the documentation and how the documentation of package should be done. Some library only list one file: https://github.com/adafruit/Adafruit_CircuitPython_LSM6DS/blob/master/docs/api.rst where other list multiple: https://github.com/adafruit/Adafruit_CircuitPython_CircuitPlayground/blob/main/docs/api.rst . I don't really know how to see the output of Sphynx to see the result, so I made blind change.

slender iron
#

ah, ok great!

solar whale
#

I keep running into this -- is there something "different" about the protomater submodule? or is it this PR -- I don't see this with other PRs ```[Jerry-desktop-mini:/Volumes/CircuitPythonBuild/circuitpython] jerryneedell% git fetch origin pull/3237/head:pr_3237_test
remote: Enumerating objects: 49, done.
remote: Counting objects: 100% (49/49), done.
remote: Total 62 (delta 49), reused 49 (delta 49), pack-reused 13
Unpacking objects: 100% (62/62), done.
From https://github.com/adafruit/circuitpython

  • [new ref] refs/pull/3237/head -> pr_3237_test
    Fetching submodule lib/protomatter
    fatal: remote error: upload-pack: not our ref 2408e9c033f5ec050967b1592b29a950a831d6c2
    fatal: the remote end hung up unexpectedly
#

If I repeat the command -- it does not complain and the branch exists ....

idle owl
#

@thorny jay We are supposed to keep up with changes like those. The appropriate thing to do is file an issue on the library with the dependency failure (so in this case CLUE), and mention it needs to be updated. This sort of thing will happen, and exactly like we have to update guides associated with particular libraries when we make breaking changes to a lib, we should be updating libs using other libs when we change the lib. Adding a way to have different versions of a library is not a good solution, it will lead to confusion and support issues.

onyx hinge
#

@solar whale I wish I knew

#

that PR has unintentionally modified the ref of lib/protomatter multiple times. As far as I can tell, the ref 2408e... was the ref of lib/protomatter during one of the intermediate commits but not at the tip of 3237's branch.

solar whale
#

I think I'll just wait for the PR to be merged ...

onyx hinge
#

if you want to do testing you can pick up uf2s from the PR's actions .. do you know how to do that already?

#

.. we love it when you do testing

solar whale
#

yes -- good idea.

onyx hinge
#

I wish I could figure out what types things into the REPL of every circuitpython board I plug in. I've removed modem manager. I've failed to identify anything else udev or systemd would be "running on" the device. But I always get some characters repeated back (slightly munged) from the boot-up messages into the REPL. "D Ado-reload is o"

#

"oh linux, you try so hard"

#

The spew actually occurs when I open the terminal device, whether or not it's a traditional terminal program

#

e.g., true < /dev/ttyACM4

onyx hinge
#

does this happen to anyone else?

mental nexus
#

I get β€œKeyboard Interrupt” randomly and gibberish on the REPL input after I leave a board alone for a while and work on the computer (older iMac). Some random USB signals that check in on devices on the bus? But if doesn’t sound like what you’re getting.

onyx hinge
#

@slender iron what do you think of "Listener" vs "Queue" vs "Receiver"?

#

I kinda like CAN.listen() -> Listener

slender iron
#

@onyx hinge fine with me

onyx hinge
#

What if .next() raises StopIteration in the case of timeout? That would let you process messages until there's a gap of 'timeout' between messages.

slender iron
#

you'd need to re-listen then

#

which could be ok

onyx hinge
#

oh, that permanently makes t he object not iterable anymore?

#

if Listener.__iter__() returns self, and Listener.next() raises StopIteration for timeout, couldn't you repeatedly loop on the same listener?

slender iron
#

ya, I suppose

onyx hinge
#

This is the structure I'm imagining, but maybe it is not good structure:while True: for message in listener: process message do other stuff when gap in messages

#
    NORMAL = auto()
    LOOPBACK = auto()
    SILENT = auto()
    LOOPBACK_SILENT = auto()``` should this be one enum, or 2 bools?  "silent" and "loopback" as bool properties
#

(and "silent" is the same as not giving a TX pin, ... I think ?)

slender iron
#

the alternative is:

#
for message in listener:
  if not message:
    print("timeout")
    continue
  # process message
#

two bools seems better to me

#

easier to document too

onyx hinge
#
    if message is None:
        do other stuff when gap in messages
        continue
    process message
#

(yeah I just said the same thing as you)

slender iron
#

I don't expect the "do other stuff when a gap" is useful

#

because a time out is the end of a gap potentially

onyx hinge
#

then what would you write inside 'if message is None:' -- just continue? break? sleep(1); continue?

slender iron
#

true, if you have nothing to do then you don't need to set a time out

#

"do other stuff" would probably do before the if

onyx hinge
#

oh if you set timeout=0 or timeout=None (whichever is standard circuitpython?) then you'd never get a None return so you don't have to deal with it?

slender iron
#

right, instead of using stopiteration on timeout

onyx hinge
#

I'll keep thinking about this, but now it's closing in on pizza making time

#

I do appreciate having your slightly revised doc to work from

slender iron
#

cool cool. pizza sounds good!

#

we have tons of squash and green beans to eat...

onyx hinge
#

so much squash here

#

beans haven't started, somehow

manic glacierBOT
#

Made changes to remove relying on ticks to decide if pulsein is taking too long. It will now raise an error when the call to popleft() is made. If uncaught this will result in a stack such as:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "test2_ir.py", line 18, in <module>
  File "test2_ir.py", line 13, in <module>
  File "adafruit_irremote.py", line 243, in read_pulses
  File "adafruit_irremote.py", line 206, in _read_pulses_non_blocking

Or...

idle wharf
#

My guess is "because memory"... but I'm curious why CP doesn't implement .__dict__ on objects. In Python its one of my favorite hacky ways to figure out what I'm doing.

onyx hinge
#

could you fake it? Something like (untested / incomplete) ```class DictProxy:
def init(self, obj):
self.obj = obj

def __getitem__(self, idx):
    return getattr(self.obj, ix)

def __setitem__(self, idx, value):
    return setattr(self.obj, idx, value)

# etc
manic glacierBOT
idle wharf
#

BTW WIFI is working on my Espressif ESP32-S2 Saolo as advertised !

(sysname='esp32s2', nodename='esp32s2', release='5.0.0', version='5.0.0-beta.0-2632-g80b15f6b3-dirty on 2020-08-19', machine='Saola 1 w/Wrover with ESP32S2')
Start Scan
        SSID: Jenga
        SSID: henther
        SSID: xfinitywifi
        SSID: xfinitywifi
        SSID: PS4-FDBC7527F6EA
        SSID: FBI_Van
        SSID: MOTO4ACA
        SSID: ARRIS-E5AD
        SSID: WaveG Public WiFi
        SSID: TP-LINK_3D37
        SSID: INTRANET
        SSID: xfinitywifi
        SSID: xfinitywifi
        SSID: The_GreenDragon
        SSID: Pawnee Commons Wifi
        SSID: KeepYourWifiInLine
Scan Completed
WIFI Connected: True
IP: 192.168.1.27
GoogleDNS Ping Response: 0.008
#

@onyx hinge I code more procedurally (linerally?) whatever the word is, so I would tend to try and make a function. Are you saying, I could define a class and that class would take an object and return the same object with an added property of .__dict__ ?

manic glacierBOT
idle wharf
#

WiFi also working on the FeatherS2 as advertised...

(sysname='esp32s2', nodename='esp32s2', release='5.0.0', version='5.0.0-beta.0-2570-gd615cc9fd on 2020-08-19', machine='FeatherS2 with ESP32S2')
Start Scan
        SSID: henther
        SSID: FBI_Van
        SSID: Turn On, Tune In, Drop Out
        SSID: WaveG Public WiFi
        SSID: TP-LINK_3D37
        SSID: INTRANET
        SSID: xfinitywifi
        SSID: comcast-gw-sea-guest
        SSID: comcast-gw-sea-2g
        SSID: Crouton
        SSID: The_GreenDragon
        SSID: Pawnee Commons Wifi
        SSID: Ko_Olina
        SSID: JP
        SSID: Medialink_1E7250
        SSID: xkcd910
        SSID: Smartypants
Scan Completed
WIFI Connected: True
IP: 192.168.1.28
GoogleDNS Ping Response: 0.013
#

@onyx hinge I guess I should add... I know I could make it happen like you mention. I was curious as to the thought behind not including it.

onyx hinge
#

I think you'd have to ask around at Micropython, it seems to be a decision made pre-circuitpython. Probably "it's not needed, it constraints implementation choices, leave it out". Except there also seems to be an option for a read-only or copy __dict__ property in the source of circuitpython. curious.

idle wharf
#

There is a nice little example though in the linked issue which is still open. I tried this on my FeatherS2.

print(dir(wifi.radio))

for p in dir(wifi.radio):
    val = getattr(wifi.radio, p)
    print(p, val, type(val))

Output

['__class__', 'connect', 'enabled', 'ipv4_address', 'mac_address', 'ping', 'start_scanning_networks', 'stop_scanning_networks']

__class__ <class 'Radio'> <class 'type'>
connect <bound_method> <class 'bound_method'>
enabled True <class 'bool'>
ipv4_address 192.168.1.28 <class 'Address'>
mac_address None <class 'NoneType'>
ping <bound_method> <class 'bound_method'>
start_scanning_networks <bound_method> <class 'bound_method'>
stop_scanning_networks <bound_method> <class 'bound_method'>
#

Anyway, fun stuff to research. Thanks @onyx hinge !

manic glacierBOT
#

I have this code running on a PyPortal:

import board
from adafruit_pyportal import PyPortal

# Set a data source URL
IMAGE_URL = "http://192.168.1.109:8000/image_compressed2.bmp"
TEXT_URL = "http://192.168.1.109:8000/test.txt"

# Create the PyPortal object
pyportal = PyPortal(
#    url=TEXT_URL,
#    image_url_path=IMAGE_URL,
    status_neopixel=board.NEOPIXEL,
    debug=True,
#    convert_image=False
)

pyportal.set_background(0xFF00FF)

# Go get that data
# pr...
manic glacierBOT
thorny jay
lone axle
#

I just made a script that searched learn guide repo for projects using a specified library last week. I think it could help with that

thorny jay
#

With library restructuration into package, the import and/or usage is different. I will trigger that problem in PM25 and in IS31FL3731 ... so I am pretty much interested into detecting cascade effect of such change.

lone axle
#

My script is in this issue: https://github.com/adafruit/Adafruit_Learning_System_Guides/issues/1209 when run inside the learn guide repo it will search for all projects that contain python files and then search all of those python files for adafruit_button in my case, but could be modified to any other library, Or could also search for constructor use or something beyond the import statement if desired.

frosty prairie
lone axle
#

@frosty prairie the #help-with-circuitpython channel is probably the best place for this since it's not related to development of the project. It is fine to ask about questions micropython, but I will say there is likely a lot more experience with Circuit Python specifically than with Micropython amongst the community. So it may take a bit longer and be harder to get micropython specific things answered.

manic glacierBOT
#

Adds _bleio support for UART-based HCI adapters. Tested with ESP32 firmware on Metro M4 Airlift and with an ESP32 breakout. Firmware used is attached to this PR.

This version supports operation as a peripheral only. Specifically it has been tested with UARTService, using the Bluefruit LE Connect app. Scanning, initiating a connection, access to remote characteristics, and bonding/pairing are not yet implemented. Code to be rewritten is commented out and mostly marked as //FIX.

The...

thorny jay
#

Hi @gilded cradle I have split into separate files the library IS31FL3731. So now I have copyright statement for each separate board. So I would like to know the board you added to the library, and those already present and done by Tony DiCola. I have the feeling you worked on the Bonnet because those imply Blinka work to implement on Raspberry Pi. I'll try to check the GitHub history, but with major rework like black or pylint, it is hard to use blame and know what lines are coming from you. My PR is here: https://github.com/adafruit/Adafruit_CircuitPython_IS31FL3731/pull/32

slender iron
#

anyone want to do a release today?

gilded cradle
#

@thorny jay I think I just worked on improving overall functionality, so I'm not particular how you split it up.

thorny jay
#

It is split by board. I keep both of your name in every file, except the two Pimoroni board I added to the library.

gilded cradle
#

Sounds good

thorny jay
#

@stoic parrotMelissa If I want to write a library to support Pimoroni 16x16 Unicorn Hat HD, should I use framebufferio like you do for matrix LED? I am a bit confuse between the framebuf, the pixelbuf and maybe other.

gilded cradle
#

I'm not sure how that's setup hardware-wise. I believe that's for the Pi and there currently is no PyPixelBuf for the Blinka. I would think it would be neopixels though.

thorny jay
#

I think I need a big buffer because what Pimoroni does is to use numpy and basically it is SPI transfer of the buffer.

orchid basinBOT
gilded cradle
#

ok, maybe use the neopixel spi library then

thorny jay
#

No it is not neopixel. And yes, it's for the Pi but the goal is to use that from a Feather.

manic glacierBOT
#

The second example might be a bit misleading. In order to test and hit the
error I created a
PulseIn object with a buffer that was intentionally too small. So, to
correct and keep
going I re-created one with a large enough buffer. If buffer size was not
the problem you
could do something like:
pulsein.pause()
pulsein.clear()
pulsein.resume(100)

On Fri, Aug 21, 2020 at 2:37 AM Radomir Dopieralski <
notifications@github.com> wrote:

Looking at the second example, pe...

thorny jay
#

I have already used the neopixel library for Unicorn pHAT (4x8) and Unicorn HAT (16x16). But I made no driver no nothing as the code from Adafruit is sufficient... except if I could use the fact that the geometry is know to better handle the matrix.

#

But the Unicorn HAT HD does not use NeoPixel nor DotStar, they use normal RGB LED (non addressable) and they have their own electronic to drive that. So they implement an SPI protocol that I need to implement in Circuit Python.

gilded cradle
#

Sounds like it's similar to an RGB panel which we don't have support for yet

thorny jay
#

So it pretty much look like RGB matrix for which there is support in CircuitPython: "RGB LED Matrices with CircuitPython". When you say "we don't have support for yet" you mean in Blinka? I am not really interested in the Pi or SBC. I am interested in driving Pi hardware from an MCU.

#

They even have Ubercorn and you can daisy chain those one behind the other to make larger board.

gilded cradle
#

Yes, I meant Blinka. I thought that's what you were referring to since you said it's a HAT.

thorny jay
#

Maybe you have not seen the stuff I have done so far. From an MCU (Clue or Feather) I controled: Blink! + Scroll pHAT HD + LED Shim + Unicorn pHAT + Unicorn HAT + the RGB LED and segment LED of the Rainbow HAT.

#

I am pretty sure all of those would also work on a Pi... I mean on a Pi with Blinka and CircuitPython.

#

But that is not really very interesting as Pimoroni already provide Python Library.

gilded cradle
thorny jay
#

Ok, I'll try to understand the framebufferio that seems to be used. The goal is to be able to use DisplayIO and all the other stuff on top. So I need to provide the right API so that it is transparent.

#

I hope to have it all in Python as I don't want to go into the "firmware".

gilded cradle
#

Yeah, I understand.

slender iron
manic glacierBOT
idle owl
#

@slender iron Can you file an issue and assign it to me on the TC74 repo? The docs aren't working, Actions isn't setup, there's a lot of other things doing on. PyPI should happen automatically once all of that is working.

slender iron
#

yup! thank you!

idle owl
#

@slender iron PyPI creds do not need to be added. They're global now. It's everything else that needs to happen.

slender iron
#

haha, ok. that's why I'm not doing it. I'm behind the times

idle owl
#

@slender iron For the community bundle, do we recommend running cookiecutter and so on before submitting?

#

The few I checked have our CoC in them, so I assume it was run on those. But I didn't check all of them.

slender iron
#

ya, I think it's a good idea

#

not a requirement though

#

I think my sharing guide recommends it

idle owl
#

Alright, that's exactly what I was about to say to someone. But second guessed it. Thanks.

slender iron
#

np, thank you

manic glacierBOT
#

When hitting CTRL-C during the long output described in issue 2689 the pending exception was never being cleared.
As a result; in displayio_background() the call to mp_hal_is_interrupted() would always return true and the displayio screen would stop being updated. This patch simply clears any pending exceptions when readline_init() is called (i.e. when the REPL prompt is being printed).

simple pulsar
#

Are there any known issues with using PWMOut after AnalogIn on a pin (with deinit()) on an nRF52840 based board like the CLUE? It doesn't seem to work for me.

manic glacierBOT
#

This example is from a CLUE running 5.3.0

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit CLUE nRF52840 Express with nRF52840
>>> import pulseio, board
>>> p0out = pulseio.PWMOut(board.P0, frequency=50, duty_cycle=0, variable_frequency=True)
>>> p0out.duty_cycle = 32768  ### good
>>>
>>>
soft reboot

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
Traceback (most ...
idle owl
slender iron
#

yup

idle owl
#

Thanks.

#

@slender iron Ok, RTD is set up, Actions is running properly, and it's uploaded to PyPI.

slender iron
#

thank you!

silver tapir
#

The string itself is a line of text, the \n, and then 37 spaces, and then the second line. Not sure if the spaces belong there, can someone please confirm?

spice crypt
#

I'm facing a very difficult bug (I think), with I2CPeripheral. Most packets I intend to send are fine, but there are some combinations that will refuse to send with r.write()

This fails to send: 0xa8, 0x2f
Saleae logic output:
Setup Write to [0x0B] + ACK
0x14 + ACK
Setup Read to [0x0B] + ACK
<blank>

This sends fine: 0x67, 0x30
Saleae logic output:
Setup Write to [0x0B] + ACK
0x14 + ACK
Setup Read to [0x0B] + ACK
0x67 + ACK
0x30 + NAK

spice crypt
#

To expand on my i2cperipheral problem above, the ranges of ints that send are separated by a span of 128.
0-127 -> Can send
128-254 -> Cannot send
255-511 -> Can send
etc.

#

Perhaps just a quick question. What function can I use in the C source files to be able to log to the REPL for troubleshooting purposes?

#

BTW, I've tried v4.3.1, v5.3.1, and latest v6, as well as on M0, and M4

manic glacierBOT
#

Revisiting this, I skimmed over the fact that the original repro steps for this were as simple as "try to write to the Circuitpython drive twice in a row". That definitely isn't happening anymore, at least not under any kind of regular conditions. We had several instances where memory corruption errors relating to dereferenced pointers were fixed earlier this year, I'd expect this was resolved with one of them.

@siddacious sorry I didn't get on this faster way back when it was still relev...

spice crypt
#

Reproducible code:

import board
from i2cslave import I2CSlave

regs = [0] * 16
index = 0
reg_check = 0

while True:
with I2CSlave(board.SCL, board.SDA, (0x0b, 0x41)) as slave:
while True:
r = slave.request()
if not r:
# Maybe do some housekeeping
continue
with r: # Closes the transfer if necessary by sending a NACK or feeding the master dummy bytes
if r.address == 0x0b:
print("address 0x0b")
if not r.is_read: # Master write which is Slave read
b = r.read(1)
# if not b or b[0] > 15:
# break
index = b[0]
b = r.read(1)
if b:
regs[index] = b[0]
elif r.is_restart: # Combined transfer: This is the Master read message
print("Restart")
n = r.write(int.to_bytes(reg_check,2,'little')) #FAILS TO WRITE PACKETS AFTER 127
reg_check +=1
#else:
# A read transfer is not supported in this example
# If the Master tries, it will get 0xff byte(s) by the ctx manager (r.close())

manic glacierBOT
#

On the main branch, the Meowbit encounters an issue related to SysTick->CTRL at startup during clock configuration, and unexpectedly enters the reset handler before any code can execute. Not yet confirmed whether this occurs across all F401 boards or potentially the rest of the access line.

Tested with code starting at the default address, so the issue is known to not be related to the Meowbit bootloader.

spice crypt
#

I see it's getting stuck on the following in: ports/atmel-samd/common-hal/i2cslave/I2CSlave.c

if (!self->sercom->I2CS.INTFLAG.bit.DRDY) { return 4; //changed this to return 4 for debugging }

manic glacierBOT
#

Issue
Peripheral fails to send bytes when of certain range, spaced out by 128.
0-127 -> Can send
128-254 -> Cannot send
255-511 -> Can send
etc.

Hardware/Software
Have tried on a GrandCentral M4, and Trinket M0, same results. I've tried v4.3.1, v5.3.1, and latest v6.

Observations

  • The span at which the transfers take place and do not are 128 bytes apart
  • Changing to big endian bytes seems to alleviate the problem (at least in the low integer ranges, need to go fu...
slender iron
#

@spice crypt to print to serial from C do mp_printf(&mp_plat_print, <regular printf args>);

manic glacierBOT
silver tapir
#

I only have a Saola wrover, and not a wroom. Are they physically the similar?
I want to know if I can use the image that illustrates the wrover in the downloads page, as the image for the wrover.

mental nexus
#

My PR is failing for "Test Documentation Build"

/opt/hostedtoolcache/Python/3.8.5/x64/lib/python3.8/site-packages/autoapi/extension.py:133: RemovedInAutoAPI2Warning: autoapi_template_dir will be expected to be  relative to conf.py instead of relative to where sphinx-build is run
344

345
  warnings.warn(
346
/opt/hostedtoolcache/Python/3.8.5/x64/lib/python3.8/site-packages/recommonmark/parser.py:75: UserWarning: Container node skipped: type=document
347
  warn("Container node skipped: type={0}".format(mdnode.t))
348

349
Warning, treated as error:
350
/home/runner/work/circuitpython/circuitpython/shared-bindings/_typing/index.rst:59:duplicate object description of _typing.ReadableBuffer, other instance in shared-bindings/_typing/index, use :noindex: for one of them
351
##[error]Process completed with exit code 2.
#

I suspect it's something to do with the documentation but I'm struggling to figure out where is the issue in my code.

#

Any hints on how to decode the error message?

#

Oh, no! Just realized I have 41 files changed.. Ugh!

thorny jay
#

You have to locally install Sphynx and see the result there.

#

I only have a Saola wrover, and not a wroom. Are they physically the similar?
I want to know if I can use the image that illustrates the wrover in the downloads page, as the image for the wrover.
@silver tapir I want to know which one to order to closely follow the streaming... I guess I need the wroom. Just one need a physical antenna added to the tiny coaxial connector.

silver tapir
#

Correct.

raven canopy
#

@mental nexus with the new stubs and AutoAPI, its a little esoteric to find some problems. I think I've found the issue; will comment on your PR if it pans out.

mental nexus
#

Thanks @raven canopy I appreciate any help.

manic glacierBOT
#

The Sphinx build error is related to the formatting here. For multi-line descriptions on rST parameter fields, you have to use a hanging indent. I got the docs to build successfully by updating to the following:

//|         :param int x: Horizontal pixel location in bitmap where source_bitmap upper-left
//|                       corner will be placed
//|         :param int y: Vertical pixel location in bitmap where source_bitmap upper-left
//|                       corner will be pla...
crimson ferry
#

@thorny jay The Saola Wrover has the 2MB PSRAM, same price.

#

@silver tapir I think the only difference is inside the module, and the wording on the module.

#

(wroom left; wrover right)

#

and of course the "I" variants have the IPEX antenna connector and bypass the onboard antenna via different resistor placement

onyx hinge
#

@silver tapir If it's the string I'm thinking of, I asked @ionic elk about it, but it was a comment on a merged PR so I don't know if it'll get attention. Someone should simply fix it in the source.

manic glacierBOT
mental nexus
#

@raven canopy Thanks for the help with the corrections on the Sphinx documentation!

manic glacierBOT
lone axle
#

It looks like we might be subject to a new pylint check raise-missing-from

#

The newest CI actions are showing that they installed pylint version 2.6.0. The most recent actions that succeeded were 2.5.3

manic glacierBOT
lone axle
ivory yew
#

maybe a long shot, but since y'all have deal with tinyusb a lot: I've added tinyusb to my usb firmware - I got it to enumerate, but I can't seem to get it to send or receive usb midi data. :/

#

Any ideas?

ivory yew
#

nvm, I got it figured out. I had the clocks wrong.

thorny jay
#

I don't know who need to do what, but it would be great to release a new version of the CLUE library ( https://github.com/adafruit/Adafruit_CircuitPython_CLUE ) now that it contain a fix for the breaking change in adafruit_lsm6ds that is available in bundle "adafruit-circuitpython-bundle-6.x-mpy-20200821". So if next bundle could fix it, it will make the live of CLUE owner (Adabox) more fun. For support, right now they can stick with "adafruit-circuitpython-bundle-6.x-mpy-20200820" or earlier but not use the Pedometer example.

craggy galleon
#

Hey @tulip sleet how do you calculate the report_length in a USB HID Report descriptor?

craggy galleon
#

I think I worked it out after a bit of investigation. A high-level formula could be:
SUM OF (REPORT_SIZE * REPORT_COUNT) IN HID REPORT DESCRIPTOR

lone axle
#

Thanks @thorny jay I just made a new release for it that includes the latest fix.

thorny jay
#

Thanks to you. I have been frustrated that no Release Management was taken so that both lib with one relying on the other were not released simultaneously. I have not fix all of the Learn guide sample I found, but I made a few PR left and right, and except for the pedometer on CLUE, the other one are "blind change" based on the syntax change introduced (and only tested on one). So there is still a little bit of change to do. Most of those guide I cannot test, like Ukulele or what not. So I guess the author are best placed to check that.

manic glacierBOT
#

ok this loaded onto my saola but i cant seem to get displayio demo on oled running

import board
import busio
import displayio
import adafruit_displayio_ssd1306
displayio.release_displays()

print(dir(board))
i2c = busio.I2C(board.IO8, board.IO9)
display_bus = displayio.I2CDisplay(i2c, device_address=0x3d)
display = adafruit_displayio_ssd1306.SSD1306(display_bus, width=128, height=64)

->

13:31:29.471 -> I (862) cpu_start: Starting scheduler on PRO CPU.[...
manic glacierBOT
#

The code itself is a bit beyond me still, so I can't offer up much feedback on that. I'm gaining a better understanding all the time, and looking over code like this is definitely helping.

The results are great though! I tested this out on PyGamer and Wio Terminal with this test script that copies a 16x16 blinka bmp and fills the screen with it:

import displayio
import board
import time
import adafruit_imageload
display = board.DISPLAY

def py_blit(target_bmp, target_x...
manic glacierBOT
#

Is there any progress on this behind the scenes? I would also really like to see this happen in CPY. I think especially with the ESP32-S2 coming along you will absolutely need this for networking.
In my experience working with a lot of art students at my day job over the years, events are the easiest concept to understand as it is just a function thats being "called for you" but the asyncio way seems also fine to me albeit it needing a bit more things to understand and take care of but espec...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Yes, here it is, running on a Trinket M0. Even between the TrinketM0, and GrandCentralM4 alone, it fails to transfer.

import busio
from board import *
from adafruit_bus_device.i2c_device import I2CDevice
import time

with busio.I2C(SCL, SDA) as i2c:
    device = I2CDevice(i2c, 0x0b)
    bytes_read = bytearray(2)
    while True:
        try:
            with device:
                device.readinto(bytes_read)
        except:
            print("ERROR")
        else:
     ...
manic glacierBOT
lone axle
#

Is there some sort of change in a build/CI file somewhere when a library changes from being a single file to being a directory with multiple files inside? in order to get the PyPi uploading / installing to work properly specifically.

manic glacierBOT
lone axle
#

ah yes packages vs. py_modules in the setup.py file.

manic glacierBOT
#

Hello, and thanks!

I'd like to understand a bit better what is happening here, so please bear with me.

When ctrl-c is pressed and this bug occurs, I assume that (on serial) it just prints the ">>>" prompt, and not an exception? (in contrast to the interruption of a long-running calculation, say)

What type/value does mp_pending_exception have when this code is reached? Superficially, it looks like just after the call to readline_init, the call to readline_process_char will call `...

manic glacierBOT
manic glacierBOT
#

Tests show that the pending exception is, in fact, an mp_kbd_exception. The code quoted is in mp_hal_delay_ms(), and there are no
calls to sleep() to hit in the example test. Interestingly, issuing a time.sleep(1) from the serial REPL prompt does clear the exception and the screen display resumes. I don't see any code in mp_hal_stdin_rx_chr() that looks like it would be clearing the exception.

manic glacierBOT
thorny jay
#

It looks like we might be subject to a new pylint check raise-missing-from
@lone axle Ok, now I understand what you mean. I made a minor unrelated change to a PR that was passing and now it is block on that pylint check. What should I do? (1) try to install pylint 2.6.0 on my side and make it happy? (2) make pylint ignore that line in my code? (3) change the pylint configuration to say it can ignore that (maybe that should be global thing for all the library)?

manic glacierBOT
lone axle
#

@thorny jay I think the solution that pylint is looking for is to use from keyword when raising an exception from another one. In the case that I found we were catching a RuntimeError and re-raising it with a more helpful message. Using from like this got pylint to stop complaining:

   except RuntimeError as run_error:
       raise RuntimeError("Text length exceeds max_glyphs") from run_error

note the as run_error and then from run_error

thorny jay
#

I used (3) by changing the rc file.

lone axle
#

I think it would be best if we do go ahead and use the from keyword syntax. I was unfamiliar with it before running into this pylint check. But it does seem like a positive thing. It can make the stacktraces a bit more detailed.

manic glacierBOT
#

I appear to have pasted alternate-universe contents of mp_hal_stdin_rx_chr. I apologize for the confusion.

Specifically, I appear to have been referring to a branch I haven't pushed, which was intended to fix the problem that during a call to input() or stdin.read(), ctrl-c did not raise a KeyboardInterrupt until some other char is pressed. I wrote the code I pasted and haven't gotten around to testing it.

#

5.6kohm, then tried stronger for sharper edges but didn't help. I think I know the cause of the problem, but not the mitigation yet.

When the 2-byte data packet to be transferred has a leading 1 in the first byte. Ex. 1000 0000 0000 0000, the SDA/SCL clock edge timing may just too tight, and cause the i2c peripheral to conk out.

I'm hoping there are some registers I can adjust to relax the timing. From what I've read, this may be under ASF4?

Here's a scope capture.
![good_vs_bad_t...

onyx hinge
#

@lone axle I think 'raise ... from' may not be supported in circuitpython. there's a test that is not run related to it: tests/run-tests: skip_tests.add('basics/exception_chain.py') # raise from is not supported

#

did you find otherwise?

#

oh, maybe it is. if so, nice!

#
Traceback (most recent call last):
  File "zde.py", line 2, in <module>
    1/0
ZeroDivisionError: division by zero

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "zde.py", line 4, in <module>
    raise RuntimeError("ouch") from e
RuntimeError: ouch
jepler@babs:~$ src/circuitpython/ports/unix/micropython zde.py 
Warning: exception chaining not supported
Traceback (most recent call last):
  File "zde.py", line 4, in <module>
  File "zde.py", line 4, in <module>
RuntimeError: ouch
``` sort of
#

so it'd be an improvement on blinka and a graceful degradation on circuitpython

lone axle
#

I can double check on it. We put it into the display_text library to resolve the pylint issue. I thought it was working as intented, but maybe I didn't take a close enough look.

onyx hinge
#

πŸ‘

#
>>> 
paste mode; Ctrl-C to cancel, Ctrl-D to finish
=== try:
===     raise Exception from None
=== except Exception:
===     print("Caught Exception")
=== 
Caught Exception
#

Looks like we should be good to go, sorry for raising an alarm unnecessarily.

lone axle
#

No worries

#

much prefer false alarm to having already broken something πŸ˜†

#

Unrelated to that specific error, but I wonder if it's worthwhile for us to target a specific version of PyPlint within the CI system so that we aren't taken by surprise when a new release drops and starts checking for new things.

onyx hinge
#

I'd check with Kattni, I think she had opinions. There are downsides both to being stuck on old versions, and to getting new versions without warning. I think that she consciously chose that we would get new versions without warning, but I may have events or identities wrong.

manic glacierBOT
lone axle
#

Will do. For sure though it would be bad in other ways to let it get stuck on some ancient version as well. If it switches to manually we would have to be diligent about keeping an eye out for new ones.

#

It does look like I was mistaken in my belief that it makes the stack traces more detailed:

code.py output:
Traceback (most recent call last):
  File "code.py", line 13, in <module>
  File "/lib/adafruit_display_text/label.py", line 359, in text
  File "/lib/adafruit_display_text/label.py", line 359, in text
RuntimeError: Text length exceeds max_glyphs

Looking into it more specifically now the only difference I can spot is that the File "/lib/adafruit_display_text/label.py", line 359, in text is duplicated when we use the Raise ... from syntax. Which does not seem all that helpful.

#

without Raise ... from I see the same stacktrace but with only a single copy of the line that is duplicated above.

onyx hinge
#

@lone axleyeah it only improves the quality of the backtrace on desktop python3

#

I think circuitpython accepts but ignores the syntax

lone axle
#

Maybe it would make more sense to disable that pylint check for our repos then unless / until we have that extra functionality supported.

onyx hinge
#

it does increase the size of the .mpy files though

lone axle
#

if we disable it inline with a comment in the file you mean?

onyx hinge
#

111 bytes: ```try:
1/0
except ZeroDivisionError:
raise RuntimeError("ouch")

137 bytes: ```try:
    1/0
except ZeroDivisionError as e:
    raise RuntimeError("ouch") from e
lone axle
#

Oh, I see. the extra text to include it in the code.

onyx hinge
#

the comment shouldn't impact the size of the mpy file but I didn't check that

#

adding a bunch of comment lines to the top increases 111 -> 113 bytes, somehow. 🀷

#

I wouldn't have expected that

lone axle
#

Yeah, I hadn't even considered mpy filesize. I know some of them get fairly tight on the non-express M0 devices already. I would probably shy away from making them bigger unless we get a clear gain from it.

onyx hinge
#

in current micropython raise ... from still doesn't improve the traceback message.

#

I don't know what the complexity of implementing it would be, but it might be considerable

raven canopy
#

for some history on pinning pylint to a particular version: https://github.com/adafruit/cookiecutter-adafruit-circuitpython/pull/69

we were pinned to 1.9.2 for like 2 years, and it was a beast of an effort to bring all the libraries up to date. i think kattni really wants to avoid that in the future, and handle new checks as they occur and through attrition.

onyx hinge
#

@raven canopy do we have any good options for turning off this new pylint check across everything in the bundle?

lone axle
#

Ah, I can understand that for sure. I just imagined 2 years worth of new pylint checks all hitting at once across hundreds of libraries and I can see how there would be a strong desire to avoid ever doing that again.

raven canopy
#

for the raise ... from we could probably ignore if circuitpython doesn't really support it. would be a "simple" adabot patch to all of the .pylintrc.

onyx hinge
#

hmmm now what

#
...
* bad-continuation and bad-whitespace have been removed, black or another formatter can help you with this better than Pylint
#

this makes modules which previously suppressed it via comment .. error. 😦 😦

#
adafruit_ads1x15/analog_in.py:31:0: E0012: Bad option value 'bad-whitespace' (bad-option-value)
raven canopy
#

their release versioning annoys me...

onyx hinge
#

looks like about 150 instances of suppressing the tag via a comment-directive. There are more that suppress it via commandline, which seems to be OK (?)

raven canopy
#

the command line ones are in the Actions workflows for linting the examples, iirc.

#

they should all be the same across the libraries, so another "simple" update with adabot patching.

onyx hinge
#

yes I think that's right

tulip sleet
#

pylint 2.6.0 did update to a newer version of isort. I was finding that sphinx and pylint were requiring conflicting versions of isort [EDIT] before the update.

onyx hinge
#

oh dear, that's irritating.

tulip sleet
#

so now they DONT conflict

onyx hinge
#

oh that's good then

manic glacierBOT
#

Nice find @cjsieh! I was able to confirm your reproducer example and fix within it.

I'm including a slightly modified version of the code here for convenience and discussion:

import board
import displayio
import busio
import storage
import time

print("waiting 10 sec")
time.sleep(10)
print("continuing")

# Use the board's primary SPI bus
spi = board.SPI()

# works on pyportal and pygamer
import sdcardio
cs = board.SD_CS
sdcard = sdcardio.SDCard(spi, cs)
print(...
lone axle
#

Is it good (or bad) practice to change the name of an issue if/when it becomes apparent that it could be better and more focused on the actual root cause of the issue?

tulip sleet
#

@lone axle I change issue titles all the time; please do

#

@onyx hinge should I start doing wholesale reviews of the whitespace PR's?

onyx hinge
#

@tulip sleet if you feel like it. There are some that are failing and I'm going back through those. most are black wanting to make additional changes, some are import order errors that I didn't reproduce locally yet. But I think the "green" ones should be good to merge.

lone axle
#

I have also seen a few import order issues from the new version on some of the libraries

tulip sleet
#

I don't think I will bother to explicitly review. I will just merge the easy ones

manic glacierBOT
#

I don't represent Adafruit. I'm just a big fan. But it is my understanding
that CircuitPython will never be targeted to the ESP-32 because it doesn't
support host mountable USB disk. It was originally targeted but was dropped
when USB disk became the standard development tool. Adafruit considers that
to be a technology requirement for CircuitPython.

Adafruit has often pointed out that MicroPython is supported on ESP-32 and
various multiprocessing techniques have been implemented there.
Circu...

onyx hinge
#

others fail due to another pylint change, which I think will be adabot-patched(?) adafruit_mcp230xx/digital_inout.py:117:12: W0707: Consider explicitly re-raising using the 'from' keyword (raise-missing-from)

tulip sleet
#

i had those same import order things after fixing minor things in adafruit_ble

manic glacierBOT
onyx hinge
#

thanks for getting the easy ones @tulip sleet

manic glacierBOT
tulip sleet
#

@onyx hinge for failed PR's, I am assignging them to CP Librarians to review

solar whale
#

between black and pylint, when can we just write a paragraph describing the code and have it written for us. πŸ˜‰

#

I guess makecode is close -- just draw pictures...

tulip sleet
#

i dunno, pylint is more like management than labor

solar whale
#

but at least pylint will find bugs, black just makes the code less readable....

tulip sleet
#

both are micromanagers πŸ™‚

solar whale
#

we have standards... they are low, but we have them...

#

slight mis-quote of Bette Midler

onyx hinge
#

the problem with code formatters is they disagree with me sometimes, and by definition I'm always right in matters of style.

thorny jay
#

Wat am I supposed to do with/against those new PyLint message? I make a simple change to fix a library, but I now need to re-order the import in example I did not even touch. 😦 Problem solved.

tulip sleet
#

it is a nuisance πŸ™‚

thorny jay
#

I am all for only checking the file I change and not the one I did not touch...

onyx hinge
#

What if we could generate shared bindings from pyi...

lone axle
#

can I force a device into safe mode? It's not connecting CIRCUITPY nor the serial console port. I suspect the code.py file on it might be causing trouble and auto-launching too fast to do anything about in normal mode.

#

I can double click reset and get to bootloader.

#

or maybe create a UF2 file that wipes code.py file?

lone axle
#

Managed to restore access by flashing back to 4.0.0 and my code crashed with ImportError: This release is not compatible with CircuitPython 4.x; use library release 1.x.x which allowed my device to connect normally so I can change code.py

crimson ferry
lone axle
#

I think I have to be able to access REPL or be able to change code.py somehow to use that though right?

crimson ferry
#

like maybe microcontroller.on_next_reset(SAFE_MODE)

#

oh, right

#

usually I get safe mode when there's an electrical disturbance, but... sparky

lone axle
#

ah, yeah I guess I could try to get it to brown out

#

would be nice to be able to make a "recovery" uf2 that is just like normal but will rename code.py to not_code.py (and similar for main.py) when it boots up.

#

that way as long as you can access BOOT drive you can clean anything bad out of code.py and then flash back to "normal"

crimson ferry
#

when I was trying out some disable write protection code I had to add some startup delay so I could get out if (when) things went wrong

#

or, might be worth it to put a 1-second startup delay in a boot.py

lone axle
#

Heh, earlier today when I was playing with something similar I did make sure to put a nice delay in so that I'd have ample time to connect and keyboard interrupt. Didn't realize I was in dangerous territory with the code I'm using now though. saved it without the delay and then couldn't do anything about it πŸ˜…

crimson ferry
#

maybe triple-click reset for safe mode, or double-click out of bootloader mode

arctic violet
#

What is the cheapest CircuitPython compatible board that I could wire 8 buttons to?

crimson ferry
#

@arctic violet Supported boards are here: https://circuitpython.org/downloads. Least expensive I've found are Adafruit Trinket M0 ($9, 5 pins; would need GPIO expansion), and Seeed XIAO ($5, 11 pins).

arctic violet
#

Thank you much

#

Saw page but was a little confused bc Arduino site says the MIcro was made in conjunction with Ada. Seems like a prime candidate for an inexpensive CP board?

crimson ferry
#

There's not a CP port for ATmega32U4

#

Adafruit's big in Arduino-land too

manic glacierBOT
onyx hinge
#

@lone axle My understanding is there's supposed to be a pattern to tap the reset button in to provoke safe mode, but I have had limited luck at it. It's slower than the double-press for bootloader. I also didn't find docs explaining it yet.

#

the function implementing it is wait_for_safe_mode_reset

tulip sleet
#

@lone axle the RGB LED goes yellow for 700ms during startup. During that time if you tap the reset button, it will reset into safe mode. It's a bit hard to react to the yellow light, so a slow double-click maybe more successful ( @onyx hinge )

#

@slender iron before you spend more time on the HCI _bleio review, I thought it might be good to have a chat (tomw) with you about its current state and how it got to where it's at.

slender iron
#

kk, sounds good

#

I think I'm running the meeting so it might be a bit late tomorrow

tulip sleet
#

sure, probably not until after the mtg

#

and could be after lunch for you

slender iron
#

yup, that'd be good. gotta get the newsletter complete after the meeting

crimson ferry
manic glacierBOT
thorny jay
#

Someone may want to check my PR and release PyBadge library. The CLUE part is not working because of the lsm6ds.

lone axle
#

I can make a release for that.

manic glacierBOT
lone axle
#

@crimson ferry thanks for that link. I had seen that flow chart before, but totally forgot that it included a safe mode path.

ionic elk
#

@tulip sleet what is process for obtaining a VID/PID, if you're a company looking to get your own legitimate codes? Maybe if we documented it, less people would ask.

tulip sleet
#

if you want to get them as your own co, you have to pay $5k to the USB org to become a member

#

that's prohibitive for individuals and some small co's.

ionic elk
#

Wow, that's pretty pricy yeah. No way I'm affording that for my stuff

lone axle
#

I think someone was discussing last week an 3rd party entity that allows smaller companies or individuals to obtain VID/PID without the fee, the website pid.codes seems to be at least one such service. Not certain if it is the one that was discussed.

#

or perhaps with a more reasonably sized fee. I don't actually recall if it was specifically stated as free or not. But certainly less than the $5k I believe.

onyx hinge
#

Yes, that was pid.codes. Their mission is to provide USB VID/PID pairs for open source hardware+software projects. They haven't approved any new PIDs lately (since april) but have a number of pending PRs so they may have shortage of administrative time. Tannewt had mentioned the possibility of reaching out to them but I didn't hear any result yet. I have a feeling a number of people would be happy to help them out.

idle wharf
manic glacierBOT
ionic elk
#

@tulip sleet @slender iron I have a error reporting question. I just spent some time tracking down a bug with the LSE that I had very intentionally tried to mark with a reset to safe mode but it ended up just making it even harder to detect. What's a good way of crashing for something like a clock error that lets me send some kind of message about what happened?

ionic elk
#

Considering a new category to safemode for BOARD_CONFIG_FAIL, let me know if that sounds ok.

#

Would be an option for triggering if a board dev puts in the wrong settings for clocks and power, like saying there's an LSE when there isn't one, stuff like that.

slender iron
#

@ionic elk new safe mode is ok. usually we assume it's hardcoded correctly

ionic elk
#

I figured that was the philosophy but the clock bugs in this case are annoying and common enough that I really wanted to highlight them in particular. This is probably the third or 4th time I've had it come up.

#

Now it'll have a big flag to let you know you screwed up your clock settings

slender iron
#

np

thorny jay
#

I have an "electrical" question... can I use an nRF52 Feather Sense as a FeatherWing for another MCU? I mean, I would like to use the I2C sensor of it from an M4 Feather, just because I don't have any standalone lsm6ds33 to play with sand. [Why use the M4 and not directly the nRF52??? Because I only have the LEDmatrix connector for M4 pins] I did something similar with the CLUE using it's sensor from a Raspberry Pi.

solar whale
#

you'll have issues with the TX/RX and possibly with the power pins.

#

MCU feathers are not meant to be connected.

lone axle
#

Maybe you could connect just the I2C pins, and GND. And then power the Sense separately from the M4?

solar whale
#

I wonder if you can turn off the regulator on the Sense -- Ground EN -- then power the I2C devices via the 3V pin ??? Don't try this at home πŸ˜‰

#

I guess that would still power the nrf52840...

modern wing
#

[well, where else are we going to try it? πŸ˜› ]

ionic elk
#

Finding myself stuck in cpu_get_regs_and_sp a lot today while debugging, anybody know what the cause of that might be?

#

might just be memory corruption or something but it seems like a funny place to get stuck

thorny jay
#

Thank you... so I need to give this a try... and I can try slowly adding one pin at a time until it work or the magic smoke get out of it. I am mostly interested into I2C things.

#

It seems that the challenging part is that both MCU will try to make 3V3 based on 5V.

modern wing
#

Good afternoon all you wonderful people. Happily lurking today, and I've updated the notes doc to reflect as such. adabot

turbid radish
#

Lurking

onyx hinge
#

<@&356864093652516868> The notes doc for today's meeting is https://docs.google.com/document/d/107jDI0oM4DuBHe4GuAPO_i5bVhOH-HDi1Q8YbNSjbak/edit?usp=sharing and we're starting very shortly

lone axle
#

Thank you

thorny jay
#

Also of interest is what code to run on the nRF52 to keep it "busy" but not disturbing. I had the same issue with the CLUE... what to run to make sure it does not do anything, I went for an empty code.py. But maybe I want to black the screen and turn off RGB and backlight.

tidal kiln
#

lurking

onyx hinge
#

if you can add your notes and "lurking" to the document it's super helpful!

stuck elbow
#

alurkin

onyx hinge
#

I didn't hear what Scott said at first so I wondered if it was a portmanteau of: camo + kawaii

raven canopy
#

lurking

blissful pollen
#

Just looked at her channel it is "Ka-Moo-Ee"

onyx hinge
#

Upcoming meetings: August 31 (Monday), September 8 (Tuesday) unless we want to make an executive decision to move it to CircuitPython Day September 9 (Wednesday)

turbid radish
#

Yes, should be 9/9/2020

solar whale
#

We should move it becasue 9/8 is NH Primary day ... πŸ˜‰

onyx hinge
#

@slender iron I added it to In The Weeds πŸ‘

inland tusk
#

lurking for status updates

lone axle
turbid radish
#

Thank you all!

lone axle
turbid radish
#

Send projects, events, and interesting stuff via twitter hashtag #circuitpython-dev or @anne_engineer or via email at anneb(at)adafruit .com

idle owl
#

Definitely at least the second time.

old smelt
#

Lurking

onyx hinge
#

27 authors wow

#
  • 0 issues not assigned a milestone
    πŸ•Ί
#

We've got some remaining problems with pylint, in case anyone wants to help.

#

We need those cleaned up before we can release the affected libs

solar whale
#

pylint should have caught that.

idle owl
#

@onyx hinge They're on my radar.

#

The other PRs.

onyx hinge
#

There's also the raise ... froms, I think there may be more problems are actually unknown currently, until a PR or release attempt occurs

idle owl
#

@onyx hinge Yeah I read through them. I'll see what I can do.

#

@thorny jay Are you text only for Status updates?

thorny jay
#

Maybe we need to check what PyLint would say if there was a change on all the library?

idle owl
#

It says you're lurking.

thorny jay
#

Fixed.

idle owl
#

Thanks for updating!

onyx hinge
#

@thorny jay I'm not aware of how to do that "automatically".

thorny jay
#

some adabot? or just making a PR that only add an empty file?

#

I wonder how much money does running all the GitHub CI cost?

lapis hemlock
#

I am only lurking today.

onyx hinge
#

Public github projects get GitHub CI for free

thorny jay
lapis hemlock
#

@idle owl Thanks for keeping the docs in sync with my status!

idle owl
#

@lapis hemlock Actually @onyx hinge beat me to it. We started typing at the same time.

lapis hemlock
#

Well, then @onyx hinge has earned some brownie points.

onyx hinge
#

I didn't know they even had brownies in Europe

#

uniquely american, I thought

lapis hemlock
#

Yeah, I picked up the phrase while in the US.

stuck elbow
#

we do, but they are small mythical humanoids

onyx hinge
#

It's OK, mohnkuchen is pretty good

stuck elbow
#

A brownie or broonie (Scots), also known as a brΓΉnaidh or gruagach (Scottish Gaelic), is a household spirit from British folklore that is said to come out at night while the owners of the house are asleep and perform various chores and farming tasks. The human owners of the ho...

lapis hemlock
#

"performing various chores" liking keeping the docs up to date...

stuck elbow
#

we don't usually eat them

lapis hemlock
#

The docs, do you mean? No, we don't.

stuck elbow
#

historically some doctors did get eaten, especially the ship docs

thorny jay
#

I remember those message about SPI on Discord... Maybe that was I2C !!!

modern wing
#

Wait, we're not supposed to eat the google docs?

ruh-roh

onyx hinge
errant grail
#

Some of my projects rely on the SPI high baud rate setting for TFT displays. Setting it low by default for SAMD21 would be okay, though.

ivory yew
#

omg I missed the meeting

onyx hinge
#

@ivory yew want to do a special in the weeds status update or hug report?

#

we're still talking

ivory yew
#

Nah that's okay. I'm on the phone with the Department of Revenue right now 😭

lone axle
#

I am in favor of Circuit Python Day meeting

ivory yew
#

But hug report to all of the CircuitPython folks - digging through the CircuitPython source code has helped a lot with getting my own firmware up and running.

tidal kiln
#

yep. i like the idea.

idle owl
#

Nah

lapis hemlock
#

Why aren't the guides under version control?

lone axle
#

I have some code that I've used to search the Learn Guide repo a few times now that is posted in some of the recent Issues on that repo. Maybe there is some opportunity to integrate it with CI to see a list of potential projects that will be affected.

#

Would only help find instances of code that is in the Repo though, but not smaller snippets that are directly in the Learn Guides.

slender iron
#

the code is

lapis hemlock
#

Right, but it would make sense to expose the guides themselves to PRs, wouldn't it?

slender iron
#

yes, I've argued for it but haven't gotten limor on board

#

code was a first step

lapis hemlock
#

A couple of months ago, I updated the code for one of the guides, but then the text dropped out of sync, so I had to bug Jeff for a fix.

slender iron
#

I know. πŸ™‚

#

I can bring it up again

#

it's been a few years

lapis hemlock
#

I think it would be worthwhile.

slender iron
#

me too

#

there is a lot of history to how learn works

lapis hemlock
#

The thing is, and I agree with this, you are an advocate of integrating text (docs) with the source code. Exposing the code without exposing the guide is not really useful.

raven canopy
#

requirements.txt & setup.py, yes. its just versioning based with Dependabot.

onyx hinge
slender iron
#

@lapis hemlock I'm not the one that needs to be convinced

lapis hemlock
#

OK, so I am barking up the wrong tree...

slender iron
#

ya, limor needs to be convinced

lapis hemlock
#

What is required for that?

#

We could petition her.

#

We, the people...

onyx hinge
#

@lapis hemlock Take this with a grain of salt, but I think one thing is that a lot of people who are writing content into the learn guides would state very strongly that they need the graphical editing tools vs "just writing markdown". I think the technical minded CircuitPython people are a minority of those writing guides, or at any rate perceived to be.

lone axle
#

I think that is true as well. If it could moved to be backed by Git or some other version control, I think it would definitely need some sort of very easy to use UI (ideally the exact same that exists today probably) it must be much easier than editing md code and then using git to push / merge / PR it.

lapis hemlock
#

@onyx hinge I think, such an approach would definitely lower my contribution threshold. I am very reluctant to even try to add content, if I have to trouble someone with that in the first place.

#

Markdown is OK.

tulip sleet
#

Rather than saying "markdown" and "GitHub", the goal is really to be able to suggest changes to Learn Guides, make it easy to approve and/or edit these changes, and give feedback to the proposers. Learn Guides do have a versioning scheme built in to the CMS, it's just not GitHub. It even shows diffs.

lapis hemlock
#

I don't care how it is done.

#

github, markdown etc. is OK with me, "ask Jeff to do something for me" is not.

tulip sleet
#

right, it just needs to be discussed in terms of functionality rather than implementaiton

lapis hemlock
#

Yes, but the snag is that if you accept markdown/github, then nothing has to be implemented.

lone axle
#

But then it's not easy enough to use for many of primarily intended guide authors.

lapis hemlock
#

But if you want to contribute to the code, you face the same difficulty, don't you?

#

I mean, this is really not a hurdle, or at least, not one that cannot be overcome.

lone axle
#

It can be overcome. But I think it's easy for folks like us who are knee deep in code and development tools all the time to underestimate how challenging and daunting it can be to someone with basically no traditional coding experience. Many of the guides are created by authors in that situation, and they still are able to create great and useful content even without having to learn those skills.

lapis hemlock
#

What I am saying is that there is already discrepancy in the reasoning: you can PR the code in the guide (you have already overcome the difficulties), but you cannot suggest changes to the text that would reflect the changes in your code.

#

I don't get it.

lone axle
#

There is a feedback link that can be used to suggest changes in guides.

lapis hemlock
#

That's true, but I cannot actually implement those changes. It is not efficient.

lone axle
#

(not saying that git or version control wouldn't be nice. I'd definitely like it as well)

lapis hemlock
#

@slender iron I am not trying. I have already accepted your answer.

#

OK, fair enough.

onyx hinge
#

cookie-cutterable, github-pages, but for learn-style guides

#

go do it πŸ™‚

lapis hemlock
#

Oh, that's a very good point.

#

Yeah, but some of the requirements are not even clear.

#

kk.

idle owl
#

@onyx hinge I've replied to all of your PRs.

onyx hinge
#

@idle owl you are a treasure

thorny jay
#

Thank you all.

modern wing
#

Thanks!

lapis hemlock
#

See you all next timeπŸ‘‹

onyx hinge
#

See you @lapis hemlock

solar whale
#

πŸ‘‹

onyx hinge
#

@idle owl OK I'll go ahead and try to finish the process of getting those PRs to "green" by fixing the other pylint errors. I'm not as confident as you that I touched most/essentially all libs with this set of PRs, there were under 100 and aren't we over 200 libs?

idle owl
#

@onyx hinge We are. I think in this case, the best option is to wait until they fail. It's not a great experience for a newbie, but we can handle the fixes ourselves on any newbie PRs that come in and explain the situation.

manic glacierBOT
#

@tannewt suspicion on wiring was almost right. Even with the shortest possible connections, I was still having intermittent transfer success. I noticed that SDA and SCL ramp-up times were quite long on a scope and overlapping drastically when there was supposed to be an obvious order per I2C spec. I was able to mitigate the problem by setting SDASETUP in the I2C peripheral. SDASETUP is only present on M4 devices. I still cannot quite understand why data packets with leading 1's had the is...

slender iron
#

<@&356864093652516868> any of you not have an esp32s2 board yet?

turbid radish
#

I don't yet