#circuitpython-dev

1 messages ยท Page 314 of 1

lone axle
#

@gilded cradle I am curious if you have any thoughts on this: https://github.com/FoamyGuy/Adafruit_Blinka_Displayio/blob/7415eb6aa7a245f0e627503f4f805241f06b1370/displayio/display.py#L204 I added a save_screenshot() function to Display in my fork of Adafruit_Blinka_Displayio. Do you think something like that is within the scope for Adafruit_Blinka_Displayio? If so I can work on cleaning it up and make a PR. If not I'll plan to refactor it out of Adafruit_Blinka_Displayio into it's own separate module.

lapis hemlock
#

@lapis hemlock In this case, ulab is more akin to the way I design hardware -- doing things in parallel whenever possible. Since I'm more hardware-oriented, it was nice to have something that matched that approach.
@errant grail Actually, creating hardware-oriented code that is supposed to do number crunching is a bit of strange feeling. Most of the code can be implemented in hardware (there are hardware implementations of FFT, sorting, summing and the like), but there are some pieces that are a bit odd. E.g., finding the roots of an arbitrary function, or fitting.

ivory yew
#

@errant grail I see you went for the voltage divider and diode clamp scheme for your inputs.

solar whale
#

@onyx hinge now that you mention it, I don't recall how the Mouser Saola's were packaged. the ones from Digikey were definitely in pink foam.

errant grail
#

@ivory yew Yes, but in the next version I'll switch to a single zener instead of the two clamping diodes.

#

@lapis hemlock Early in my career, doing it in hardware was the only approach. I've been on the planet for a while. Finite state machine with EPROM lookup tables was a life-saver.

gilded cradle
#

@lone axle in order to maintain backward compatibility, I'm trying to not add too much functionality that isn't already in the main displayio. That's why I have it accessing private functions. One of the features I added that's not backwards compatible is the ability to open gifs, jpgs, pngs in addition to bitmaps, but I think that was planned on being added eventually. If someone wanted to add the screenshot capability to the main circuitpython displayio, it would be a nice feature to have and I'd have not problem including that functionality.

lapis hemlock
#

@onyx hinge Jeff, is your CNC machine some open-source/open-hardware beast? If so, what would it be?

onyx hinge
#

@lapis hemlock I have been a developer for LinuxCNC off and on for years, but I don't have a machine that runs it at the moment. Just a 3D printer.

gilded cradle
#

@slender iron what are your thoughts on @lone axle's screenshot suggestion?

lone axle
#

@gilded cradle Okay that makes sense. Thank you. I will probably work on refactoring it to it's own module. I might be able make a version that works with Circuit Python devices as well (instead of Blinka). But it will almost certainly have to be a seperate module if I do it. I think Display in Circuit Python is backed by C code instead of Python and that is a bit beyond my reach at the moment I think.

lapis hemlock
#

@onyx hinge I am thinking of getting one, and it should be compatible with LinuxCNC.

#

Hence my question.

gilded cradle
#

Ah yeah it is in c code. ๐Ÿ™‚

lone axle
#

But Jeff did point me toward some functions in the existing Display class that I think could make it work with Circuit Python deviecs. Though what to do with the screenshot after it's taken is a bit more akward on Circuit Python devices since most likely we cannot write it to the filesystem.

onyx hinge
#

I had a small CNC machine years ago that I didn't use very much, probably 1% as much as I use a 3d printer now. I had hoped it would let me mill PCBs but I never got the process to go smoothly and predictably.

#

If you want to talk about it more perhaps we should take it to #general-chat instead

lone axle
#

Probably will require either using a device with external storage SD, or else having the system mounted for write-ability.

onyx hinge
#

grbl seems to be reasonably well-regarded these days and is probably much more reasonable to set up (doesn't need a dedicated PC)

gilded cradle
#

Perhaps write it to an sd card? Let's get Scott's opinion on the functionality first before we scrap it.

lone axle
#

Okay, sounds good.

ivory yew
#

@errant grail single zener? Like I do with BHB?

errant grail
#

@ivory yew Yes. My spider sense tingles a bit when using zener diodes for input protection instead of power rail clamping diodes. The modern variety such as the MM3V3V6 seem to have reliable and accurate zener threshold voltages, much better than ones I used to use back in the 'ol THT days.

#

I do like the reduced component count and simplified PCB routing with zener input protection.

ivory yew
#

It's also really not the zener doing the protection in the case of bhb

lapis hemlock
#

@tulip sleet @onyx hinge do you want me to report a user who seems to try to push some commercial stuff?

ivory yew
#

It's the op amp acting as a current driven input

tulip sleet
#

@lapis hemlock in discord?

lapis hemlock
#

Yes. Private message.

onyx hinge
#

Can you DM me a screenshot of their profile, showing that they have a "common server" of adafruit with you?

#

And confirm that this is just an unsolicited message from them, you don't have prior chat history?

#

screenshot the message too please

lapis hemlock
#

This is the first time I have heard of the chap.

onyx hinge
#

If they are sending spam to you, they're probably doing it to others and we'll ban them

tulip sleet
#

we have had similar complaints recently about unsolicited DM's, so I think you are not alone

onyx hinge
#

fwiw mods were just working on some specific users, if it was one of them I'll let you know

simple pulsar
#

I had a bizarre DM several weeks ago

onyx hinge
#

Yes, it was a user that another moderator had already banned. We can't control who DMs you, but when they share the CircuitPython server with you, we do treat it as a moderation issue so feel free to contact community moderators, including by @-mentioning the role

lapis hemlock
#

@onyx hinge Hats off. Really. I wish I could fix bugs in ulab as quickly as this.

onyx hinge
#

There are a pretty big number of moderators and only one of you

#

and in these cases it's very clear cut, not a subtle bug

lapis hemlock
#

Still.

#

I am impressed.

simple pulsar
#

Can one DM the moderators in discord?

errant grail
idle owl
#

@simple pulsar Of course.

onyx hinge
#

@simple pulsar Unless it needs handling privately, it's better to @-mention the role, because there's no telling which specific moderators are actually there, green circles lie

#

(at any rate that's my opinion)

simple pulsar
#

I just had a random person asking to use my "upwork" account. I don't have one of those so it seem rather uninformed. I just explained to him why that would not be a good idea.

idle owl
#

That's the same thing happening to others. It's a scam. We've banned a couple of users already for that. They are joining the server, but not posting anything here, and simply DMing users that same scam.

ivory yew
#

@errant grail ooooh. Neat. That certainly wins for parts count!

simple pulsar
#

Is GC still lacking compaction? I've just fixed a MemoryError by trial and error (and hope). This is on nRF52840 boards. I spoke too soon ๐Ÿ˜ฆ

manic glacierBOT
ionic elk
#

@slender iron struggling a little with the package management structs again. Do you remember when we were chatting about the mcu_pin_globals.map.table, which is the "array" that holds all the package pins? I'm trying to figure out how to get the size of it - it's a pointer, so MP_ARRAY_SIZE doesn't get the right value.

#

Aaaand as usual literally as I ask the question I figure it out.

slender iron
#

๐Ÿ™‚

#

@simple pulsar fragmentation isn't actually my biggest concern at this point. I'm more worried about careless allocations in libraries

#

Python isn't exactly designed to tell you when it's allocating things

#

that doesn't mean our libraries shouldn't be designed for it though

manic glacierBOT
#

I'm having two issues with the SPI functionality on the STM32F405 Feather Express board running Circuit Python 5.3.

The first issue is that it seems to be leaving an old value in the buffer. For example if I connect a wire from 3.3V to the MISO pin, and then I run the following

import board
import busio
spi = busio.SPI(board.SCK, MISO=board.MISO)
spi.try_lock()
True
spi.configure(baudrate=5000000, phase=0, polarity=0, bits=8)
result = bytearray(1)
spi....

manic glacierBOT
#

I verified that this same code works perfectly fine with CircuitPython 5.3 on an Edge BadgeBoard (samd51j19)

I grounded the MISO pin, and then ran the following in REPL

import board
import busio
spi = busio.SPI(board.SCK, MISO=board.MISO)
spi.try_lock()
True
spi.configure(baudrate=5000000, phase=0, polarity=0, bits=8)
result = bytearray(1)
spi.readinto(result)
result
bytearray(b'\x00')

Then I connected MISO to 3.3VDC

spi.readinto(result...

manic glacierBOT
manic glacierBOT
manic glacierBOT
viral minnow
#

Hello! The RAK5010 (nRF52840) board I'm currently porting CircuitPython to uses 1.8V GPIO voltages as set by the UICR/REGOUT0 register.
However I found that the code in ports/nrf/peripherals/nrf/nrf52840/power.c is overriding this and pushing REGOUT0 back to 3.3V. I understand this was due to 3.3V level boards falling back to the default 1.8V when users happened to wipe the UICR.
However this practice is bad news for my RAK5010 - for reasons to do with the BG96 cellular module onboard we need to keep system voltages to 1.8V internally - we level shift only the user accessible IO pins to either 3.3 or 5v levels as the users wish.

Any recommendations on how to handle this? Should I add a new define for this board which effectively skips that code in power.c and keeps the 1.8V setting even when users wipe the UICR?

manic glacierBOT
#

If already self->has_lock, it gets lost.

Here's what samd does:

bool common_hal_busio_i2c_try_lock(busio_i2c_obj_t *self) {
    bool grabbed_lock = false;
    CRITICAL_SECTION_ENTER()
        if (!self->has_lock) {
            grabbed_lock = true;
            self->has_lock = true;
        }
    CRITICAL_SECTION_LEAVE();
    return grabbed_lock;
}

As for internal object pointers, a problem will only arise if the object is locked WHEN it becomes long-lived. I'm com...

tulip sleet
#

@viral minnow yes, feel free to propose a PR with a #define to disable the voltage reset. Note that we try to use #if, not #ifdef checks, so that we can make sure something is definitely defined one way or the other.

manic glacierBOT
#

This PR adds a timer management system to the peripherals/ directory, which mediates how modules are granted timers out of all timer peripherals available for a given STM32 SoC. It also adjusts the PulseIO modules to use ST's "General Purpose" and "Advanced" timers, in addition to the "Basic" ones. Once a module has claimed a timer, it cannot be used by other modules - thus, the timer search function attempts to select timers with minimal exposure to pins wherever possible.

This PR is w...

manic glacierBOT
ionic elk
#

@tulip sleet does nrf SPI use DMA?

onyx hinge
#

Note
Peripherals using EasyDMA (including SPIM) require the transfer buffers to be placed in the Data RAM region. If this condition is not met, this function will fail with the error code NRFX_ERROR_INVALID_ADDR.

tulip sleet
#

@ionic elk nrf uses DMA for pretty much everything (they have "EasyDMA"). It's kind of hard not to use DMA

#

@ionic elk if you are debugging that DMA issue, you might try it on a SAMD as well to see how it behaves

manic glacierBOT
ionic elk
#

@tulip sleet STM32 SPI doesn't use DMA at all right now. I'm examining whether I should swap over to it

manic glacierBOT
#

Looking into this issue, it's unfortunately looking more complicated than I anticipated. What I'm seeing is that the BSY flag in the SPI2 Status Register (SR) is never being reset and is causing a hang in a HAL timeout routine (we don't enable timeouts for SPI right now, which might be an appropriate temporary fix).

It isn't obvious to me from the reference manual why this is happening. The BSY flag should be automatically cleared when the SPI device is disabled (clearing the SPE bit in CR...

manic glacierBOT
ionic elk
#

@tulip sleet have you ever reached out to talk to NRF about software bugs before?

tulip sleet
#

oh sure, they are reasonably responsive

ionic elk
#

I think that the SPI issue is actually a HAL bug - the reference manual implies that a busy bit is never cleared when in receive only mode, but the HAL checks for it anyway

tulip sleet
#

which spi issue?

ionic elk
#

wondering if it's worthwhile to reach out to ST about it? or should I just hardcode in some workaround

#

the one you directed me to

tulip sleet
#

but you were asking about nrf? ST I have no experience with

ionic elk
#

I know I was just wondering if that was something you'd done

#

But I guess they aren't that comparable, since NRF is kind of small, right?

#

at least compared to ST

tulip sleet
#

atmel was better than microchip, nrf is pretty good all around, and they have a good forum (devzone). Is there an ST forum?

ionic elk
#

Yeah, I tend to avoid it though, I haven't seen much dev engagement

tulip sleet
#

the nrf forum has staff responding, unlike the atmel community

#

i would look for this issue in the forum if you haven't already; I'm sure you're not the first person to come across it

ionic elk
#

Yeah I've searched but haven't found much so far? I'm wondering if it's maybe an obscure issue - I don't know how many projects allow unidirectional SPI

tulip sleet
#

right, I think maybe the use case is unusual. If you did a write/read, then does it work correctly?

ionic elk
#

This is for the case where the user declares only a MISO pin

#

If you include both pins, it works just fine

tulip sleet
#

It was reminiscent of an atmel idiosyncrasy about the read being one byte behind that stargirl ran into

#

so if you declare both pins but only read, it works fine, without a write?

ionic elk
#

yes

tulip sleet
#

how can you be an SPI main and only do reads? I would think a main always does writes to communicate with a peripheral

ionic elk
#

and it doesn't jam when you try to change frequency

tulip sleet
#

is there a separate driver for being a peripheral?

ionic elk
#

do you mean master? or host or whatever?

#

controller?

tulip sleet
#

right

#

new terminology is controller/peripheral, proposed by oshwa, that's clearer

ionic elk
#

anyway. yes, there's a separate slave driver mode

tulip sleet
#

what is the use case for MISO only?

ionic elk
#

use case is to allow the other pin to be used for IO, according to the datasheet

tulip sleet
#

yeah, but if you are a controller, can you just do clocked reads? Or are you a peripheral then?

#

e.g. a display is a peripheral, and might only do reads

#

i don't see the use case for being a controller and only doing reads; you'd want to send commands to the peripheral

ionic elk
#

๐Ÿคท allowing one-directional SPI was a requested feature, so it's in there - I think it's used for a number of sensors

tulip sleet
#

do you think the HAL library is fixable? Do you see the bug

ionic elk
#

Yes, I think so. I believe there should be a catch that prevents it from checking the BSY flag if it is in the SPI_MODE_MASTER/SPI_DIRECTION_2LINES_RXONLY mode combination

#

and there isn't, so it gets stuck

#

I could be wrong, but that means that BSY is getting stuck high for some other reason, and is ignoring the primary shutoff valve for itself (SPE, the SPI enable bit)

tulip sleet
#

i'd look for an existence proof of a driver fpr a sensor like that being read by MISO only. e.g., "oh look, here on github is an STM-only driver for the whatsis read-only temp sensor" or whtaever, and see how it codes that

ionic elk
#

I mean, it was the reason the issue on Github came up - they were declaring only one of the pins and encountered this issue. But I'll poke around and see if there's other examples.

tulip sleet
#

@ionic elk right, I just mean maybe someone has come up with a way of using the current hal for MISO-only that works around the issue

ionic elk
#

I'm trying to see whether I can actually use the other pin in IO mode just by not setting it to the SPI altfunction...

#

Yeah, MOSI is fully usable and I don't see any disruption when MISO is taking in data

#

So I'm not sure what exactly the point of this one-directional mode even is, if you don't even need it to access the other pin...

#

Anyway I'm going to hotfix it and then post something to the ST forum I guess, see if they say anything about it

tulip sleet
#

do you have an example of a one-directional sensor? I could ask Bryan if you don't know of one off the bat.

ionic elk
#

I don't have any examples. One-directional SPI lines are supported by the API, and had an issue attached, which is why I implemented them

ionic elk
tulip sleet
#

I don't remember why I filed that issue other that for consistency ๐Ÿ™‚

manic glacierBOT
slender iron
#

could be a shift register for input-only

tulip sleet
#

yes, that's a good simple case

manic glacierBOT
#

Resolves #3097. Simplex SPI was suffering an issue where when in the "SPI_DIRECTION_2LINES_RXONLY" mode, it would hang when the frequency was lowered, and would deliver delayed data. It's still not 100% clear why this was happening, but testing shows no issues with using MOSI as an IO pin without this mode enabled, so it's been removed.

Also adds -ggdb3 to both debug and optimized builds, which assisted with debugging this issue, and there's no real reason to remove it as per #2790

ionic elk
#

@slender iron can you explain what you mean? I think there is a shift register but I don't understand the significance of that to the existence of the mode or to this problem specifically. As per RefMan for this mode: "Only the receiver is activated and the received data on the MISO pin are shifted in serially to the 8-bit shift register and then parallel loaded into the SPI_DR register (Rx buffer)."

tulip sleet
#

i think he means an external shift register: you would clock it with the SPI clock to get its data out

ionic elk
#

ah hmm

onyx hinge
#

Kattni's been working on a 74hc595 guide which is exactly that

#

er wait that's the reverse

slender iron
#

ya, exactly

tulip sleet
#

limor suggests max31855 as an example

onyx hinge
#

74hc165 is another

ionic elk
#

I should perhaps clarify that my existing PR just now doesn't actually disable RX only SPI, it just stops using the internal mode for it, which from what I can tell doesn't seem to actually do anything other than break stuff?

#

Because my testing shows that using MOSI as an IO is totally unimpeded by using the regular two-direction SPI mode, since you mux it with a different altfn anyway.

onyx hinge
#

not sure if you care to chase down any "why"s but I notice some things in the ST driver like to disable the SPI peripheral in this case ```static HAL_StatusTypeDef SPI_EndRxTransaction(SPI_HandleTypeDef hspi, uint32_t Timeout, uint32_t Tickstart)
{
if ((hspi->Init.Mode == SPI_MODE_MASTER) && ((hspi->Init.Direction == SPI_DIRECTION_1LINE)
|| (hspi->Init.Direction == SPI_DIRECTION_2LINES_RXONLY)))
{
/
Disable SPI peripheral */
__HAL_SPI_DISABLE(hspi);

ionic elk
#

Yeah these are important to the issue because they're supposed to be how you turn off the BSY bit, which is used all over the place to determine whether SPI can be used or not. But when you enable RX-only mode at certain speeds, they don't seem to affect BSY at all, so the program just hangs forever

manic glacierBOT
#

We don't have plans to add it. If someone made a PR I'd be happy to merge but would want to make sure the API is pythonic (attributes instead of getters/setters for example) instead of a straight-C wrapper.

LVGLโ€˜s team grow quickly , and I think it world be the best fit GUI for micropython , actually they had finish the python objects and has full samples of all widgets. but still less data about micropython.

https://github.com/lvgl/lv_examples/tree/master/src/lv_ex_widgets

grim copper
#

Hello o/
Is this the right place for me to ask a few questions about a problem I'm having with neopixels?

grim copper
#

I'll ask it because I have to AFK, but if this isn't the appropriate place, I apologize and would appreciate if someone can point me to the appropriate channel

#

I attached 2 single RGBW LEDs and followed the tutorial on installing circuitpython. I ran the neopixel_rpi_simpletest.py script, with no problem after commenting out the RGB stuff and uncommenting the RGBW stuff, as noted in the .py file. The script seems to run fine and the test is successful.

I then decided I would like to see what the White component of the LEDs looks like, since they weren't used in the that script at all.

I assumed I could change the (r,g,b,w) values to accomplish this, so I changed the part of the script that lights up the Red pixel "pixels.fill((255, 0, 0, 0))" to "pixels.fill((0, 0, 0, 255))" expecting to see White when I ran the script.

The red no longer lit (as expected) but the White didn't light up either. Am I completely misunderstanding what I should be doing?

Here's the edited script for reference. https://pastebin.com/ZTdp0Ea6

crimson ferry
crimson ferry
#

Hmm, "Guru Meditation Error: Core 0 panic'ed (IntegerDivideByZero)" with spi = busio.SPI(board.IO36, MOSI=board.IO35, MISO=board.IO37)

dense jasper
#

@grim copper i think #help-with-circuitpython maybe fits better..

regarding your question:
your explanation seems fine.

i have striped your example a little bit https://gist.github.com/s-light/82fdfe0c98b2fb46f3261bd30473a70f
to get a better 'what is happening'
(untested i have not the correct hardware here at my desk.)

this should light up red green blue white one after each other -
and finally all in low brightness.

this way i think it is easier to check at what part something goes wrong..

Gist

minimal test for NeoPixels with Linux / CircuitPython - neopixel_minimal_test.py

solar whale
#

@slender iron I was trying to test I2C on the esp32s2 with the saola feather adapter but it looks like it uses IO45 for SCL -- when I try to set it, I get "Invalid pins" which looks to be correct https://github.com/adafruit/circuitpython/blob/main/ports/esp32s2/common-hal/busio/I2C.c#L65 ... so will I2C work via the adapter or am I misunderstanding something? I2C works fine if I use IO1 for SCL but I cannot use the QWIIC connector or the "standard" feather SCL pin. Nice to have I2C working!! I am reading from an AHT20 temp/hum sensor.

manic glacierBOT
manic glacierBOT
#
[adafruit/circuitpython] New branch created: type\_hints
#

Another question, can't circuit Python build esp32s2?
`Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
IDF_PATH=/home/dahanzimin/circuitpython/ports/esp32s2/esp-idf cmake -S . -B build-espressif_saola_1_wrover/esp-idf -DSDKCONFIG=build-espressif_saola_1_wrover/esp-idf/sdkconfig -DSDKCONFIG_DEFAULTS="sdkconfig.defaults;boards/espressif_saola_1_wrover/sdkconfig" -DCMAKE_TOOLCHAIN_FILE=/home/dahanzimin/circuitpython/ports/esp32s2/esp-idf/...

manic glacierBOT
manic glacierBOT
#

Making this issue so I can track what's been done and what needs to be done

  • [ ] aesio/
  • [ ] analogio/
  • [ ] audiobusio/
  • [ ] audiocore/
  • [ ] audioio/
  • [ ] audiomixer/
  • [ ] audiomp3/
  • [ ] audiopwmio/
  • [ ] bitbangio/
  • [ ] _bleio/
  • [ ] board/
  • [ ] busio/
  • [ ] countio/
  • [ ] digitalio/
  • [ ] displayio/
  • [ ] _eve/
  • [ ] fontio/
  • [ ] framebufferio/
  • [ ] frequencyio/
  • [ ] gamepad/
  • [ ] gamepadshift/
  • [ ] gnss/
  • [ ] i2cperipheral/
  • [ ] math/
  • [ ] micro...
manic glacierBOT
#

A lot of these bytes and bytearray types are really just checking that something obeys "buf" protocol.
The actual argument validation checks in C are:

    mp_get_buffer_raise(buffer, &bufinfo, MP_BUFFER_WRITE);   // Buffer must be writable.
// or
    mp_get_buffer_raise(buffer, &bufinfo, MP_BUFFER_READ);    // Buffer need only be readable.

How to specify this in type annotations is still an open issue in Python-land:
https://github.com/python/typing/issues/593
https://bu...

topaz quest
#

@trim elm what times did you find black and pylint disagreeing? beside line length, which I think is already disabled?

trim elm
#

Hmm... I don't really remember since I did that a while back, but I'll try to see if I can find a PR where that was the case.

topaz quest
#

Please, I'm interested because I've been doing black enforcement on my own projects too, and I'd like to figure out if I need to disable some (more) pylinting

#

(the line length is the obvious one, and I was more than happy to disable on my projects :P)

prime cove
#

On a grand central M4: Is time.monotonic_ns() expected to return with microsecond resolution? And is it normal for this statement total = time.monotonic_ns() - time.monotonic_ns() to take 17us to execute?

trim elm
#

@topaz quest Ok, so the only thing they disagree on is Pylint's bad-continuation. That's a well-documented bug with Pylint that has been around for a number of years. We actually updated all of the pylintrc's to disable that, so that's not an issue anymore. The only other things were black making longer lists take up like a million lines, like here https://github.com/adafruit/Adafruit_CircuitPython_HT16K33/pull/73 and some weirdness arising with the comments and pylint disables getting moved around when black made something that was one line into multiple lines.

#

I think the actual reason that I didn't want black to actually the changes was because of stuff like what happened in the HT16K33 PR since people would likely not notice the change until it was already merged

topaz quest
#

yeah I think those lists are the only place where I really wish black was a bit more flexible ๐Ÿ˜ฆ

manic glacierBOT
tulip sleet
#

@golden jay it should be about us resolution. I would not be surprised that a single statement with a couple of calls takes 17us; these processors are not incredibly fast. And there can be interruptions due to garbage collection or servicing background tasks or interrupts that will make things vary. You cannot depend on predictable timgin.

prime cove
#

@tulip sleet Thanks! If I was looking for consistent timing in a small section, would I want to consider disabling the garbage collector around that portion of code?

tulip sleet
#

@golden jay you could, but there could still be other interruptions. What is your use case for consistent timing?

#

in general we implement things that need consistent timing in C and make them available from Python

slender iron
#

@solar whale I messed up the I2C pins on the first rev of the adapter

#

it can actually work but it messes up the reset into bootloader stuff

#

and maybe the flash voltage

solar whale
#

@slender iron np -- just wanted to confirm my findings. will you be doing another rev? What pin will you use for SCL -- I may try a cut/jumper

prime cove
#

@tulip sleet I come from a C background so I want to get a better sense of the language and things to consider. I've done some python as well, but nothing where I've had to worry about memory or timing really.

solar whale
#

@slender iron unless you are reorganizing more pins -- then I'll just wait for the new version - no rush.

slender iron
#

it's IO2 SCL and IO1 SDA

#

may do a third rev to add a resistor and cap for double tap to bootloader

solar whale
#

ah -- great - OK -- look forward to trying it when it is ready

tulip sleet
#

@golden jay gc is fast because the amount of RAM is small, but in general, you cannot predict the latency or variance. You won't notice for most things that are 10's or 100's of msecs, but trying to use microcontroller python for applications that require strict timing of small intervals is just not what it's built for. That's why we have native modules for things like PulseIn and PulseOut, reading and writing audio data, controlling neopixels (which require precise timing), etc. If you have ever used Java and dealt with timing issues, you could think of it similarly.

slender iron
#

anyone know if discord is accessible from china?

solar whale
#

@slender iron assembling the adaptor was a good way for me to experiment with SMD parts and hot-air soldering -- It also works well for USB and blinking LED so I'm very happy I built one.

#

I'll be trying few different I2C and SPI devices over the next few days -- great to have it working.

prime cove
#

@tulip sleet Thanks for the additional info. I'm definitely not expecting deterministic timing on anything. Also I just want to check, would my questions have been better suited to the help-with-circuitpython channel? I'm not sure which channel is more appropriate.

slender iron
#

@solar whale ya, sorry it's the wrong i2c pins. I actually made them fail after I tried it so others wouldn't make the same mistake. you could modify the board for v3 and order it ๐Ÿ™‚

tulip sleet
#

@golden jay this is more of a dev channel, but you are asking questions the devs might know more about. You could use either. For general questions or library questions, #help-with-circuitpython may get more eyes on the question, especially from other users

solar whale
#

@slender iron or I can wait until you are done with it ๐Ÿ˜‰

slender iron
#

heh, I should probably assemble v2 to make sure I didn't mess I2C up

solar whale
#

I assume that as it is now, it is not good to plug any I2C feather or QWIIC into it since that will pul-up IO45 -- so for now it is a good set of headers for connecting to -- works for me

#

right now I just use jumpers to use IO0 and IO1 for I2C

slender iron
#

you can use it

#

but plug it in after it's started

#

because those pins are read at startup

#

(you'll also need to disable the check in cp)

solar whale
#

OK -- good to know

manic glacierBOT
onyx hinge
#

@prime cove another thing about monotonic_ns: CircuitPython has to switch to arbitrary precision integers whenever a value exceeds (I think?) +-2^30, so this function is essentially always dealing with objects that have to be allocated. So far we didn't come up with a solution for reporting time to the user that is (A) substantially like Python 3 (B) doesn't have precision problems, (C) doesn't wrap and (D) doesn't require allocations just to get the current time or do arithmetic on times. And, for better or for worse, we made (A) a priority over (D).

manic glacierBOT
ionic elk
#

@tulip sleet ^ I was right, it was a HAL bug! I actually got it right on the money

tulip sleet
#

excellent! how did you find out it's def a bug?

ionic elk
#

I looked at the latest version of the HAL on Github

#

and it has the exact fix I was going to suggest, already implemented

tulip sleet
#

if you just update the submodule, will you get it?

ionic elk
#

You can see it in the link I posted with my issue comment

#

yeah exactly, I'm going to suggest an update with Hathach now

tulip sleet
#

๐Ÿ‘ great sleuthing!

ionic elk
#

Yeah I had a whole big bug report written out to ST and everything and then as I was grabbing the permalink for the exact line of code that needed fixing I was like "wait a second"

#

"they already did this"

#

@slender iron I believe that discord is blocked in China btw

#

various ways around it of course

manic glacierBOT
#

Updating the submodule to include the HAL fix in version 1.24.1 resolves the hang on lower SPI speeds. I still see a one write delay at high speeds (5000000) which does not occur on low speeds (500000). Is this still a problem for your application? I'm wondering if that's just something to do with the crude nature of this test and how the HAL module handles the RXNE (RX Not Empty) register in the update. If it's still a problem for your test I can look into it further.

trim elm
#

@raven canopy Do you know if there's a way to get the adabot output from whatever runs adabot to put it on circuitpython.org?

thorny jay
#

About that "SeeedStudio Wio Terminal", is the WiFi and BLE also supported in CP?

thorny jay
#

Also Adafruit blog say "Realtek RTL8720DN" and hakster.io say "Realtek RTL7270DN"?

#

It seems that Adafruit is right: Wio Terminal: ATSAMD51 Core with Realtek RTL8720DN BLE 5.0 & Wi-Fi 2.4G/5G Dev Board

slender iron
#

@thorny jay I don't believe it is supported

#

this is just the first initial board def

#

I think they plan on following up on the screen too

tidal kiln
#

@slender iron can you link me (again) to the C code where list memory gets dynamically allocated? like when an append needs more room. as i remember - it tries to allocate 2x the current amount?

grim copper
#

@dense jasper Thanks for your help. I ran your script... and the White lights didn't activate unfortunately. I've moved the convo over to #help-with-circuitpython as per your suggestion.

slender iron
#

@tidal kiln yup! looks right

tidal kiln
#

cool. thanks!

slender iron
#

ok, I'm gonna work on a release

#

will be 6.0.0-alpha.1

#

will do one more pass over PRs

manic glacierBOT
topaz quest
#

@slender iron I'll rebase and do the conflict dance later/tomorrow.

I'm still trying to get a hold of Brad Conte for some of the source files that are without a license and with a public domain dedication in passing.

slender iron
#

kk, np

#

I'm just doing a sweep over PRs before a release

manic glacierBOT
thorny jay
#

this is just the first initial board def
@slender iron It seems that their marketting department is quick to announce support... they could not even wait for a release to be available on circuitpython.org. ๐Ÿ™‚

slender iron
#

got a link to it?

#

I am working on a release right now

manic glacierBOT
thorny jay
#

@slender iron it's on adafruit blog pointing to hackster.io and Seeed web site. Let me search, I was on my phone.

slender iron
#

ya, I saw it on the adafruit blog. we like to post things asap ๐Ÿ™‚

thorny jay
#

If we have full support, that will make a great board supported both by MP and CP. Also BLE and Wifi and screen and Pi HAT...

slender iron
#

the screen should work with the ILI9341 driver

thorny jay
#

And that "HiiBot BlueFi by Hangzhou LeBan": CLUE format, Wifi, BLE, screen... but I could not find it anywhere but on Adafruit.

slender iron
#

Some folks want to associate their board with the CircuitPython for the name recognition. ๐Ÿ™‚

thorny jay
#

That's "fine" except that if a board is only partially supported... they should be more explicit: "Screen, BLE and Wifi are not supported yet... but you have REPL and GPIO"

manic glacierBOT
slender iron
#

@thorny jay I can't help the messaging myself

manic glacierBOT
manic glacierBOT
#
[adafruit/circuitpython] New tag created: 6\.0\.0\-alpha\.1
onyx hinge
#

๐ŸŽ†

manic glacierBOT
idle owl
#

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

manic glacierBOT
slender iron
#

looks like files.json is too large now: {"message":"This API returns blobs up to 1 MB in size. The requested blob is too large to fetch via the API, but you can use the Git Data API to request blobs up to 100 MB in size.","errors":[{"resource":"Blob","field":"data","code":"too_large"}],"documentation_url":"https://developer.github.com/v3/repos/contents/#get-contents"}

manic glacierBOT
#

When initializing an object, the error that is produced when the wrong number of positional arguments is given shows the wrong number of arguments given and required. It is off by +1. From my testing, this only happens when the object being initialized is a subclass.

Example:

import board
import neopixel # subclass of either _pixelbuf or pypixelbuf, depending on CP version and/or board

extra_arg = None

pixels = neopixel.NeoPixel(board.D5, 24, extra_arg) # This is suppose...
manic glacierBOT
manic glacierBOT
#
manic glacierBOT
manic glacierBOT
thorny jay
#

I know the Monday meeting is on Monday. But what is the US rule when the 4th of July is on a Saturday?

spare prawn
#

@slender iron I am following up on this discussion https://discordapp.com/channels/327254708534116352/537365702651150357/727020698782138408 we had about extending CP to add a ISR to sample I2C (in my case ads1115) into a buffer. I have read through the examples for extending CP. Would you be able to give me an outline of steps of the approach you were imaging? Would you have any example you could point me at of something similar? Thank you!

slender iron
#

@spare prawn what time zone are you in? Iโ€™m about to go to bed but can coordinate tomorrow

#

@thorny jay most folks have Friday off and some have Monday off too. The meeting will be on Monday like it is on the calendar

#

๐Ÿ’ค will be around tomorrow

thorny jay
#

Timezone are a strange thing, especially with early bird and late sleeper... I am just starting my day here. ๐Ÿ˜‰

manic glacierBOT
onyx hinge
#

@thorny jay In the US, for holidays that are not on a fixed day of the week, in general, they are "observed" on the closer weekday to when they occur -- so saturday -> friday, and sunday -> monday. Here's what the library we're using for holidays says:

>>> for date in ('2020-7-3', '2020-7-4', '2021-7-4', '2021-7-5'): print(date, hols.get(date))
... 
2020-7-3 Independence Day (Observed)
2020-7-4 Independence Day
2021-7-4 Independence Day
2021-7-5 Independence Day (Observed)
manic glacierBOT
onyx hinge
#

@thorny jay If we had talked about it beforehand, the Americans might have preferred to go ahead and shift this meeting, but since it was NOT discussed explicitly in advance we felt it was fairest to everyone to keep the date we had scheduled.

manic glacierBOT
#

Reproduced. I also tried a third layer of class nesting (not shown), and got the same off-by-1 error (as opposed to, say, off by 2).

This bug is also present in MicroPython, so I'll file an issue there.

class A:
    def __init__(self):
        pass

class B(A):
    def __init__(self):
        super().__init__()

try:
    print("A(1)")
    A(1)
except Exception as e:
    print(e)

try:
    print("B(1)")
    B(1)
except Exception as e:
    print(e)
thorny jay
#

@thorny jay If we had talked about it beforehand, the Americans might have preferred to go ahead and shift this meeting, but since it was NOT discussed explicitly in advance we felt it was fairest to everyone to keep the date we had scheduled.
@onyx hinge That's fine, I am not American. That was the only US special day I know about, all the other were surprise to me.

ionic elk
#

@slender iron I'm trying to sign up for wechat, but I'm getting a security verification step with a QR code that requires a wechat user who's been on it for more than a month?

#

Did you do that?

topaz quest
#

I remember signing up without anything like that (but it was ~3 years ago)

spare prawn
#

@slender iron I am in Pacific USA timezone.

manic glacierBOT
slender iron
#

@ionic elk have pt add you by phone number. I had a friend add me

#

@spare prawn ok, me too. I'm up now

manic glacierBOT
spare prawn
#

@slender iron Hi, Iโ€™m online now.

slender iron
#

@spare prawn ok, so you looked at the extending guide and would like an example?

#

I should be able to find a PR

spare prawn
#

@slender iron ok great, i guess my general hope is an example showing how to integrate an ISR and understand what else is going on interrupt wise so when i start to debug i can reference that.

slender iron
#

I2C ISR right? I don't think we use it directly

#

for SAMD I think it's done through ASF

manic glacierBOT
spare prawn
#

@slender iron I guess I need to research what that means. CP on SAMD and a mechanism called ASF? So look at CP for SAMD?

slender iron
#

what chip do you want to add it for?

spare prawn
#

i am working with NRF

slender iron
#

ah, oops ๐Ÿ™‚

#

then you don't need ASF

#

basically, it's the software library for the atmel chips

#

on nrf it's nrfx

spare prawn
#

ah

#

so look at nrfx?

slender iron
#

I think so. Is your goal to have a timer trigger an I2C read at a set interval?

spare prawn
#

looking at GNSS.c it would seem that ISR init would happen at instantiation of object? I was thinking of just trying to do a blinking LED first. Prove i can build and interface.

#

yes that is my goal...read values...put into a ring buffer

slender iron
#

kk

#

ya, we usually turn interrupts on when an object is initialized

#

UART has an example of a ringbuffer I think

spare prawn
#

maybe i try to stand that up blinking, then simple ring sans io, prove that, then work on getting i2c running...will take UART as reference?

slender iron
#

sounds like a plan!

spare prawn
#

๐Ÿ‘

manic glacierBOT
slender iron
#

can someone look at โ˜๏ธ? It'll help me finish the release

slender iron
#

thanks!

orchid basinBOT
onyx hinge
#

I suppose using a "files.json.gz" is not feasible for techncal reasons?

slender iron
#

it wouldn't be human readable then

manic glacierBOT
slender iron
#

anyone around to do the 6.0.0-alpha.1 review?

spare prawn
#

@slender iron I have not had a chance to do more than a quick first pass but I wanted to ask what your sense of the architecture of a more general solution might look like. For example does this need to be integrated with the event infrastructure, other drivers etc or could it be a custom thing for each platform. I could see the benefits of both approaches and in general would like to keep things as low overhead and simple as possible. But for example I am curious if this could be kept within the "shared" concept instead of writing drivers etc. I am also perhaps not understanding how everything works. At any rate any suggestions would be greatly appreciated.

slender iron
#

for now I'd just do it for nrf

#

we can always broaden it later

spare prawn
#

and within NRF what would the components be?

slender iron
#

I'd probably duplicate uart because of the ring buffer and take in an I2C and a command

#

then within the module setup the timing and do the i2c

#

I'm starting to stream now so I won't be able to reply further

spare prawn
#

ok np, thanks!

manic glacierBOT
#

Hi,

I'll request a new PID for this revision and submit a new PR.

I just set up a preliminary page on Hackaday. The link is
https://hackaday.io/project/173537-feathersnow-v2

Thanks,
-Henry

On Thu, 2 Jul 2020 at 15:00, Scott Shawcroft notifications@github.com
wrote:

@tannewt requested changes on this pull request.

Thanks for the new board! Do you have a link to info about the new board?

In ports/atmel-samd/boards/ndgarage_ndbit6_v2/mpconfigbo...

fallen rivet
#

Just loaded 6.0.0-alpha.1 on my ESP32S2-WROVER and the storage class (CIRCUITPY) driver is working but I can't get the CDC control endpoint (239A:80A6) talking on my Windows 8 host. Is there is a USB driver I need to force install? Update: I'm good now - Zadig sorted me out.

#

Sorry it's the WROVER version

manic glacierBOT
fallen rivet
spare prawn
#

@slender ironIs there an example that shows initialization and use of a timer interrupt including setting priority?

#

i am looking at watchdog but its not working in this version of CP. It also appears to be missing initialization unless i have misunderstood what i am looking at.

slender iron
#

@spare prawn timers are usually used in pulseio

manic glacierBOT
onyx hinge
#

huh, I'm puzzled. I ran across this: mp_raise_TypeError(translate("%%c requires int or char")); -- note that it's not a _varg call, so how does the extra % disappear in the message?

#

even weirder, in micropython 1.12ish, the %% is doubled in the message.

#

okay, in cpy mp_obj_new_exception_msg calls mp_obj_new_exception_msg_varg, which explains it .. it's just a surprise, that the non-_varg in the outermost function needs its literal percent signs doubled

#

'night

#

55830dd9bf4fee87c0a6d3f38c51614fea0eb483 in micropython changes this, but it missed removing the doubled percent in that one message

manic glacierBOT
crimson ferry
#

Has anyone else gotten the dreaded guru meditation error (IntegerDivideByZero) on ESP32-S2 with spi = busio.SPI(board.IO36, board.IO35, board.IO37)? (CircuitPython 6.0.0-alpha.0-69-gfcddfd0f3)

solar whale
#
Adafruit CircuitPython 6.0.0-alpha.1 on 2020-07-03; Saola 1 w/Wrover with ESP32S2
>>> import board
>>> import busio
>>> spi = busio.SPI(board.IO36, board.IO35, board.IO37)
>>> 

#

no error here

#

let me update to latest

#

don't think the latest changes are relevant butt just takes a few minutes...

#

did you get the error at that line or actually using SPI? What device are you using?

#
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-alpha.1-7-gf6aee9800 on 2020-07-04; Saola 1 w/Wrover with ESP32S2
>>> import board
>>> import busio
>>> spi = busio.SPI(board.IO36, board.IO35, board.IO37)
>>> ```  still ok here
crimson ferry
#

Thanks @solar whale I picked the version where SPI was merged into the Adafruit repo, but I'll update to latest. I don't get past the spi = line, no circuitpython exceptions caught, just guru meditation error on the usb connector. It works in REPL as you posted, so I'll try to narrow down preceding code or imports that could be complicating things.

solar whale
#

I just hooked up a BME280 sensor via SPI and it is working -- I was not able to get an SDCard to work

crimson ferry
#

If I get this working, I'm going to try an Airlift ๐Ÿ˜‰

solar whale
#

ooh - good idea -- I'll try one as well.

solar whale
#

hmm -- running out of memory...

#

@crimson ferry I am running out of RAM when I try to run the esp32spi_simpletest -- it starts with ~63K of RAM -- not sure what ESP32SPI needs

crimson ferry
#

17k just for the import (from Scott's deep dive yesterday)

#

We may have to wait until the memory sharing with RTOS and all that gets figured out and user memory can get bumped

#

I may still have a pared-down version of esp32spi around that I was trying to get onto a M0 ๐Ÿ˜‰

solar whale
#

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

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-alpha.1-7-gf6aee9800 on 2020-07-04; Saola 1 w/Wroom with ESP32S2

import gc
gc.mem_free()
63728
import esp32spi_simpletest
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "esp32spi_simpletest.py", line 7, in <module>
File "/lib/adafruit_esp32spi/adafruit_esp32spi_socket.py", line 19, in <module>
MemoryError:

crimson ferry
#

yeah, I don't think the WROVER external PSRAM is configured in yet

solar whale
#

well -- nice to see SPI working with the bme280 -- good start

sick yarrow
#

I'm excited to try out CircuitPython and am hoping to teach a student who wants to dabble in SW & HW. I think he'll be glad to be able to re-use the Python skills for other future programming (RaspPi, CS classes, maybe ML). We both want to do WiFi connected IoT and so my hope was to use the HUZZAH32, until I realized it's not supported yet in CircuitPython ๐Ÿ˜ข . In lieu of that, what's the next best HW platform to start with? Will a Feather M4 Express + FeatherWing(ESP32) work out ok with CircuitPython? Any other recommendations?

crimson ferry
#

yes, definitely

#

@sick yarrow ESP32 is not in the cards for direct support, but as you noted it's used as the wi-fi co-processor with the ESP32SPI library. There is development of the new ESP32-S2 chip for direct support by CircuitPython.

solar whale
#

The feather_m4_express will work well with the Airlift Featherwing https://www.adafruit.com/product/4264 - you can also consider the feather_nrf52840_express with the airlift featherwing if you want to try BLE

crimson ferry
#

There are tons of board combinations that could work... there's a Metro with Airlift built in, or one of the PyPortals.

solar whale
#

or the metro_m4_airlift_lite -- already has the ESP32 module

#

yes pyportals have displays -- many options

sick yarrow
#

Great, thanks for those suggestions! @solar whale @crimson ferry

solar whale
#

if you go with a featherwing for the esp32 -- make sure it is the airlift, not the Huzzah ESP32 feather board

sick yarrow
#

My other question about CircuitPython and these HW platforms is whether or not we'll be able to put the HW into standby/sleep states, to do battery-powered projects that can last much longer by only waking up as needed to sample sensors and transmit over WiFi, for example. Can that be done at the python level, or does it require any lower level processing/C work?

solar whale
#

There has been a lot of recent work on the low power modes, but i am not sure of the status at this point. I hope someone more knowlegeable can comment.

thorny jay
#

In one of the 5.x @slender iron added support for some sleep mode. But I have never seen it in use, nor a board specifically build to limit the transient current. Today I would use a TPL5111 to control the enable pin (or TPL5110 to control the power) and have sleep of a fixed among of time, and at each wake up do what you want to do (and write the code as a state machine that record it's state before shutting down). But I don't know how to wake up on GPIO or a voltage level on a ADC. Maybe there is a learn guide in preparation that explain the low power mode.

tulip sleet
#

we have implemented a simple low-power mode right now that goes into a light sleep mode until an interrupt arrives. Deeper-sleep modes with lower power consumption are on our radar but are not being coded at this moment.

thorny jay
#

In ESP32 there is a "language" to program the low power computing and wakeup rules. Maybe that is there in ESP32S2?

tulip sleet
#

@solar whale off-topic q here: I am corresponding with some linux devs about the USB-related crashes. I want to be precise about what you have seen. Have you seen crashes on unplugging only, or just on plugging in?

#

if the latter, is it not long after you have unplugged?

solar whale
#

only on unplug and immediatley

tulip sleet
#

so it's been connected for a while and then you unplug, and poof

solar whale
#

yes - exactly -- sometimes -- sometimes OK

tulip sleet
#

have you ever seen it on resetting the board but not unplugging?

solar whale
#

BTW -- it has not happened on my RPi ... yet

tulip sleet
#

did anyone report it happening on RPi?

solar whale
#

not that I am aware of

#

as to RESET, I am not certain, but I think it did happen ... if you need me do I can try it

sick yarrow
#

@thorny jay I like your idea of the TPL511x options. I don't need a wake on external input (though that'd be sweet someday), and I think we can do a lot with a simple timed power-off. Maybe I can rig up a way to kill the power feed to everything (main board plus any attached Wings) except the TPL?

solar whale
#

@tulip sleet have done several RESET with esp32s2 board and not triggered it

#

of course unplugging it did not trigger it either...

tulip sleet
#

not necessary now, since I've seen that too. I am looking for additional failure modes.

onyx hinge
#

@tulip sleet It's @raven canopy who had trouble with his pi crashing when trying to reset boards. It was affecting his rosie pi work. I think he's seeing it less after some changes on his end, but I don't know the details.

manic glacierBOT
manic glacierBOT
#

I saw the pre-built failed again due to the CRLF or the end of file things.
I am using a mac. Is it possible to have automatic conversion when I commit
the changes to my branch? I know that .gitattribute can be used for this
purpose. But how?

On Sat, 4 Jul 2020 at 11:03, Dan Halbert notifications@github.com wrote:

Have updated my branch with a new USB PID. Not sure if I should create a
new PR?

No new PR is necessary. (A PR is rarely perfect the first time ๐Ÿ˜ƒ) You
pushed the chang...

crimson ferry
#

@solar whale I figured it out, I had brought over some code that was the problem in this case. Turns out spi.configure(baudrate=non_zero_value) will crash if the parameter is zero.

solar whale
#

Does the airlift work for you?

crimson ferry
#

Haven't gotten that far yet

#

SPI will go up to 80MHz though (defaults to 250k)

crimson ferry
#

PyPortal:dir(str) ['__class__', '__name__', 'center', 'count', 'encode', 'endswith', 'find', 'format', 'index', 'isalpha', 'isdigit', 'islower', 'isspace', 'isupper', 'join', 'lower', 'lstrip', 'partition', 'replace', 'rfind', 'rindex', 'rpartition', 'rsplit', 'rstrip', 'split', 'splitlines', 'startswith', 'strip', 'upper']

#

ESP32-S2:>>> dir(str) ['count', 'endswith', 'find', 'format', 'index', 'isalpha', 'isdigit', 'islower', 'isspace', 'isupper', 'join', 'lower', 'lstrip', 'replace', 'rfind', 'rindex', 'rsplit', 'rstrip', 'split', 'startswith', 'strip', 'upper']

crimson ferry
#

@solar whale wi-fi scan, ping, ntp all work fine. there seems to be enough memory for requests ```LAN ping: 10ms
WAN ping: 250ms
Fetching text from http://wifitest.adafruit.com/testwifi/index.html

Text Response: This is a test of Adafruit WiFi!
If you can read this, its working :)

200 b'OK' {'server': 'nginx/1.10.3 (Ubuntu)', 'content-type': 'text/html', 'date': 'Sat, 04 Jul 2020 19:31:47 GMT', 'last-modified': 'Thu, 16 May 2019 18:21:16 GMT', 'connection': 'close', 'content-length': '70', 'etag': '"5cddaa1c-46"', 'accept-ranges': 'bytes'}

โฐ NTP: 0
โฐ NTP: 2020-07-04T14:31:53-05:00
โฐ NTP: 2020-07-04T14:31:58-05:00```

solar whale
#

nice!

#

sockets was the killer, I think.

crimson ferry
#

I haven;t tried WiFiManager, maybe that's what puts it over

#

I actually have a use case for esp32-s2 with an additional esp32spi co-processor ๐Ÿ™‚

solar whale
#

I just tried the esp32spi_simpletest when I ran out of memory

crimson ferry
#

oh, strange, no WiFiManager on that one, I'll try it...

#

I didn't get any memory errors, just the ujson missing

#

I'm still on CircuitPython 6.0.0-alpha.0-69-gfcddfd0f3

solar whale
#

hmmm -- ah -- I was using the .py libs -- are you using the .mpy

crimson ferry
#

July 4th libraries

#

yes, .mpy

solar whale
#

that's why...

#

I forgot -- used to sprawling out on the other boards....

crimson ferry
#

Just a matter of time hopefully, this board has plenty of resources

solar whale
#

better, but not quite ```
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-alpha.1-7-gf6aee9800 on 2020-07-04; Saola 1 w/Wroom with ESP32S2

import esp32spi_simpletest
ESP32 SPI webclient test
ESP32 found and in idle mode
Firmware vers. bytearray(b'1.4.0\x00')
MAC addr: ['0x21', '0x54', '0xd', '0x33', '0x4f', '0xc4']
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "esp32spi_simpletest.py", line 48, in <module>
File "adafruit_esp32spi/adafruit_esp32spi.py", line 404, in scan_networks
File "adafruit_esp32spi/adafruit_esp32spi.py", line 381, in get_scan_networks
File "adafruit_esp32spi/adafruit_esp32spi.py", line 308, in _wait_response_cmd
File "adafruit_esp32spi/adafruit_esp32spi.py", line 292, in _wait_response_cmd
File "adafruit_esp32spi/adafruit_esp32spi.py", line 268, in _wait_spi_char
RuntimeError: Error response to command

crimson ferry
#

is it consistent, or just one of those intermittent SPI glitches?

solar whale
#

repeatable so far

#

I am using IO2/3/4 for RST/READY/CS

crimson ferry
#

I used IO 1,2,3 for spi, and 4,5,6 for the extras (b/c I'm still on a half-size breadboard)

solar whale
#

it clearly communicates ok to get MAC address.

#

ah using 35/36/37 for SPI

crimson ferry
#

I'd be surprised if the pins made the difference. The File "<stdin>", line 1, in <module> seems like an oddity in the trace?

#

or is that from importing code into the REPL or another file?

solar whale
#

I think that is typical when importing from REPL

#

import esp32spi_simpletest

#

I took out the scan and just tried connecting to my AP ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 6.0.0-alpha.1-7-gf6aee9800 on 2020-07-04; Saola 1 w/Wroom with ESP32S2

import esp32spi_simpletest
ESP32 SPI webclient test
ESP32 found and in idle mode
Firmware vers. bytearray(b'1.4.0\x00')
MAC addr: ['0x21', '0x54', '0xd', '0x33', '0x4f', '0xc4']
Connecting to AP...
could not connect to AP, retrying: Error response to command
could not connect to AP, retrying: Error response to command
could not connect to AP, retrying: Error response to command
could not connect to AP, retrying: Error response to command
could not connect to AP, retrying: Error response to command

#

Will have to resume tomorrow --- dog wants a walk ...

manic glacierBOT
#

I had a spate of these a fortnight ago and I just got one now on a CLUE running 5.3.0 and fairly recent libs (20200625).

Listening for (,)
Traceback (most recent call last):
  File "code.py", line 1520, in 
  File "code.py", line 914, in broadcastAndReceive
  File "code.py", line 691, in startScan
  File "adafruit_ble/__init__.py", line 235, in start_scan
MemoryError: memory allocation failed, allocating 65536 bytes

That number is clearly suspicious for being so large an...

manic glacierBOT
#

The issue has been traced to the amount of time it takes to synchronize the RTC timer when the COUNT field is accessed. It can take more than 100us, which exceeds the length of the incoming DHT pulses. As a result, interrupts will be missed. The solution is to utilize the continuous synchronization ability of the RTC. Since that setting will be reset anytime an RTC register is written, those writes , which are primarily done in port_interrupt_after_ticks(), will need to be avoided for the dur...

manic glacierBOT
thorny jay
#

Maybe we are missing a adafruit-circuitpython-bundle-6.x-mpy-YYYYMMDD.zip :
You can always find the latest releases of the libraries bundle on GitHub.
Bundle Version 5.x
This bundle is built for use with CircuitPython 5.x.x. If you are using CircuitPython 5, please download this bundle.

#

I know/guess that there are no difference between 5 and 6 (and maybe 4). But since a major version in the past changed the mpy format, the documentation say to take the associated bundle.

solar whale
#

@thorny jay the 5.x bundle will work with 6.x -- as far as I am aware there is no difference in the 4/5.x bundles. The .mpy format has not changed since 3.x. I expect we sill see a 6.x bundle version soon.

thorny jay
#

Yes thank, but our documentation say one need to take the matching version... I reased an issue on circuitpython-org.

solar whale
#

I saw and you are correct. It should be made consistent and i'm sure it will be soon.

thorny jay
#

One question in that issue is the whole depreciated I2C (or other) stuff. If library rely on that, they break (I think we avoided that). So that was one the point raised by @tulip sleet "In the weed".

#

I have not raised an issue, but there are 3 unknown board, and I don't see where that come from while quickly browsing the repo. I only see one unknow.md, so maybe that one get's use when there is a board but no specific information.

solar whale
#

good point and a major version release often means thinks break... I have not run into any issues ...yet

thorny jay
#

Also that nice!nano (I did try to order one, but they only produce 1000 and in less than 6H it was sold out).

stuck elbow
#

@thorny jay I don't have a fully working version of that board yet

manic glacierBOT
thorny jay
#

What about a fully working picture? ๐Ÿ˜‰

solar whale
#

@crimson ferry FYI -- my featherwing airlift works normally (up to ujson) with the esp32s2 -- using differenet pins (33/38/34 for READY/RST/CS) . Not sure why the breakout was not working- even tried with same pins.... ahh -- the issue appears to be related to way I had it wired to the breadboard. Got the afirlift breakout board working as well

manic glacierBOT
#

Hey @dhalbert ,

Sorry to bother you again on this one. I have one last issue / question.

How do you trigger / run the gen_usb_descriptor.py file? I tried building some boards but it doesn't trigger the updates / changes. The usb_hid.devices array still only has 4 devices.

Thought I would ask as it might be quicker than working it out myself ๐Ÿ˜„

manic glacierBOT
#

Have no fear! I figured it out. Notes below for reference (and for when I inevitably forget tomorrow ๐Ÿคฃ ).

ports/atmel-samd/boards/<your board here>/mpconfigboard.mk

USB_HID_DEVICES="KEYBOARD,MOUSE,CONSUMER,GAMEPAD,<custom>"

The gen_usb_descriptor.py script does check the defaults array as proposed by you Dan, however, only as an error checking mechanism. It takes the given value string as the source of truth. It takes the USB_HID_DEVICES from the individual board conf...

manic glacierBOT
orchid basinBOT
#
  • Is it OK to use Version 5.x for CP 6.x?

Yes.

  • Is Version 5.x any way different from Version 4.x?

No.

  • Does that only change with MPY format change or there are other possible area if incompatibility such as depreciated and now removed things in I2C API?

Right, it would be for a .mpy change, but there hasn't been one for a while. We have talked about having different bundles for different versions, but haven't come up with a mechanism yet. Instead, right now we add compa...

manic glacierBOT
#

Wouldn't this be originating from one of the m_malloc calls buried in the C code?

It does not occur with long runs which is partly why I suspect it's not my app and could be either a peculiar buried bug in CP for size (like an absent initialisation) or a roguish random BLE packet in the ether, i.e. it could be when someone with a particular high power BLE device walks down my street broadcasting unusual Advertisement packets.

This might be worth running up briefly but I wouldn't spend...

solar whale
crimson ferry
#

@solar whale Good to hear it's working! I thought maybe it was something spurious, there aren't very many special pins that I know of (0, 18, 19, 20, 26, 43, 44, 45, 46), nothing in the 30s.

solar whale
#

Since the saola is too big for a single breadboard, I combined some like the picture above. The issue I am having is that the Airlift breakout only works reliably if I connect the 3V and GND as shown - directly to the board pins. If I move either 3V or GND to the "rail" it fails during some SPI transactions. Anyone have a clue why?

main meteor
#

WiFi current spikes and inductance? Maybe some local capacitance at the power supply pins might help?

solar whale
#

I tried a 100microfard cap in the "rail" but no help from that.

#

but that seesm like the issue -- it happens when WiFi is active.

main meteor
#

That is odd. Maybe just some connection resistance, in which case you could try different holes, or it could be that the wires are acting as an antenna. I'll admit I'm just guessing here.

solar whale
#

Thanks -- all makes sense -- all guesses welcome.

solar whale
#

Itโ€™s happy this way and I can work with it. Lost to many hairs over this already...

main meteor
#

Sometimes you just have to roll with what works and get on with what you were originally doing.

topaz quest
#

hah, I had a "deja vu" feeling on one of the python-pcapng pull requests, then I realised that @slender iron wrote the first couple of commits in that pull request ^^;

lone axle
#

is it "bad" to add things to board within a script? like on a device without a built-in display to set up the display and then do something like this board.DISPLAY = display that way the rest of the script can use board.DISPLAY as though it were actually built-in even though it's not.

crimson ferry
#

Does that work? I get AttributeError: 'module' object cannot assign attribute

lone axle
#

I does work for me, though I've only used it on Blinka / RasPi

#

and after thinking about it a bit more. I think the opposite might make more sense. use the display variable throughout the rest of the script. and at top use display = board.DISPLAY for devices with it builtin.

#

Mostly I'm just looking for the most painless way share code.py scripts between built-in displays vs. external displays.

crimson ferry
#

Wow, I haven't done anything with Blinka, but looks like board is just assignments rather than an immutable class (I may be abusing that term)?

turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Region

us-west

Channel Categories

8

Text Channels

53

Voice Channels

6

Members

21832

Roles

32

stuck elbow
#

@crimson ferry it's a module implemented in C

manic glacierBOT
manic glacierBOT
bright aspen
#

I have been using _bleio in a GAEN sniffer for supporting the work at Covid Watch. Anything coming that might break my code or I want to exploit?

#

Is it possible to inherit from a ScanEntry. (I haven't even tried. Yet.)

tulip sleet
#

@bright aspen You can subclass ScanEntry, but the other native classes won't know what to do with that. Have you considered using Adafruit_CircuitPython_BLE as a wrapper, or modifying it?

crimson ferry
#

@slender iron Maybe this is an in-the-weeds topic for 3 months from now, but I've been experimenting with improving the blocking nature of requests, getting potentially much more non-blocking time by separating the request send and response receive (polling .available on a tighter loop to trigger receive). In big python, requests has separate connect and read timeouts but isn't async-friendly without some added framework on top, but in our embedded environment some additional API may be justified. HTTP 1.1 keep-alive should help with overall performance, but perhaps we can provide less blocking through exposing more granularity of the requests process as an optional part of the API.

bright aspen
#

@tulip sleet, I did briefly consider Adafruit_BLE a few months ago, but at the time it seemed complicated. I know I am duplicationg some work. The documentation is unclear to me. I can't find a defintion of advertisement types. The example shows a scan_entry attribute but none is in the documentation. I did consider creating a class that contains a _bleio ScanEntry, but right now I am using a tuple (ns, channel, scan_entry).

bright aspen
#

It might be that I"m looking at old documentation.

manic glacierBOT
manic glacierBOT
#

A small bump on this, as it's something I'd really love to see happen.

Notable things that we'd get:

  • Type annotations (PEP 526).
  • Walrus assignment operator (PEP 572).
  • Matrix multiplication @ operator (PEP 465).
  • Underscored numeric literals (PEP 515).
  • Support for dynamically loading native modules in mpy files.
  • Numerous code size improvements.
  • Significantly better native code emitter.

I don't presently have the time (or expertise) to do this myself, but I would...

lone axle
#

the discord link in their readme is showing invalid. Should they get linked to http://adafru.it/discord ?

slender iron
#

@topaz quest I think you and I have crossed paths since gentoo a decade or more ago

manic glacierBOT
silver tapir
#

@slender iron I was a gentoo dev as well :). (sparc64 stuff)

manic glacierBOT
#

Shouldn't:

ReadableBuffer = Union[bytes, bytearray, memoryview, array.array, mmap.mmap]
WriteableBuffer = Union[bytearray, memoryview, array.array, mmap.mmap]

Be:

ReadableBuffer = TypeVar['ReadableBuffer', bytes, bytearray, memoryview, array.array, mmap.mmap]
WriteableBuffer = TypeVar['WriteableBuffer', bytearray, memoryview, array.array, mmap.mmap]

To account for functions that accept and then return the same buffer? Like AnyStr is!

topaz quest
#

@slender iron @silver tapir it's a small world I guess ๐Ÿ˜„

light sapphire
#

ok

manic glacierBOT
lucid solar
#

@ionic elk What's your plan for STM32 support over the next couple of months? Is there some family you're going to write support for? I'm ordering some MCUs / dev boards in a day or 2 so want to ensure I can test all STM32 that CPY supports.

ionic elk
#

I move back and forth between STM32 support and i.MX support, and Scott has recently asked me to start checking out the ESP32, so I won't necessarily guarantee that I'll be directly involved with any new STM32 families. If I am, it'd be the F1 (I think the hope is that the Chinese community will take over that but I haven't seen any firm indication of that) or the L5.

#

In all cases we're focusing on chips that have at least the stats of a SAMD21.

lucid solar
#

Ok...I've started L4/L5 support....the USB stack is different to the one we use at the moment...so I've started to port that.

ionic elk
#

Module wise I'll be aiming for RotaryIO, better NVM, more displayIO stuff, etc

#

@lucid solar I'm not sure what you mean. We will probably support L5 if and only if tinyusb adds support.

lucid solar
#

They do support it...

#

It's not the usb stack...but...err...tinyusb has support for both...

#

CPY works with synopsys, but not stm32_fsdev

#

I'm about 80% done with the flash support for L4 also. I'm using a L433 on a board I've made, so that's my main focus at the moment.

idle owl
trim elm
#

@lone axle Wasn't there a library you added display rotation to? I was wanting to use it in this project I'm working on with pyportals

#

Ah, that was the gesture sensor

lone axle
#

@trim elm I think the rotation thing I... yep

trim elm
#

oh, I did not know that

lone axle
#

The other thing I did recently with rotation was test the rotation with Blinka_Displayio when melissa implemented it.

trim elm
#

Ok

#

But yeah, I think that pr is exactly what I'm looking for

lone axle
#

Thank you @idle owl I will make PRs for the ones I've found later tonight. If it turns out to be a widespread issue I may try to pick your brain a bit @raven canopy to see if you know any tricks that could help us automate checking for dead discord links in the readme and updating them.

idle owl
#

@lone axle Updating the readmes is a bit tricky because they're different from each other. But it's doable. I would find out how widespread it is first so you're not wasting time on a few PRs if we're doing it overall.

onyx hinge
#

Hi all and especially <@&356864093652516868> ! The weekly voice meeting is starting in about a half hour, at 2PM US Eastern time. If you can, please add your notes (hug reports and status updates) to the document https://docs.google.com/document/d/1FciLohS6r-mTAAGyOgZYshFS0YRcj7bAAVjMvaINLb4/edit -- If you'll be listening in but not participating, letting us know that is SUPER helpful. Just tell us you're "lurking", or write it in the doc.

lone axle
#

Todays document seems different somehow

idle owl
#

Someone changed the margins.

lone axle
#

ah

ivory yew
#

my whitespace!

modern wing
#

Good afternoon all you wonderful folks -- happily lurking today, doc is updated ๐Ÿ™‚

errant grail
#

Listening only today.

idle owl
#

@modern wing Thanks!

onyx hinge
#

oof my mic's not set up

modern wing
#

That's contagious Scott ๐Ÿฅฑ

silver tapir
#

Listening only.

inland tusk
#

good day everyone.

modern wing
#

lol. s'allright, I've been fighting the weight of my upper eyelids all day.

turbid radish
#

Lurking today

ivory yew
#

I'm going to have to find a talking stick for @onyx hinge and @slender iron

turbid radish
blissful pollen
#

Gotta burn your house down, only way to make sure the wasps are gone

idle owl
#

@blissful pollen I support this method.

maiden chasm
#

Hello to great CircuitPython team,

ivory yew
#

wasps are better than hornets.

idle owl
#

@maiden chasm Hello!

maiden chasm
#

I'm lurking today

onyx hinge
#

@maiden chasm Thanks, I'll note it in the doc

silver tapir
#

Reminds the time we had tome huge costarincan (bigger that yellow) hornets in the feeder of a vsat antenna (when people still used vsat...)

old smelt
#

Lurking

silver tapir
#

A weird species that gives honey, btw.

onyx hinge
#

Not a true story, but I could say that I quit my old job because of the wasp nest above the front entrace.

#

.. just something that happened at around the same time though

modern wing
#

Honeybees? That's worth a call to a local beekeeper. Wasps? Well....that's where a less than kind approach needs to be taken. Late at night when they're dormant.

silver tapir
#

Nah, wasps are cool. Don't kill them ๐Ÿ˜ฆ

blissful pollen
#

I had a hornet nest over my driveway and noticed after i parked my convertible right under it shudder

ivory yew
#

wasps are a no-go for me, since I'm allergic to wasp stings.

silver tapir
#

If they are native bees, in spanish we call them "meliponas", they give out honey and don't have stingers. Recommended hobby for everyone in america.

onyx hinge
ivory yew
#

deadly boi

modern wing
#

That's nightmare fuel ๐Ÿ™‚

silver tapir
#

Release 6.0 is gonna be called "wasp" ๐Ÿ™‚

uncut nexus
#

lurking today

ivory yew
#

let's call it "Stingy death boi" instead.

gilded cradle
#

I kept having wasps trying to build nests in my outdoor grill. I just turned it on a couple times and they stopped building there.

lone axle
#

I had "Cicada Killers" at my old place. The would swarm around the backyard a few times a day. They look like the most gnarly wasps, but don't tend to mess with humans.

ivory yew
#

poor scott is trying to have a meeting and we're still on wasps

gilded cradle
#

lol

onyx hinge
#

๐Ÿ nice to scott

ivory yew
#

"you can ๐Ÿ text only"

blissful pollen
#

This may ๐Ÿ distracting

ivory yew
#

aw, I miss 2017.

turbid radish
#

2๐Ÿ || !2๐Ÿ

onyx hinge
#
Hackster.io

Available in source now and as a pre-built firmware soon, CircuitPython support for the Wio Terminal is here at last.

The Seeed โ€˜s Wio Terminal is an ATSAMD51-based microcontroller with wireless connectivity supported by Realtek RTL8720DN. Its CPU speed runs at 120MHz (Boost up to 200MHz). Realtek RTL8720DN chip supports both Bluetooth and Wi-Fi providing the backbone for IoT projects. The Wi...

modern wing
#

Community News -- it really generates a buzz for CircuitPython.

gilded cradle
#

Geez, what is this, a sting operation to distract Scott?

onyx hinge
turbid radish
#

Yes

onyx hinge
onyx hinge
onyx hinge
turbid radish
#

Awww, ty

onyx hinge
#

Thank you to the new authors who are contributing translations on Weblate!

#

@timber mango let us know if you will have anything to contribute during Hug Reports or Status Updates. If not, we'll assume you're just listening in. ๐Ÿ‘‹

marble hornet
#

Lurking

lone axle
#

I hear your mic TG Techie

onyx hinge
#

BH1750 Ambient Light Sensor

marble hornet
#

Un-lurking

manic glacierBOT
thorny jay
#

Sorry, not participating this week. I have put my (or some) Hug report... and did not do much, so no Status Report.

slender iron
#

thanks @thorny jay !

manic glacierBOT
ivory yew
#

my brain doesn't work with bitwise math

#

or hex math

#

nei

lone axle
#

I don't

marble hornet
#

No

ionic elk
#

group hug

onyx hinge
#

@old smelt It was fun to see your product covered on Ask an Engineer. congrats

silver tapir
#

๐Ÿ‹

turbid radish
#

:lime:

#

You deserve having your work highlighted

manic glacierBOT
old smelt
#

Thanks @onyx hinge !

ivory yew
ionic elk
#

isn't zephyr entirely apache?

#

or does it have lgpl bits?

ivory yew
#

every lime in the original file?

slender iron
#

@exotic iris I server muted you because you were disrupting our meeting

onyx hinge
#

itโ€™s OK that Linux crashes when a USB flash drive changes out from under the filesystem driver
huh wow that is not okay with me

ivory yew
#

lol classic linux

onyx hinge
#

(the USB people may well be in despair of the filesystem people fixing some well known bugs...)

modern wing
#

๐Ÿฆ

ionic elk
#

come onnnnn

#

dang it

#

thanks ๐Ÿ™‚

#

I can help with STM32 whenever you get to it

onyx hinge
ionic elk
#

works great! thanks!

#

@onyx hinge re: your PR. Should have thanked you for that as well in hug requests sorry

#

good fix

ivory yew
#

mmmm delicious EMI

#

just like mom used to make.

onyx hinge
#

Another belated hug report: kamtom480 for the SDIO implementation for spresense

ivory yew
#

one day I'll remember the 74xx series chips and what they do. ๐Ÿ˜

slender iron
#

wikipedia has a pretty good article for them

solar whale
#

@idle owl nice guide! 74hc595

onyx hinge
#

If I can do it, anyone can do it

ivory yew
#

I also constantly forget what the family abbreviations mean

#

my newest project has a teeny lil 74LVC part

onyx hinge
sterile bronze
#

Thanks @onyx hinge

old smelt
#

2:00 conflict. Have a great week, all!

slender iron
#

thanks @old smelt !

onyx hinge
#

I'm not seeing it with any frequency lately. I've changed a lot of things (linux kernel version, USB hub, etc). I used to experience it most often when debugging with SWD.

thorny jay
onyx hinge
#

If you can make it happen frequently, you could disable "automount" and find out whether it still happens. This would exclude any filesystem-layer stuff

marble hornet
#

Alias?

onyx hinge
#

bundle-4x-5x-6x-20200606

turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Region

us-west

Channel Categories

8

Text Channels

53

Voice Channels

6

Members

21870

Roles

32

tulip sleet
#

@thorny jay Thanks! I ordered one of those.

thorny jay
#

@tulip sleet I hope it does data. I think it does but I only used it to blink a light.

ionic elk
#

yeah

#

on STM32 that'll bork your whole system

#

had that happen just recently with the timer

#

@onyx hinge

modern wing
#

Thanks everyone ๐Ÿ™‚

gilded cradle
#

Thanks

onyx hinge
#

๐Ÿ‘‹ see you next week if not sooner

silver tapir
#

Thanks for the meeting everyone.

idle owl
#

@silver tapir Glad you could join us!

timber mango
#

hi

tulip sleet
#

@solar whale for the ESP32, i'm thinking I/you could saw a half-breadboard in half in the slot down the middle to spread out the two sides. Since it still has foam tape on the back, I can then put it on a scrap piece of plastic or something like that. (Or maybe you suggested that already.)

solar whale
thorny jay
#

I have done that split a breadboard in two. It's a lot plastic to get rid of, not easy to cut, but that give a usefull result.

silver tapir
#

Seeing that, reminds me I need to order from oshpark, @slender iron's feather adaptor.

solar whale
#

they snap together like this.

#

@silver tapir check with him first -- may be an update coming.

silver tapir
#

v3 with reset button?

tulip sleet
#

@solar whale thanks good too -- i forgot about the removable power rails (which I rarely use anyway)

solar whale
#

my issue is with the power rails. in this setup they don;t work for SPI (sometimes) No problem with I2C

#

but I have lots of connections without them...

#

still think it is a noise issue when WiFI active on the Airlift.

#

I'm not sure I ever tried this with another MCU -- adding to "todo" list. I usually go right to a header on the board

tulip sleet
#

maybe add .01uf or .1uf or similar across power and ground near the board, if it's coupling through there

solar whale
#

oh -- I tried 100 uF -- maybe too much

tulip sleet
#

usually you use something like 100uF for low-frequency noise, and .01uF or similar for RF noise. The 100uF may have high impedance at high frequencies

solar whale
#

Thanks -- I'll try that.

tulip sleet
ivory yew
#

100uF is a big boi

onyx hinge
#

"the next CircuitPython is called Wasp, and we're done with the cute snake themes" would be good April 1 material, maybe.

onyx hinge
#

"no legs bad, six legs good"

solar whale
#

๐Ÿ•ท๏ธwhat about 8 legs?

drowsy geyser
#

QQ: what's the status of SD card support in CP 5.3.0 on the STM32F405?

slender iron
#

stm doesn't have any native support

#

the python library should work though

drowsy geyser
#

Thanks! I'll go dig out an AdaLogger.

slender iron
#

jeff started on it but it was more complicated than expected

drowsy geyser
#

No that's cool. Sometimes they're just difficult. ๐Ÿ™‚

#

Um... the AdaLogger should work, yes

manic glacierBOT
solar whale
#

@tulip sleet @ivory yew tried .1 and .01uF -- no change in the response with the airlift breakout.

topaz quest
slender iron
#

๐Ÿ‘

topaz quest
#

(and at that point I'm going to make the cython usbmon module useful by having it write pcapng files without needing wireshark

#

and if you (or anyone interested) want to have a chat one of these days to whiteboard a modern replacement for the kernel's usbmon interface, count me in โ€” I think a netlink version with bpf for capture filters would be quite the improvement

slender iron
#

I don't think I'm the right person to ask

#

either ktemkin or danh are probably better

solar whale
#

@tulip sleet @crimson ferry @ivory yew @slender iron FYI -- I have reproduced the SPI issue with the AIRlift breakout on a feather M4 express. It only works if connected "closely" to the power/ground pins on the board. It does not work using the "rails" of the breadboard. This is not an issue with the ESP32S2...

slender iron
#

๐Ÿ‘

slender iron
#

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

onyx hinge
#

@drowsy geyser the work in progress code is mentioned here https://github.com/adafruit/circuitpython/issues/3095 and is on github here https://github.com/jepler/circuitpython/tree/sdio-stm32-broken-rename but I think in its current state it does not even compile.

GitHub

What's in jepler/circuitpython@sdio-stm32-broken-rename It compiles but is not recently tested and hard-codes the bus specs of the stm32f405 feather.

#

we decided that getting the project to a defined stopping point so that I could move to this timer / background tasks stuff was a higher priority. Would love to see a community member pick it up, and I can absolutely answer questions for someone who's doing that

solar whale
#

@drowsy geyser the Adalogger "should" work. And it should be able to use the sdcardio code in the "core" -- just not the onboard SD card

slender iron
#

what do folks think about replacing the secrets.py approach to secrets with an "environment" file that would be accessible through os.env?

#

that would better match cpython and also remove the conflict with the built in secrets module

wise mica
#

not sure on this, but why you keeping Secrets?!?!?

#

hehe

#

"So let it be written, so let it be done" - Metallica

slender iron
#

it's for things like wifi password

solar whale
#

so, something like @tidal kiln example for Blinka```import os
os.environ["BLINKA_FT232H"]="1"
import board

#

what is the builtin secrets module for?

onyx hinge
#

I was just wishing for os.environ for some reason. but I also wanted it to be state that could be modified and received from one interpreter to the next after soft restart

#

I'm not sure where it would be loaded from .. would it be like nvm and always preserved unless erased?

drowsy geyser
#

@drowsy geyser the Adalogger "should" work. And it should be able to use the sdcardio code in the "core" -- just not the onboard SD card
@solar whale Ahhhh, I was trying to follow the guide and I couldn't get past "no SD card." I'll try sdcardio!

solar whale
#

hmmm -- either way "should" work

#

@drowsy geyser hmm -- it's not working for me either

#

either with SDCard or sdcardio

#

I did put "should" in quotes ๐Ÿ˜‰

drowsy geyser
#

Yeah, I noticed that. Well, foo. I'll have to figure out another way to configure this new accelerometer to throw it off the building.

silver tapir
#

"more degrees of freedom than data points". Where's that on a t-shirt? ๐Ÿ™‚

#

(from the ulab src)

drowsy geyser
#

Hahahaha! I was watching a Formula 1 race last season, and after someone "left the track" one of the announcers said, "more ambition than adhesion."

silver tapir
#

๐Ÿ™‚

#

I've also just read, also from the ulab src, "imaginary and real parts must be of equal length".

#

I'm gonna start selling out of context src code tshirts...

drowsy geyser
#

Oh wow, that's good, too.

silver tapir
#

"La traducciรณn ha finalizado." Spanish is now 100% ish.

#

A couple of things I wanted to read the src to understand better the context of the message. But when I click the weblate link, it sends me to a 404.

swift prairie
#

So I'm trying to drive hundreds of neopixels (around 400) and I'm quickly realizing that even on the feather m4, FPS performance of animations can be a bit lackluster. I'm considering switching to the raspberry pi zero and using the circuitpython libraries there to hopefully improve performance. Any gotchas I may not be thinking about?

hushed hedge
#

Quite a few. Pi's aren't really good at driving NeoPixels.

#

You might want to consider switching to DotStar LEDs.

swift prairie
#

@hushed hedge can you clarify? What makes the pi so bad at driving neopixels

hushed hedge
swift prairie
#

@hushed hedge also I'm specifically working with the RGBW variant of the neopixel

#

so FastLED isn't an option. Also, I'm working with circuitpython so...

hushed hedge
#

No, nevermind, I just looked at the guide.

#

๐Ÿคท Most of the things that popped into my head as pitfalls don't sound like huge problems, overall.

swift prairie
#

i mean, processing power is 10X+

#

alternately, does CP have any kind of DMA support for Neopixels?

lucid solar
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

Unfortunately, I cannot use another pin because I am using the ItsyBitsy as an embedded microcontroller for a PCB I made.

On a side note, I tried initializing the PWM pin before anything else (any digitalio/analogio/busio) and it still errored.
It's not like it errored later, it errored on the line of code initializing the PWMOut.

craggy galleon
#

Hey Circuitpythonisters. Do you know if the REPL can be run on a different serial port / a second instance of it?

stuck elbow
#

what are you trying to do?

craggy galleon
#

@stuck elbow read the REPL over serial pins instead of USB

stuck elbow
#

but why

craggy galleon
#

I don't have USB connected on my HAT board.

#

The serial is directly connected to the RPi Headers

stuck elbow
#

wait, if you are talking about rpi, that's python 3, not circuitpython

#

you can enable login screen on the rpi's serial and use that

craggy galleon
#

no

#

I meant what I asked.

#

Can the CircuitPython REPL on a CircuitPython board be sent over serial instead of USB. I have a CircuitPython HAT (Robo HAT MM1) that has direct serial pin connection to a Raspberry Pi. I don't want to use USB from the HAT.

stuck elbow
#

sorry, I don't understand what you are trying to do so I can't help you

manic glacierBOT
onyx hinge
lucid solar
#

@craggy galleon You would likely need to use a custom build of CircuitPython. I don't think it will work with the default one.

onyx hinge
#

@lucid solar ha ha ha

silver tapir
#

@onyx hinge Thanks, I did got to it "by hand". I actually could finish ES to ๐Ÿ’ฏ

craggy galleon
#

@lucid solar lol. That's to be expected. ๐Ÿ˜„ ๐Ÿ˜„ Is it even possible is a better question?

onyx hinge
#

gooooooaaaaalllllllll

silver tapir
#

yeah.. not good at sports :รพ

manic glacierBOT
onyx hinge
lucid solar
#

@lucid solar lol. That's to be expected. ๐Ÿ˜„ ๐Ÿ˜„ Is it even possible is a better question?
@craggy galleon yes...I've done it for the STM32 port. If you just want to build it for yourself, then you could edit the serial.c files...am not sure if you know C though...

craggy galleon
#

I'll take a look. Thanks Mark! ๐Ÿ™‚

lucid solar
craggy galleon
#

Thanks heaps! Where are DEBUG_UART's defined? Is this something that would need to be customised / added on the D51 port?

lucid solar
#

in the board definition, in ports/atsamd/.... (I'm guessing the path...hope you find it.)

craggy galleon
#

I know where that is ๐Ÿ˜‰ I can work it out from there. Thanks!

manic glacierBOT
#

Not floating point, but #1766 I believe is talking about the fact that we can only use one capture channel per TC if we want 16-bit frequency accuracy, because of the way the TC registers are used for different functions. So we cannot use some TC channels despite them appearing to be available. @tannewt may remember the details.

slender iron
#

@onyx hinge @solar whale I was thinking it'd be stored in a non-py file at the root of the fs

solar whale
#

@slender iron so similar to secrets.py but not a .py file... what is the conflict with "secrets" in CP?

slender iron
#

which is not what we have

solar whale
#

ah -- thanks

lone axle
#

@slender iron I'm not sure about blinking, but that problem might be related to the anchored position issue in display_text

#

Maybe should should make a separate PR to fix that issue by itself. I believe that fix is relatively quick and easy. But it's gotten bundled in with the changes to remove the usage of 0 sized bitmaps which has kind of gotten a bit complex and isn't quite ready yet.

#

Basically the setter for anchored position was updated to allow it to work with scaled labels. But unfortunately I missed the getter, it was not updated to reflect the same changes as the setter.

#

So code that was relying on the getter has been causing trouble. For me it doesn't look like blinking, but rather the text "jumps" downward a few times until it's no longer on the screen.

manic glacierBOT
lone axle
onyx hinge
#

@silver tapir I just noticed this in some text you pasted on github: Archivo "electioncal_graphics.py", lรƒยญnea 76, en load_data. Where it should be lรญnea. Is this what you're actually seeing, and if so in what terminal software? Does it show properly on the LCD?

silver tapir
#

This is the mu-editor serial repl, it doesn't have utf-8 support.
There's a bug for it and has been there for some time.

#

If I use screen or another tool, it does show properly.

#

And yes, it shows nicely on the screen.

onyx hinge
#

okay, I'll stop worrying then ๐Ÿ™‚

manic glacierBOT
#

This is the board: https://www.raytac.com/product/ins.php?index_id=81. This board appears to be a simple breakout / demo board for all of the pins on the Raytac MDBT50Q-1MV2 module used in other products and available here: https://www.adafruit.com/product/4078

I used the nRF Connect suite and a JLINK EDU Mini to load the same UF2 bootloader used by the PCA10059 and then I was able to install CircuitPython without issue.

This is the output from boot_out.txt:

**Adafruit CircuitPython...

manic glacierBOT
idle owl
#

@lapis hemlock Sorry you got tagged by the bot. I've unmuted you.

lapis hemlock
#

@lapis hemlock Sorry you got tagged by the bot. I've unmuted you.
@idle owl Oh, no problem at all, don't worry!

#

Jeff found out what the problem was. Apparently, I wasn't supposed to mention multiple people in a message.

idle owl
#

Ah, and you quoted someone else who did. Right.

#

Either way, apologies. It's there for a reason, but it still catches things that it shouldn't from time to time.

lapis hemlock
#

@idle owl I think it is absolutely OK. I just didn't know that you had made the rules a bit stricter, but I definitely understand the underlying reason.

idle owl
#

@lapis hemlock We added the Adafruit server to something called Discord Server Discovery, which means people can search for keywords and find our server. It also means bots can scrape and find it too. And we've had an enormous influx of issues since then. So we enabled a lot of things we had left out before.

lapis hemlock
#

@idle owl Fair enough.

manic glacierBOT
ionic elk
#

OOF ok done with move

#

Will be back up to speed tomorrow.

manic glacierBOT
manic glacierBOT
#

So...is there anything I can do to use at least very rudimentary PWM on this pin?

I haven't tried this but I had an idea (probably a bad one).

What if you DigitalWrite() (change pin.value) many many times in a while loop?

Don't know how fast you can switch it that way. There are probably some extra hardware / circuit requirements as well.

manic glacierBOT
manic glacierBOT
#

The difference is that TypeVar is exactly one type in a single definition
that uses it in more than one place (typechecker must pick one of the
options and use in all places in a single definition), whereas Union is any
of the types in any of the positions it is used (i.e. one definition can
have different types in different places). EG

AnyWritableBuf = TypeVar['AnyWritableBuf', bytearray, array.array, mmap,
memview] # AnyStr style.
WritableBuffer = Union[bytearray, array.array, mmap, memvie...

#

In debugging an issue with Label, I uncovered an unexpected error when using insert with an empty Group. Normal lists allow insert to be used on an empty list and the function is effectively equivalent to append. However when trying to insert with an empty displayio.Group, an unexpected error IndexError: Group index out of range is triggered. Due to this unexpected behavior a kludge to is required overcome this by...

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

@ita1024 I would rather change the BOD33 level in port.c to something lower, and maybe enable the hysteresis. Especially since my boards don't have any other component with higher voltage requirements. However, I would like to publish my projects at some point, and have them added to the CircuitPython's repository, and that means I can't simply just hack the firmware.

Perhaps there could be an option for switching the minimal voltage per board?

manic glacierBOT
turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Region

us-west

Channel Categories

8

Text Channels

53

Voice Channels

6

Members

21934

Roles

32

manic glacierBOT
manic glacierBOT
solar whale
#

@tulip sleet just hung my linux box by trying to put a feather_m0_rfm9x in bootloader mode (double-tap reset). No unplug needed.... This is annoying -- I will be moving to Mac or Pi for awhile.

tulip sleet
#

is it off a usb hub?

solar whale
#

yes -- USB2 hub

tulip sleet
#

you could try interposing yet another hub, but I can understand not wanting to bother. I think the hubs just introduce a little useful delay. I found just one hub was good enough

solar whale
tulip sleet
onyx hinge
#

@slender iron On SAMD51 I've got Audio & USB converted to having their background task triggered based on interrupts. Displayio & filesystem need to be triggered based on time, though. I don't have a plan for this. Any advice? Can we get a time-based wake-up from the RTC?

manic glacierBOT