#circuitpython-dev

1 messages · Page 313 of 1

ionic elk
#

our implementations or the HAL ones?

tulip sleet
#

our impls do

ionic elk
#

I have a map of reserved pin/timer instances. But I don't have a general manager, that's what I'm writing right now

tulip sleet
#

so just take a gander at the atmel and nrf and see if they are worth cribbing from. ... do you have an answer for @half sedge ? Maybe just "not yet"

onyx hinge
#

@ionic elk taking your example of rgbmatrix .. in fact, rgbmatrix uses a lot of pins. Don't the others? Maybe when requesting a timer you can say "and here is a pin I'm going to squat on, so maybe see if I can have that one"?

ionic elk
#

@tulip sleet yeah I'm looking at your stuff and Scott's right now, along with micropython. I don't think it'll be an exact fit but it's good to know the gist

half sedge
#

@tulip sleet I am going to use time.monotonic() rather than time.time()

#

Maybe that works.

ionic elk
#

@onyx hinge that's a good idea, starting the search for timers within pins that the module itself is preventing from being used for PWM

#

Ok well lots of stuff to try here, thanks @tulip sleet @onyx hinge

onyx hinge
#

you're welcome

half sedge
tulip sleet
#

@half sedge I'm assuming we just haven't yet implemented an RTC API on at least some STM32 chips. I know that some have real date/time clocks built in.

half sedge
#

I am trying to use the FeatherWingEnviroPlus from Pimoroni on my STM32. And Pimoroni code is very not CircuitPython minded as it is their first FeatherWing. That will keep me busy for some time I guess.

ionic elk
#

No RTC on STM32 yet yeah

half sedge
#

Fine for me, I solved that even if the solution is a bit monotonic. 🙂

#

Now I fixed their particul sensor that use the same kind of code.

lone axle
#

@trim elm and anyone else that may be interested: I've got the very basics of the layout system code pushed into a repo now: https://github.com/FoamyGuy/circuitpython_display_layouts I need to read up on the cookie cutter system a bit and probably make a new repo eventually. But for now the library code and a basic example are in the repo.

#

It's likely bit rough around the edges. I don't have a lot of experience designing class based APIs in python, there is surely some room for improvement.

#

I am very open to feedback on the JSON structure and language in particular as well. It's better change names and structure of it early on now before there is any layout code out there to get broken I think

tulip sleet
slender iron
#

👍

#

we can do it in master. the next release will be 6.0.0-beta.0 I think

simple pulsar
#

@half sedge Is time.monotonic_ns() available on the board you are using? That's better as it doesn't suffer from reduced sub-second precision over time.

thorny jay
#

@simple pulsar I will give this a try, however I would need something that works both on CP board, but also on Raspberry Pi. Those library I try to fix are from Pimoroni, so to be accepted change need to be portable.

#

It is just a timeout active loop. It will never last long and precision is not an issue I believe.

simple pulsar
trim elm
#

@lone axle Awesome! I'll try to take a look at it later tonight

slender iron
#

@onyx hinge just did a github merge for the above pr

onyx hinge
#

@slender iron oh, had it gotten conflicts or something? thank you

slender iron
#

yup, np

manic glacierBOT
slender iron
#

(I'm caught up on email and PRs)

manic glacierBOT
idle wharf
#

This might just be general how-to, but since it is also ESP32-S2 I’ll ask here.

I have my ESP32S2 WROVER mounted on a breadboard with a USB-C breakout (PN 4090). I get header to header connectivity (i.e. from the pins on the boards) from D- to 19 and D+ to 20, but when I plug in to my MacBook, I do not see a USB Drive mount nor do I see a serial device at /dev/tty.*

When I plug in the WROVER on the non-native USB, it does mount and I can use screen and see CP load.

I swear this worked the first time I plugged in to the native USB via the breakout and never again. I've tried with the ESP32S2 Beta build and the June 23 build and another nightly build as well. All the same.

Is there something finicky about my setup or something else I'm missing entirely?
This isn't an urgent thing, I just want to figure it out. 😉 tx!

I posted this earlier, but everyone was mid conversation. I should have waited for a lull... any thoughts on if is this a general issue with USB breakout boards, or something specific to ESP32S2 or the WROVER?

crimson ferry
#

I think I cleared it up by erasing before flashing, something I'd been lazy about with standard ESP32 boards (Arduino IDE, or NINA firmware).

idle wharf
#

Is erase a complete wipe? Nothing is left behind?

crimson ferry
#

I'm not sure of the process. Do you see any evidence of a connection with system_profiler SPUSBDataType?

#

I actually power mine from the onboard USB connector, and just use data and ground on the native via the breakout (monitoring both with separate screens), but I can't see why that would make any difference.

#

I assume the red LED is on.

idle wharf
#

OK, that's an interesting idea the power. I'm going to try that.

#

🎉 @crimson ferry That was it! Power from the onboard USB and then D-, D+ and GND on the native usb.

#

Thank you !

crimson ferry
#

Great you have it working now! I’ll play around tomorrow, checked the schematic and not sure why it would behave like that.

idle wharf
#

I got back into the not working state. I think if you don't eject.
I'll try some test and save my notes for a more reasonable hour. 'night !

lucid solar
#

@idle wharf Just so you know, I've had it working fine powered both from onboard and external USB. I've also had them plugged in at the same time as I have a shottky diode protecting reverse current.

#

One difference is my external is a usb-mini-b, not usb-c.

idle wharf
#

Yeah now it works off the breakout just fine. I can unplug and plugin without ejecting. I think eventually it make OSx unhappy and it stops recognizing until a reboot.

#

Anyway.. its working great for a very early build on a devboard. thanks Mark !

manic glacierBOT
onyx hinge
#

I'm excited to have that PR merged

manic glacierBOT
manic glacierBOT
#

I discussed with Hierophect on Discord about how to "de-nest" the code for configuring SPI objects on STM, because the problems with one nesting level per pin becomes unmanageable with the up to 10 pins of SDIO.

This code demonstrates the concept we discussed. When run with Kattni's hw_spi_test program, it prints the same combinations before and after this PR.

The SCK pin is always required. Loop over all possibilities of the SCK pin. When we are considering a particular item in the ...

manic glacierBOT
manic glacierBOT
#

This has grown and is really multiple different topics. We need to split it up into multiple PRs. Our priority list becomes:

  1. SPI SD card in core, supporting all platforms
  2. SAM D5x/E5x SDIO
  3. STM SDIO

(that's not to say we wouldn't love someone to pick up #3 before I get a chance to! It's still the only reasonable way to use the SD card on the STM32F405 Feather. The main thing that needs completion on STM32F405 is handling of pin assignments, instead of ignoring them as now...

manic glacierBOT
solar whale
#

@slender iron @tulip sleet just an FYI for now -- still looking into this -- I put together one of Scotts saola-feather adapters and have been testing it -- It seem to be working fine with one possible issue - twice I have had my linux box hang up when I disconneced the USB (in the feather side) from my system., I had to powercycle the linux box to recover. In both cases I had not actually ejected the CIRCUITPY drive. It does not happen every time - I'm just curious if you have run into this with your saola's either with or without the feather adaptor.

slender iron
#

I haven't seen it on mac

solar whale
#

I've had this box lock up before when connecting/disconnecting boards - I though it was a bootloader issue but maybe not ... I'll keep working with it to see if i can track it down...

manic glacierBOT
idle wharf
#

@slender iron @tulip sleet just an FYI for now -- still looking into this -- I put together one of Scotts saola-feather adapters and have been testing it -- It seem to be working fine with one possible issue - twice I have had my linux box hang up when I disconneced the USB (in the feather side) from my system., I had to powercycle the linux box to recover. In both cases I had not actually ejected the CIRCUITPY drive. It does not happen every time - I'm just curious if you have run into this with your saola's either with or without the feather adaptor.

@solar whale This might be exactly what I've seen with the WROVER. Let me know if I can supply more info from my MacBook Air which is lightly spec'd.

tulip sleet
#

@solar whale As I mentioned in the past, I have been having a lot of trouble with linux kernel crashes when I reset a board (it was specially an nRF52 at the time). I interposed a generic USB2 hub in between the host and the board, and the problems stopped. I still have that kernel bug report in about this, but the hub seems to be a workaround.

manic glacierBOT
silver tapir
#

@solar whale @tulip sleet on what kernel versions did the lockup happen?

#

I'm on 5.4.0 (ubuntu 20.04) and been testing a saola on the feather usb side and had no problems yet.

solar whale
#

@silver tapir I'm on same 5.4.0 20.04 -- I don't se anything indicative of a USB issue in the dmesg logs at the time fo the hang. I'm waiting for a backup to finish before I start plugging/unplugging again. I need to take my dog for a walk now - but will see if I can clarify this more when I get back.

silver tapir
#

I'll try to see if I can replicate it with some hardware I have here.

#

@solar whale Also, what cpy version? Nightly-ish?

solar whale
#

yes -- built this morning -- I think it is one commit behind

silver tapir
#

Same here. Thanks for info.

solar whale
#

One other piece of information -- the 2 hangs occurred with a saola-wroom unit. I switched to a wrover, but have only tried it once -- then the backup started ....

silver tapir
#

Ok, I only have some saola-wrover.

solar whale
#

gotta go -- dog is pacing ....

silver tapir
#

Sure, np.

manic glacierBOT
#

Hi @dahanzimin, I think it'll be possible for some of that line. The smallest chip we support currently is the SAMD21 which has 256k flash and 32k ram. We don't support any smaller than that because it limits the modules we can include and the code that can be loaded.

It looks TinyUSB already supports the F1 so it shouldn't be too hard to get going. What is the compilation error that you get?

Our discord is a faster way to get help: https://adafru.it/discord

#
[adafruit/circuitpython] New tag created: 6\.0\.0\-alpha\.0
slender iron
#

ok, we're officially working on 6.x

#

we can deprecate things in master

#

/ remove them

ivory yew
#

\o/

tulip sleet
#

@silver tapir See https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1871143. I have not tried with an ESP32S2 board, but have seen the problem with SAMD21 and nRF52840, so I think it may be some kind of generic timing problem. I tested kernels way back in time and up to the latest 5.7, so this is a long-standing issue. It does not seem to happen on certain USB hardware on the motherboard.

slender iron
#

@tulip sleet @ionic elk going to chat sdcard api in CircuitPython video channel shortly

onyx hinge
#

my audio's not working argh

silver tapir
#

Thank you @tulip sleet , will take a look at it.

manic glacierBOT
onyx hinge
#

[we ended up switching to a direct call because we had trouble with my audio in the voice channels]

#

@slender iron I don't see a pin for next monday's meeting notes

crude blaze
#

does SPI already work on the ESP32-S2?

lone axle
#

I think that Scott got it working to some extent yesterday and showed an example on Show & Tell last night. But I'm not certain whether it is fully working or if his code is available online anywhere yet.

#

In the demo it seemed that a screen and a temp sensor or something like that were hooked up and working.

crimson ferry
crude blaze
#

neat, imma give it a test

slender iron
#

@onyx hinge on my todo list

#

@crude blaze I only tested TX. let me know if RX works 🙂

crude blaze
#

oh I was gonna test a display, no RX sorry 🙂

slender iron
#

k, that's what I tested too

trim elm
tidal kiln
#

maybe needed before instantly doing the subsequent read? to give it time to send everything...

#

could maybe done fancier? like loop/read/check amount read/break?

#

something like:

while self._uart.in_waiting < 2:
    pass

maybe?

simple pulsar
#

@tidal kiln What's the blocking/timeout behaviour for the read method here?

trim elm
#

@tidal kiln Ok

tidal kiln
#

@trim elm i think what's there is pretty hackish, so good chance it could be optimized better, but would want to test whatever changes to make sure

trim elm
#

Yeah

simple pulsar
#

From data sheet it sounds like there's a curious mix of update rates on the sensors to on defaults

crude blaze
#

@slender iron I get a bunch of error: "MICROPY_NLR_SETJMP" redefined errors when building your branch with make -C mpy-cross anything I gotta do beforehand, change some compiler flags?

#

I just removed -werror for now

onyx hinge
#

What system are you building on? I haven't seen this on amd64 linux.

crude blaze
#

WSL with Ubuntu 18.04

onyx hinge
#

that's what our CI runs, so you can see all the steps it performs in .github/workflows/build.yml (well, wsl is not involved, but it should not be relevant either)

crude blaze
#

yea I wouldn't suspect anything be different in WSL except for some driver stuff

onyx hinge
#

what line number is MICROPY_NLR_SETJMP error on?

#

(I didn't look whether for some reason this area of code is changed in tannewt's branch, assuming not)

crude blaze
#

../py/nlr.h:63:0 and ../py/nlr.h:39:0

#

produced a bazillion warnings it being redefined over and over again

onyx hinge
#

huh those line numbers don't match up for me. the content I have (again, at the main branch of adafruit/circuitpython) is ``` 39 // A lot of nlr-related things need different treatment on Windows
63 #define MICROPY_NLR_NUM_REGS (10 + 6)

crude blaze
#

oh nvm I think his master is just out of date? I forgot to switch to the esp32-s2 branch beforehand

onyx hinge
#

aha that could be it, commit from 2019 ?

crude blaze
#

yea

onyx hinge
#

aha glad you figured it out

crude blaze
#

ugh yea all fine in esp32s2_busio, not being on the right branch is way more often the core issue for me than I would like it to be 😄

slender iron
#

(sorry I was in a meeting)

crude blaze
#

no worries all good

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/1P9jItrwitljf_oKBBXYs92uRks99zoFmye2YEzAj2lE/edit?usp=sharing

onyx hinge
#

gotta get those hug reports in before I forget 'em!

crude blaze
#

hm I might be missing something still
I get CMake Error: The source directory "/mnt/f/circuitpython/ports/esp32s2/build-espressif_saola_1_wrover/esp-idf" does not appear to contain CMakeLists.txt.
which does make sense build-espressif_saola_1_wrover/esp-idf is empty. Is there a step that copies or symlink the idf from ports/esp32s2/esp-idf that fails for me?

#

idf is there and I ran their setup and env script, seems to be setup correctly

crude blaze
#

like does it expect to already be there or would cmake do this at this point?

#

ok -DCMAKE_TOOLCHAIN_FILE=$IDF_PATH/tools/cmake/toolchain-esp32s2.cmake is missing the () around IDF_PATH but that doesn't change anything

slender iron
#

it should work with build being empty

#

what folder are you building from?

crude blaze
#

ports/esp32s2

slender iron
#

hrm, that is correct

crude blaze
#

the full thing: IDF_PATH=/mnt/f/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=/mnt/f/circuitpython/ports/esp32s2/esp-idf/tools/cmake/toolchain-esp32s2.cmake -DIDF_TARGET=esp32s2 -GNinja CMake Error: The source directory "/mnt/f/circuitpython/ports/esp32s2/build-espressif_saola_1_wrover/esp-idf" does not appear to contain CMakeLists.txt.

lone axle
slender iron
#

that's the full command from running make?

crude blaze
#

yea thats what it outputs when running make BOARD=espressif_saola_1_wrover V=2

slender iron
#

hrm, what OS are you on?

crude blaze
#

Ubuntu 18.04 in WSL

slender iron
#

hrm

crude blaze
#

can try again on the laptop in native 18.04 but doubt it makes a difference?

slender iron
#

what version of cmake?

#

I think that may have been a problem for someone

crude blaze
#

says version 3.10.2

slender iron
#

I'm on 3.16.2

crude blaze
#

lemme run an upgrade, maybe stuff is just very outdated I dont often spin up WSL

#

hm no change

manic glacierBOT
#

I was running into problems with the STM32 non-volatile memory build which leaves almost no room for the user program. It's enough space for a simple LED program, but not enough for anything more complex.

Since the user program memory must be made up of 16k sectors, the NVM block needed to move to the first 64k sector. This reduces the space for the python runtime (firmware), however, everything seems to fit okay.

I've been running this on the latest ThunderPack boards and it works well.

crude blaze
#

ok interesting, I manually upgraded cmake to 3.16.8 and now it works 🙂

#

maybe add a check for the version in the makefile?
probably a fair few people who will run into this who are staying on 18.04 for a while longer

slender iron
#

ya, that'd be good

#

want to make a PR or file an issue?

crude blaze
#

I will check it out when I got it running

#

now failing at linking unfortunately

#

oh I didn't know cmake got a built-in command for version check, thats nice

manic glacierBOT
manic glacierBOT
#

Just as another data point; using adafruit_irremote on a CircuitPlayground Express (as the example at https://learn.adafruit.com/remote-control-tree-ornament-with-circuit-playground-express/code-the-circuit-playground-express shows) experiences the same issues. It works using CP 5.3, but fails using the current beta 5.4.0-beta1.
It seems like a timing issue introduced in 5.4. @tannewt , is there anything I could look at or try here?

silver tapir
#

@idle wharf Do you mind if I link to your gist page about the esp32s2? I'd like to add an image and a bit of info to the CPY web page about the saola.

idle wharf
onyx hinge
#

I thought that the IDF came with its own copy of cmake. from build.yml: $IDF_PATH/tools/idf_tools.py --non-interactive install cmake

#

that version of cmake is probably added to the environment of the build shell with source $IDF_PATH/export.sh shortly thereafter

#
cmake is /usr/bin/cmake
jepler@babs:~/src/circuitpython/ports/esp32s2$ source esp-idf/export.sh 
...
jepler@babs:~/src/circuitpython/ports/esp32s2$ type cmake
cmake is /home/jepler/.espressif/tools/cmake/3.16.4/bin/cmake
#

It would be awesome if someone took the time to move the relevant steps into the documentation, because knowing to check what github build.yml does is a bit obtuse

#

'night

manic glacierBOT
manic glacierBOT
crude blaze
manic glacierBOT
crude blaze
#

@slender iron how are you flashing the s2? I'm using esptool directly but I think I'm doing something wrong, the native USB device is never recognized after flashing.

solar whale
#

The native USB device is on different pins (19, 20)

#

D- is on 19 , D+ is on 20

#

@crude blaze is that what you are asking about for the S2?

silver tapir
manic glacierBOT
#

A CI build failed building mpy_cross with:

make: Entering directory '/home/runner/work/circuitpython/circuitpython/mpy-cross'
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
QSTR updated
../supervisor/shared/translate.c:34:10: fatal error: genhdr/compression.generated.h: No such file or directory
 #include "genhdr/compression.generated.h"
          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [build/supe...
crude blaze
#

@solar whale yes thanks I got that hooked up :)
@silver tapir awesome thanks been looking for something like that!

silver tapir
#

@crude blaze Oh, don't mind me... the guide was done by @idle wharf.

#

And it is a great start for the S2.

crude blaze
#

hm seems I'm doing all the same stuff

#

odd

#

official builds also fail so I guess it gotta be upload related

silver tapir
#

What command fails?

crude blaze
#

or I still somehow have the wiring wrong after quadruple checking it

#

oh just cpy in general 🙂

#

doesnt boot up after flashing

silver tapir
#

@crude blaze So, for uploading with esptool you use the built-in usb port.

crude blaze
#

sure uploading works fine

silver tapir
#

After flash is working, then you have to build or buy a usb cable, and connect directly to the pins in the guide.

crude blaze
#

but the native usb port does not come up as a device after that

silver tapir
#

(gnd, 5v, 19 and 20, disconnecting the other build-in usb)

solar whale
#

did you power cycle or reset after flashing?

crude blaze
#

I did power cycle yes

silver tapir
#

@crude blaze in the case of the cable I was using, the colors white and green where backwards, so I tried reversing them.

#

The ones that go to pin 19 and 20.

crude blaze
solar whale
#

there was an erro on the Adafruit product page, but it has been fixed

manic glacierBOT
#

@dahanzimin there are significant changes between the F4 and F1 series in ST's provided HAL APIs, even more so than between the F4 and F7/H7 in many cases.

While I understand the appeal of running Circuitpython on a chip as pervasive as the F103, I think you would ultimately find the experience to frustratingly limited - the number of lines of code you'd be able to support on 20k of RAM would be pretty small. You might have more success with Micropython, which does support the F103 and op...

solar whale
#

green goes to 20

#

that looks correct to me.

crude blaze
#

is there maybe a known issue with windows and tinyusb on the esp?

silver tapir
#

@crude blaze Do you get the serial port but not the storage drive?

crude blaze
#

complete malfunction, no usb enumeration at all

manic glacierBOT
crude blaze
#

what I would expect from an empty chip or a crashed firmware

#

oh no way

#

it is windows

#

works just fine on my ubuntu laptop

solar whale
#

cool! problem solved --- 😉

crude blaze
#

ok not fine, I can't write to the drive :D
but at least the drive shows up

silver tapir
#

@crude blaze For windows there is a driver upgrade needed, but for the build-in usb... not for the cpy one.

crude blaze
#

oh weird, now after power cycling it doesn't show anymore

silver tapir
#

I have not owned or used windows since w95, so can't confirm :þ

crude blaze
#

either some physical defect or just still a bug in tinyusb

solar whale
#

what CP file did you load to the board?

#

IS it a recent build?

crude blaze
#

my main goal was to upload the version I built from scotts branch, now I put the 5.4.0 build from S3 on it

silver tapir
#

Should be 6.0.0-alpha0 now.

manic glacierBOT
crude blaze
#

so it was atleast partially the breadboard, hooked up to wires directly it at least shows up in linux consistently

#

though the msc drive is not writable

#

repl works fine though

silver tapir
#

@crude blaze What happens if you format the storage with the repl?

#

import storage
storage.erase_filesystem()

manic glacierBOT
#

Using the Saola-1 Wroom devkit and running CircuitPython 6.0 alpha or 5.4.0 beta or really any CPY version that I tried I can't get the device to enumerate on Windows. On a Ubuntu 18.04 machine it shows up as a MSC drive and I can connect to REPL.
On Windows I just get an error that the USB device malfunctioned.

I would assume that this is an issue with TinyUSB and not CPY but I wanted to open it her in case it is not. I have not verified if TinyUSB standalone would work.
@hathach

crude blaze
#

good point I will try that

solar whale
#

@crude blaze I just tried that on min and I had to power cycle after doing it. Came back OK

crude blaze
#

so for you it works on windows @solar whale ?

tulip sleet
#

also could you say in the issue whether it's windows 10 version 2004 or 1909?

solar whale
#

no -- not on windows - that was on a Mac

crude blaze
#

@tulip sleet ah right sorry

tulip sleet
#

it probably doesn't make a diff, but i've had BLE issues on 2004 vs 1909, and so there could conceivably be USB diffs too

crude blaze
#

oh for sure, I've been working with Windows in an exhibition context long enough to suspect every windows update to cause havoc 😄

solar whale
#

on Ubuntu Linux I also did the erase -- had to push RESET afterwards.

#

That is different than other boards

crude blaze
#

yep format did the trick 🙂

tulip sleet
#

@solar whale doing storage.erase_filesystem() is how I have been reproducing that Linux kernel crash (with M0 and nrf)

crude blaze
#

so all working on linux

solar whale
#

ruh roh 😉 worked once for me....

crude blaze
#

@tulip sleet wait what, erasing the cpy filsystem caused a kernel panic? 😄

manic glacierBOT
#

@hierophect It should be the popularity and cost performance of STM32F103. At present, 103re is selected. It has 512k / 64K memory. It is worth trying circuit Python and trying to promote circuit Python in China. Thank you!

Ah, my mistake, I misread and thought you meant the F103x8 series used on the Bluepill type boards. Well, I can't say the Adafruit sponsored team will be able to pick up the project since we're focusing on new chip lines (i.MX series, ESP32S2) but I don't think there'...

tulip sleet
manic glacierBOT
solar whale
#

@crude blaze I have experienced several lockups of my Linux box when disconnecting the USB cable -- be careful out there.

crude blaze
#

wow

#

never had that happen

tulip sleet
#

@solar whale so you have seen it just on disconnect and not reconnect? Do you think the USB connection might have been bouncing?

#

It doesn't happen on Scott's AMD Linux box, but he is usually using Mac. I see it on a conventional Intel desktop chipset, but can't reproduce on a laptop chipset. Seems to be driver realted

solar whale
#

possibly -- and i don't reacall it happening before I started using the feather adaptor --- I need to test that more -- it's a painful test.

crude blaze
#

but that is interesting to hear, that might actually explain an issue I have with a project where I get the weirdest kernel panics that seem to disappear when the USB devices are not connected

#

might just be a loose connection

tulip sleet
#

i tried bisecting the kernel, but I've gone way back in time and up to the latest 5.7, and I can still make it happen

solar whale
#

odd thing is that dmesg log shows nothing -- appears to be a sudden hang -- so a connection issue may be likely.

tulip sleet
#

i set up kdump and have stack traces in that bug report

crude blaze
#

@tulip sleet are you sure its intel chipsets then? on mobile its usually just intel chipsets but on desktop motherboards you will very often find another vendor chipset being responsible for a large portion of the ports

#

besides the intel one that comes with the main chipset

tulip sleet
#

it's possible; it happens a lot on my Dell Optiplex 7010; I can look up the USB hw; I haven't tested extensively on the laptop. It's a Dell Latitude 5250, also Intel

solar whale
#

OK -- just killed my linux box on a board without the feather adapter -- glad to have cleared that up 😉

tulip sleet
#

also @solar whale, you have seen it on RPi too, right?

solar whale
#

tokk 4 pulg/unplug cycles

crude blaze
#

ASmedia is usually very often used as a secondary host controller

tulip sleet
#

did it crash on unplug or plug?

solar whale
#

No - I have not tried it on RPi

#

unplug.

tulip sleet
#

@crude blaze is it easy to id the usb hw? is it in /proc somewhere?

crude blaze
#

it should show up in lspci to check if one is present at all

tulip sleet
#
0:00.0 Host bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor DRAM Controller (rev 09)
00:02.0 VGA compatible controller: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
00:16.3 Serial controller: Intel Corporation 7 Series/C210 Series Chipset Family KT Controller (rev 04)
00:19.0 Ethernet controller: Intel Corporation 82579LM Gigabit Network Connection (Lewisville) (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)
00:1f.0 ISA bridge: Intel Corporation Q77 Express Chipset LPC Controller (rev 04)
00:1f.2 SATA controller: Intel Corporation 7 Series/C210 Series Chipset Family 6-port SATA Controller [AHCI mode] (rev 04)
00:1f.3 SMBus: Intel Corporation 7 Series/C216 Chipset Family SMBus Controller (rev 04)
crude blaze
#

it also tells you the pci port number which I think you can then use to backtrace a usb port to its host controller

#

well that looks like all intel 🙂

#

ah interesting that the server chipset, maybe that makes a difference

tulip sleet
#

it is an old business desktop; it's not a Xeon processor, it's an i5-3475S

crude blaze
#

usb host controller would still be the server one though, I could imagine that they differ driver wise

tulip sleet
#

do you have any entree into the kernel dev folks who might look at this? I got a little bit of dialog in the bug with Kai-Heng Feng, but I think I mainly need to attract the attention of the right person

crude blaze
#

I don't know anyone personally working on the kernel. I would give twitter a try there, usually you get connected with the right folks pretty quickly

tulip sleet
#

tnx, I will poke around

crude blaze
#

if you write a tweet ping me, I have a lot of followers who work on linux stuff who might again be connected

solar whale
#

FYI mine looks similar to Dans ```00:00.0 Host bridge: Intel Corporation 3rd Gen Core processor DRAM Controller (rev 09)
00:01.0 PCI bridge: Intel Corporation Xeon E3-1200 v2/3rd Gen Core processor PCI Express Root Port (rev 09)
00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)
00:14.0 USB controller: Intel Corporation 7 Series/C210 Series Chipset Family USB xHCI Host Controller (rev 04)
00:16.0 Communication controller: Intel Corporation 7 Series/C216 Chipset Family MEI Controller #1 (rev 04)
00:1a.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #2 (rev 04)
00:1b.0 Audio device: Intel Corporation 7 Series/C216 Chipset Family High Definition Audio Controller (rev 04)
00:1c.0 PCI bridge: Intel Corporation 7 Series/C216 Chipset Family PCI Express Root Port 1 (rev c4)
00:1c.1 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 2 (rev c4)
00:1c.2 PCI bridge: Intel Corporation 7 Series/C210 Series Chipset Family PCI Express Root Port 3 (rev c4)
00:1d.0 USB controller: Intel Corporation 7 Series/C216 Chipset Family USB Enhanced Host Controller #1 (rev 04)

crude blaze
#

oh wat mac mini uses server chipsets, thats so weird 😄

solar whale
#

at least they did in 2012

manic glacierBOT
#

Hi there!
I have a short question. I am using circuitpython & ulab very often. I noticed that the ulab used in circuitpython is 4 months old. I was wondering if the circuit-python ulab will be updated anytime soon to match the micropython-ulab, since I need to use some of the recent developments from ulab (specifically the newly added sosfilt function, which is much needed in DSP applications)

Thanks in advance.

#

Hi! We would love community help staying up to date with ulab.

Right now, there are a couple of steps to doing this:

  • Actually update the ulab submodule in extmod/ulab
  • Update our ulab documentation in shared-bindings/ulab
  • Build and test, especially that new and changed functionality is working
  • Create a PR (pull request)
  • Work through any problems identified during the PR process

If you have the technical expertise to do this, we would love to see a pull request fr...

slender iron
#

fyi, my current busio branch has an assert failure that kills usb pretty soon after it is started. probably only applies to spi displays though

crude blaze
#

I tried it with official releases too, same behaviour

onyx hinge
#

I just had to chuckle at my own inconsistency, adding all of these strings in one PR. ```+msgid "Buffer length is must be a multiple of 512"
+msgid "Buffer length must be a multiple of 512"
+msgid "Buffer must be a multiple of 512 bytes"

slender iron
#

@ionic elk how would you like to see stm32f1 support added? sounds like they may be interested if you give enough direction

manic glacierBOT
ionic elk
#

@slender iron my impression is more that they are requesting it as a feature, but I'm happy to provide more guidance if you want. F1 support would require making a new family profile in mpconfigport.mk and then moving through the basic modules to test and adapt where necessary.

#

also all of the linker files, changes to the makefile, startup links, etc

#

If you'd like, I could knock out the obscure basics in probably an hour or two and get digitalIO going, and then leave Busio and all the other stuff up to someone else.

slender iron
#

@ionic elk I'd rather you start to sketch out the steps for them to try. I think the chinese community is finally trying circuitpython and I'd love to get them more involved in development.

ionic elk
#

I get that but I worry the time to outline all the steps might take an equivalent amount of time to just doing it

#

because it's so spread out at the start, there's a lot of different stuff to modify

#

But if your primary goal is encouraging involvement than I can do a todo list up on github

manic glacierBOT
fathom trellis
#

I'm interviewing CircuitPythonista @ivory yew later today, hope folks can join in.

slender iron
#

@ionic elk making a list is more helpful for future folks

idle wharf
manic glacierBOT
#

Commit 4e8de3c554024d3ac89e9ee77b958a6932a64bec to switch to autoapi changed the path to as far as I can tell all of the docs from

https://circuitpython.readthedocs.io/en/latest/shared-bindings/busio/I2C.html#busio.I2C to
https://circuitpython.readthedocs.io/en/latest/autoapi/busio/index.html#busio.I2C

This broke all of the links to core classes from libs, as well as the 'latest' link from the non-latest versions, as well as the links to the non-latest versions from latest

slender iron
#

@idle wharf what version are you building?

idle wharf
#

That is a nightly build

slender iron
#

hrm, ok

#

k, just pushed two fixes to my branch

raven canopy
#

@slender iron for backporting RTD for v4 and v5, what are the target branches?

for v4, i've done 4.x, but not sure if i should target 4.1.x.

for v5, there is no 5.x. only 5.[1,2,3].x. is v5 still pointing to main?

please don't tell me it's all of the above. please. 🙏

slender iron
#

4.x and 5.0.x

raven canopy
#

:phew:

#

thanks!

manic glacierBOT
#

The redirects aren't working on readthedocs:

WARNING:root:The 'sphinxcontib-redirects' plugin is only supported by the 'html' builder. Skipping...

https://readthedocs.org/api/v2/build/11338560.txt

The build is invoked with the argument -b readthedocs and not -b html. The redirects-builder checks for exactly the html builder. https://github.com/readthedocs/readthedocs-sphinx-ext/blob/master/readthedocs_ext/readthedocs.py#L316 https://github.com/adafruit/circuitpython/blob/main/...

#

@dahanzimin You're right, on closer inspection they don't have direct support for a board using a F103. I had assumed they did because their drivers reference the F1 and account HAL differences for it. I'd have to dig around more to find out why they did that without any actual F1 boards on their support list.

If you or anyone else is interested in setting this up, this would be the general Todo List based on what it took to add the F7 and H7.

  • [ ] Create a family category in `mpconf...
ionic elk
#

@slender iron how hard to you think it'd be to grab the basics of ports/ and shared-bindings/ and just make a regular old C api out of it?

#

seems kinda tempting to me for some personal projects. It'd be nice to access my own STM32 code and I've got a couple projects that cant use python for speed reasons.

lucid solar
#

@ionic elk my advice on that...even though it's your code you want to use...if you're not using Python...then I'd 100% use Zephyr, I think it's very mature for STM32.

ionic elk
#

I mean zephyr and stm32duino both are pretty mature but I did not find zephyr to be that easy to get into. Very big learning curve.

lucid solar
#

Hmm, yeah I could agree...but I really think it's worth it. There is a ton of great samples and drivers available.

ionic elk
#

Plus it was hard for me to tell how much they actually implement, vs you just using the HAL? And I saw barely any drivers for external devices which is a HUGE timesaver for me

#

And I don't need any RTOS features

lucid solar
#

I would recommend you give it another shot. I love CPY, but I really think Zephyr is much more suited when you want to use c.

ionic elk
#

I'll try giving it a spin with ExpressionEngine and see how helpful it is for the SPI DMA stuff I need to do for that

#

I know a lot of people who use libopencm3 too.

#

But ultimately I still think it'd be kind of fun to be able to take a project you've developed in Circuitpython and then move it more or less one to one into C

slender iron
#

@ionic elk I think it's a neat idea but think the exceptions could be tricky to handle

#

only some of the common_hal apis return error codes rather than raise

ionic elk
#

Yeah I'd probably just have a python script that goes in and deletes or replaces those

slender iron
#

peripherals is the boundary that I didn't want micropython to influence

ionic elk
#

probably a big management script that'd convert the whole circuitpython codebase down into usable parts

#

@slender iron on that note do you think it'd be worthwhile to go through peripherals and remove explicit references to circuitpython/micropython?

slender iron
#

no, I don't think it's worth doing actively. just something to keep in mind when working on it

ionic elk
#

ok

crimson palm
#

Does circuit python have support for advanced BLE features like multiperipheral/swapping centrals?

lone axle
#

I am curious if it is okay to use eval within a library with a method like this to validate the input before passing it to eval() or if it is something that should just be avoided entirely.

def is_safe(self, the_str):
    print()
    _safe_characters = "0123456789-+/*"
    for character in the_str:
        if character not in _safe_characters:
            return False
    return True
# ...
if self.is_safe(user_input_str):
    return int(eval(user_input_str))
ruby atlas
#

@lone axle i'm always really wary of using evals...

#

But that said, eval has uses. can you do what you need with regexes?

lone axle
#

I am trying to solve some basic math equation essentially. It will have input like "160/2-42/2"

ruby atlas
#

hmm, yah, eval after sanitization might be your best bet, rather than writing a mini language.

onyx hinge
#

It can be a fun exercise to write a parser, but not if it's not what you are interested in doing, and maybe not within the constraints of CircuitPython

tulip sleet
#

@lone axle make sure to catch divide by zero, etc.

lone axle
#

Thank you. I will add that.

#

I may eventually dive deep enough to write the parser for the math part of it. In some ways it's being used within a parser as is. becuase the real input can start out something more like: "DISPLAY_WIDTH/2-WIDTH/2" and the appropriate values get swapped in before it makes it to the eval call.

#

I suspect it would take me a while to come up with one that works correctly at present time though.

#

I did find some CPython ones to study though when I looked into it last night

manic glacierBOT
slender iron
#

@crimson palm not sure what you are asking exactly. as a central we do support multiple peripherals

manic glacierBOT
crimson palm
#

Thanks @slender iron. Sorry for not being clear. I want my nrf chip to act as peripheral to multiple centrals. This is what I am referring to: https://jimmywongiot.com/2020/01/14/ble-hid-multiple-peripherl-example-on-nordic-nrf52-series/

This blog is to use Nordic nRF52840 as the BLE keyboard with multiple peripheral role. Those keyboard would connect to multiple mobile (BLE central) for demo. I would use the HOGP Keyboard example …

#

This is all in C++ but I'd like to know if circuit python can handle it

slender iron
#

I thiiiiink that would work

#

I believe we have it set to handle multiple connections

crimson palm
#

Great, thank you! Is there any way you could point me to the CPy library I should be using to manage multiple connections? @slender iron

tulip sleet
#

@crimson palm someone else asked me this question a few days ago; were you that person? They couldn't get multiple centrals to work.

crimson palm
#

Oh interesting! No that wasn't me

#

Did you come to any conclusions with them? I can search the discord if need be

tulip sleet
#

@crimson palm I think I found it, but I think the person was trying it in our Arduino BLE library, not CircuitPython. Here's an issue, that might have come from that discussion: https://github.com/adafruit/Adafruit_nRF52_Arduino/issues/517. I'm beginning to remember some more details, let me keep searching

crimson palm
#

Thank you very much @tulip sleet! So according to this there is no way to have this functionality on the feather atm, is that right?

tulip sleet
#

The Arduino implementation is not the same as the CircuitPython implementation. No one has tried it in CircuitPython, as far as I know. I am not sure if two centrals can initiate a connection based on the same advertisement, or whether you need to start a second round of advertising. We did not have the multiple central model in mind when we were coding, so it's possible it would not work, but it might work by accident.

#

just try advertising, and don't stop advertising until you get all the connections you want. or keep checking how many connections you have

#

as tannewt mentioned, we allow multiple connections

crimson palm
#

Alrighty, I'll give it a shot and let you know what I find. Thanks again!

orchid basinBOT
silver tapir
#

@idle wharf ⏫

manic glacierBOT
#

I've had something like this locally for some time.

It's more verbose in the Makefile, but if you write it like this, you can specify parallelism (e.g., make -j8 if you have an 8-core CPU) and get faster builds. However, as the output of various commands is interleaved, it can also make failures harder to interpret. On the whole, I like faster:

one-of-each: one-of-each-1
one-of-each-1: all-source
        $(MAKE) -C ports/atmel-samd BOARD=trinket_m0
one-of-each: one-of-each-2...
manic glacierBOT
lucid solar
#

@slender iron How did it go with SPI after the stream?

slender iron
#

figured it out

#

it was the SIO setting

#

twenty minutes and I sorted it 🙂

lucid solar
#

I just saw that in the commit 🙂 What is SIO?

#

Ah...I see.

#

Single IO

craggy galleon
#

Hey @tulip sleet just following up our discussion from a month ago (or longer) about USB HID report descriptors. I have it all ready to go, except I am having difficulties with finding where usb_hid.devices is located within CircuitPython + what it contains. I can see it has four devices in it, however, not my custom ones. Any one know how I can hack this up ? 😄

craggy galleon
#

Just to clarify... this is what I am talking about. I want to add in extra devices.

#

It appears to only have Keyboard, Mouse, Consumer and Gamepad in it

half sedge
#

@crimson palm someone else asked me this question a few days ago; were you that person? They couldn't get multiple centrals to work.
@tulip sleet That must have been me. I have something that does USB Keyboard IN and USB Keyboard OUT + BLE Keyboard OUT. https://twitter.com/DavidGlaude/status/1264245116664938497 . I later made a dual mouse emulator that jiggle the mouse on two computer, one in USB and the other in BLE. Right now it draw little 8 side circle on both computer to avoid that they fall asleep. I wanted to have that ItsyBitsy BLE be a BLE mouse to two computer simultaneously (or maybe as many as possible). This is to help teleworking and avoid losing the VPN or the VDI. I want to be able to connect to this BLE device and have the computer never go to sleep without beeing an annoyance (micro mouse movement every second are OK. I have refactored my BLE+USB code, but did not try Danh suggestion yet.

Duplicating a USB keyboard to USB and BLE with @CircuitPython from @adafruit

USB keyboard is connected (OTG) to a Trinked M0 running KBDADVUARTUSBH from @gdsports1
Trinked UART connected to nRF52840, every HID code is transmitted to USB and BLE.

Source: https://t.co/3hreWiD...

▶ Play video
manic glacierBOT
simple pulsar
lone axle
#

I can look into it in a bit. I think the background bmp fixed baxkground colors for custom fonts

#

Not sure why it would effect max glyphs. Perhaps that is just passing through to group size

simple pulsar
#

The backgroud has "stolen" the last character so you now need max_glyphs of 6 if you want to (later) show a string of 5 characters.

#

BTW, to return to previous discussion I have recent libs and I do see anchor_point changes taking immediate effect.

lone axle
#

Yep, max_glyphs is getting passed through to max_size of the Group __init__()

#

and it looks like the case where text was included in the constructor accounts for the extra 1 needed by the background. But the case where text is absent and max_glyphs is used instead doesn't account for the extra 1 that I can see.

#

Going to make some ☕ . I'll try tweaking it to account for the extra 1 in that case.

lone axle
lone axle
topaz quest
manic glacierBOT
manic glacierBOT
#

The version of cmake SHOULD be the one installed when you use the esp-idf setup process, and it should always be 3.16.

$IDF_PATH/tools/idf_tools.py --non-interactive install cmake
source $IDF_PATH/export.sh

After these commands, which are used during the github actions build process, the required version of cmake should be available AND placed first on the path. If this is not the case, it should probably be pursued as a bug upstream at esp-idf.

$IDF_PATH/tools/idf_too...
manic glacierBOT
#

The version of cmake SHOULD be the one installed when you use the esp-idf setup process, and it should always be 3.16.

$IDF_PATH/tools/idf_tools.py --non-interactive install cmake
source $IDF_PATH/export.sh

After these commands, which are used during the github actions build process, the required version of cmake should be available AND placed first on the path. If this is not the case, it should probably be pursued as a bug upstream at esp-idf.

...

#

These commands (among others) are run during the normal github build process for esp32s2, they are in .github/workflows/build.yml:

$IDF_PATH/tools/idf_tools.py --non-interactive install cmake
source $IDF_PATH/export.sh

IDF_PATH has been set to the full path of the esp-idf directory inside ports/esp32s2.

However, running that on a pi (I tried on a pi 4) gives the error message I showed:

ERROR: tool cmake does not have versions compatible with platform linux-armel

...

#

These commands (among others) are run during the normal github build process for esp32s2, they are in .github/workflows/build.yml:

$IDF_PATH/tools/idf_tools.py --non-interactive install cmake
source $IDF_PATH/export.sh

IDF_PATH has been set to the full path of the esp-idf directory inside ports/esp32s2.

However, running that on a pi (I tried on a pi 4) gives the error message I showed:

ERROR: tool cmake does not have versions compatible wi...
thorny jay
#

If you figure out what to change to turn the USB mouse into a second BLE mode... don't hesitate. I'll make a few try but not sure if will work.

manic glacierBOT
manic glacierBOT
lone axle
#

does the actions / CI system always take the latest verison of pylint? or do we upgrade specifically at certain times?

onyx hinge
#
      run: |
        pip install --force-reinstall pylint black==19.10b0 Sphinx sphinx-rtd-theme
``` Adafruit_CircuitPython_NTP uses latest during the github build
#

I assume the most canonical thing would be to look at what cookiecutter makes

raven canopy
#

yes, pylint installs mirror latest. Kattni didn't want it pinned, like it was before, since it was a "herculean" effort to update it when the major version changed.

lone axle
#

Ah, gotcha. Is there any prescribed way of dealing with new checks that come up with new versions? occasianally I run across PRs with pylint issues on parts of the code that weren't touched by the PR.

raven canopy
#

disclaimer: that's how i remember the decision. i could very well be mis-remembering.

#

personally, i'd probably handle them as a reviewer and push the updates. unless it forces some larger changes...then i'd just start the conversation.

lone axle
#

@raven canopy unrelated to that but since you're here 😄. I am looking into setting up RosiePi, I found a few different repos related to it. Is this the place I should be working from to get my setup started? https://github.com/physaCI/RosiePi_Ansible

raven canopy
#

that's the one. i think its current. let me check real quick.

thorny jay
#

@crimson palm I have updated my Gist with a BLE+BLE version of my mouse jiggling. It is just a proof of concept, the code is not bullet proof, but it possible to advertise again after the first connection. So it can be periferal to a first central and periferal to a second one. But you can only advertise one thing at a time. @tulip sleet I might have found a bug (or it is my code) but the "mouse2" also get the HID event I try to send to "mouse1". It is not an issue for my usecase, but maybe you should have a look.

raven canopy
#

while i hide my giddiness...

lone axle
#

Okay cool ty (re: the pylint changes) In this case I lucked out a bit because I finally had it happen on one of my own PRs and I dug enough to realize it was seemingly caused by differnet versions.

manic glacierBOT
#

Some things about how WE invoke cmake do require something newer than 3.5 There is some confusion about -S and -B flags specified in the order we use, but more importantly 3.5 does not know about Ninja files.

However, since esp-idf says 3.5, we can set it to the minimum of what we require and what they require. So why not go ahead and pull request to change it to 3.10, or 3.12, whatever makes more sense with you. If we won't continually verify 3.10 compatibility, specifying somethin...

raven canopy
#

@lone axle current version there should still work. i haven't pushed the "new" pytest-based versions up to the org repos. also, my fork of circuitpython is the only one that has the GitHub App installed...

#

i'd also have to set you up with a physaCI token, but that's easy. 😉

lone axle
#

Okay cool. I am not very familiar with lots of the tools in use so it may take me a bit to get there. But I'm going to work on getting it set up tonight and tomorrow.

raven canopy
#

sounds good. ask any question(s) you have. the README is up-to-date, aside from pointers to some of the stuff i'm leaving to individuals (firewall, etc...)

#

the Ansible script takes care of everything that RosiePi needs.

#

i'll try and get the org repos up to current tonight.

orchid basinBOT
onyx hinge
#

@raven canopy looks great

raven canopy
#

thanks. its rather minimal. 😄

#

and blindly fighting with the Sassy CSS stuff was...fun. hehe

crimson palm
#

Thanks for the updates @thorny jay! I’ll have a gander.

thorny jay
#

@

Thanks for the updates @thorny jay! I’ll have a gander.
@crimson palm Place keep me in the loop, I am sure better code is possible.

lone axle
manic glacierBOT
raven canopy
#

@lone axle ahh. looks like i left of the s in /releases. 🤦

#

i should probably point to the "new" page though now, since they're RPi certified now.

lone axle
#

Ah, I see. I stepped away for some other things and it took a while to write and confirm the image. But its booting now. First time using anything but raspbian for me

tulip sleet
#

@thorny jay Thank you! Glad to see that multiple centrals are possible. I do know you can only have one advertisement going at a time. The double HID may be due to an internal assumption about global HID, or it may be due to multiple duplicate services not being handled properly.

lone sandalBOT
manic glacierBOT
simple pulsar
#

Trivial question for CLUE / TFT Gizmo serial console display on LCD. Is it possible to change the text colour on this?

manic glacierBOT
onyx hinge
#

@simple pulsar no, there is no facility included to change the text color of the console.

crimson ferry
#

Pros & Cons of enabling uheap.info in CP builds?

tulip sleet
#

@crimson ferry We took out uheap and ustack to save space, when we were SAMD21 only. We used them mostly for debugging. They could be restructured to be smaller, maybe, and we'd probably rename them.

manic glacierBOT
#

.incoming_packet_length was added after 5.3.0, so unless we have another 5.x stable release, and then change the libraries, we can't drop .packet_size and have the libraries be backwards compatible without conditional code. We could defer this to 7.0.0, or put in conditional code.

The Adafruit libraries that use .packet_size now are:
https://github.com/adafruit/Adafruit_CircuitPython_BLE_Adafruit
https://github.com/adafruit/Adafruit_CircuitPython_BLE_iBBQ
https://github.com/adafru...

lone axle
simple pulsar
#

@lone axle cool, just in the middle of something, will have a look later

#

@onyx hinge I had no need for this, I was just thinking of a retro green phosphor look picture from a CLUE

topaz quest
#

@tulip sleet could I ask you for a couple of pull request reviews on the mcp230xx library? 😇

tulip sleet
#

@topaz quest I am not familiar with the library; I assigned the reviews to CircuitPythonLibrarians. cater is the most familiar, I think.

topaz quest
#

Thanks!

tidal kiln
#

^^ looks largely sphinx/doc related maybe? i'm not very familiar with the SPDX thing. but someone else in the CPLib group may be.

topaz quest
crimson ferry
#

@simple pulsar You can print to a scrolling box with colored text, e.g., fontx, fonty = terminalio.FONT.get_bounding_box() term_palette = displayio.Palette(2) term_palette[0] = 0x000000 term_palette[1] = 0x00ff00 logbox = displayio.TileGrid(terminalio.FONT.bitmap, x=0, y=0, width=board.DISPLAY.width//fontx, height=board.DISPLAY.height//fonty, tile_width=fontx, tile_height=fonty, pixel_shader=term_palette) splash.append(logbox) logterm = terminalio.Terminal(logbox, terminalio.FONT) print("Testing...", file=logterm, end='\r\n')

simple pulsar
#

@crimson ferry Looks interesting, I'll have a play with it, if there's a way of redirecting/tee'ing stdout to logterm that would kind of do it.

#

@crimson ferry What is splash ?

crimson ferry
#

@simple pulsar That's the name of the top-level group

#

common in displayio examples and tutorials, e.g., splash = displayio.Group(max_size=10)

lone axle
#

@raven canopy I think I am ready for an PhysaCI access key. The ansible process finished while I was out but it seems everything completed successfully 🎉

crimson ferry
#

@simple pulsar print("Testing...", file=sys.stdout) is implied by print("Testing..."), so with some abstraction on what file= gets assigned, maybe you can achieve what you're after

manic glacierBOT
#

This is just blew (LCD shows safe mode) up at the import of ble code so probably nothing to do with ble stuff. One difference here is I have refreshed libraries and I no longer have the adafruit_clue.

Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit CLUE nRF52840 Express with nRF52840
>>>
>>>
>>>
>>>
>>>
>>> import board
>>> from displayio import Group
>>> import displayio
>>> from audiocore import WaveFile
>>> from adafruit_clue import clue
Traceback (most recent c...
#

I don't know if these end up contiguous but it seemed worht a shot. Something clearly isn't healthy but there's no massive splat into spare1 and spare2.

@jepler Do you know for your case if you were looping?

Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit CLUE nRF52840 Express with nRF52840
>>>
>>> import board
>>> import displayio
>>> from audiocore import WaveFile
>>> from adafruit_clue import clue
Traceback (most recent call last):
  File "<stdin>", line 1, in <m...
topaz quest
#

@tidal kiln turns out I was wrong about the 16-bit atomic access — that works, too. And pretty much the same way as in '17. So I just implemented that, and included DigitalInOut that I didn't implement earlier.

manic glacierBOT
#

Probably related to the buffer size, if I use 512 which is the equivalent of the what's allocated in the code (2*256) then it seems robust, admittedly form one quick test. This makes some sense as this is exercising less used/tested code, perhaps?

Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit CLUE nRF52840 Express with nRF52840
>>>
>>>
>>>
>>> import board
>>> from displayio import Group
>>> import displayio
>>> from audiocore import WaveFile
>>> import gc
>>> gc.col...
simple pulsar
raven canopy
#

@simple pulsar that box is generated by ReadTheDocs, and it looks like its just changing the version part of the URL. with the switch to using AutoAPI and the stubs to generate docs, the URLs aren't the same in 5.x and beyond.

onyx hinge
#

@simple pulsar we now have a file of redirects, you could add the renamed (to audiocore) pages to it. I'd be happy to look over the pull request if you tag me

#

Each line is a from and a to, the from ends in rst because that's the extension of the doc source

manic glacierBOT
lone axle
#

Is there any trick or anything needed to try building circuitpython on raspberry pi? I think I made it through the setup process correctly but I am getting this error:

pi@raspberrypi:~/circuitpython/ports/atmel-samd $ make BOARD=metro_m4_express
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
/home/pi/bin/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc: 1: /home/pi/bin/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc:ELF: not found
/home/pi/bin/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc: 1: /home/pi/bin/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc: Syntax error: Unterminated quoted string
make: *** [../../py/mkrules.mk:82: build-metro_m4_express/genhdr/qstr.i.last] Error 123
make: *** Deleting file 'build-metro_m4_express/genhdr/qstr.i.last'
mental nexus
#

@lone axle @simple pulsar thanks for the updates on label for the max_glyphs update. Sorry but have been a bit out of pocket with a new puppy that we just welcomed into our home. Yikes I forgot about puppy behavior, so much biting! I think her name should be Sharky. Anyway I read through the PR and looks like it got approved/merged. Thanks for the work on fixing this!

lone axle
#

Hooray! new puppy!

mental nexus
#

And I haven’t forgotten the updates on sparkline. That’s still in my queue.

lone axle
#

I'm going to work on adding your TextMap to may new layout system soon

onyx hinge
#

@lone axle @solar whale has been interested in this as well, maybe they have some tips.

solar whale
#

@lone axle I am able to build on my Pi. Not sure what is wrong for you.

#

How did you install the arm toolchain?

#

Off for sleep now. Let me know if you are still having problems and I’ll try to help tomorrow. It’s been awhile since I set it up on the Pi.

orchid basinBOT
manic glacierBOT
#

Allows circuitpython-org #426 to be updated with each release.

  • Docs verified locally, and built correctly with changes to shared_bindings_matrix.py.

  • Changes to build_board_info.py were used to generate info that was manually merged into _data/files.json in circuitpython-org #493. I'm fairly confident they will work in the CI when the release Action is run. Its...

raven canopy
#

well, i thought the docs built fine. wonder if i made a change after testing. so close... 🤔

#

yep. still had the failure point short-circuited when i tested. 🤦

manic glacierBOT
solar whale
#

@lone axle On your Pi are you running Raspian or is this your Ubuntu Pi ? -- I am using Raspian.

#

also -- I built my own set of the arm toolchain locally for Raspbian since the package manager installed an older version -- only takes 8 hours to build on a Pi 4 😉 -- Raspbian may have upgrade by now, I have not looked recently but it looks like it still installs the older version (2018) by default (using apt-get) -- I see you are using 2019-q4 but curious where you got it for the RPi?

#

Let me know If you want a tarball of the toolchain I built.

prime cove
#

I'm writing a circuitpython library for an EEPROM chip. Do libraries typically prevent users from doing incorrect things(e.g. writing beyond memory bounds) or is this something the user is supposed to handle?

lone axle
solar whale
#

That toolchain will not work on your Raspberry pi, -- try entering arm-none-eabi-gcc -v and see if it reports an error executing the program

lone axle
#

Ahh, yep it seems that it does:

#
-bash: /home/pi/bin/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc: cannot execute binary file: Exec format error
solar whale
#

right -- it's the wrong architecture

lone axle
#

Ah.... now I see X86_64 clear as day in the name of the one I downloaded from that page before. Not sure why I ever expected it to work.

manic glacierBOT
#

I frequently use directory names that are NOT "circuitpython" for my circuitpython clones. For instance, a tree which I never put my own changes in I call cp-pristine. Won't this code work improperly in these cases?

Alternative: Use the predefined variable __file__ in the shared_bindings_matrix module, since it is at a fixed location relative to the circuitpython source tree:

def get_circuitpython_root_dir():
    p = pathlib.Path(__file__).resolve()
    return p.parent.pa...
lone axle
#

That seems to have done the trick. Thanks @solar whale

Create build-metro_m4_express/firmware.uf2
python3 ../../tools/uf2/utils/uf2conv.py -b 0x4000 -c -o build-metro_m4_express/firmware.uf2 build-metro_m4_express/firmware.bin
Converting to uf2, output size: 758784, start address: 0x4000
Wrote 758784 bytes to build-metro_m4_express/firmware.uf2
manic glacierBOT
manic glacierBOT
solar whale
#

@lone axle just to check -- did you have to do anything else other than untar as I described? I wanted to make sure I had not skipped a step.

lone axle
#

@solar whale There was not anything else. I ended up running the tar slightly differently to match more closely how it's done in the learn guide:

tar -C /home/pi/bin/gcc-arm-none-eabi-9-2019-q4-major --strip-components=1 -xaf gcc-arm-none-eabi-9-2019-q4-major-armv7l-linux.tar.bz2
solar whale
#

Great! good to know. Glad it is working.

turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Region

us-west

Channel Categories

8

Text Channels

52

Voice Channels

6

Members

21627

Roles

32

manic glacierBOT
#

Thanks @deshipu. The article above points to an OSHWA resolution: https://www.oshwa.org/a-resolution-to-redefine-spi-signal-names

The essence is (qouting)

New signal names:

  • SDO – Serial Data Out. An output signal on a device where data is sent out to another SPI device.
  • SDI – Serial Data In. An input signal on a device where data is received from another SPI device.
  • CS – Chip Select. Activated by the controller to initiate communication with a given peripheral.
  • COPI (con...
slender iron
#

@prime cove yeah libraries should try and raise exceptions on incorrect use

manic glacierBOT
prime cove
#

@slender iron Thanks! This is my first time really writing anything in circuitpython. Once I get things tidied up a bit, is this a good place to find someone to give me some feedback on the library? If not, where should I ask?

slender iron
#

Yup! Here is good and the community bundle is a good place to share it

thorny jay
#

Dear @lone axle and @solar whale, beeing able to build CP on a Raspberry Pi would be really great. I'll give it a try using the guide and the exchange here. I don't have a Linux server always up, nor a powerfull machine where I can spawn a VM but I have Pi4 that I can keep running or quickly boot. This is for me the equivalent of a VM. I don't care if it is slow, it cannot be slower than when I was compiling the Linux kernel on a 386sx. It's easy to dedicate a USB key or a microSD for that particular use and boot on that whenever I need to build CP. Right now I have limited myself to library stuff that I can do in Python, but I am sure there is fun on the C side.

lone axle
#

I did end up getting a successful build once I got the correct gcc. I've never build Circuit Python directly on a nice PC, but anecdotally the build on the Raspberry Pi seemed pretty comparable in time taken to when I build using a VM in my laptop.

#

I may end up going back through the process another time and trying to document every step in a readme.md somewhere. I could see myself referencing back to that if I do make it.

#

Jerry's link to the gcc saved me a ton of setup time before I would have been able to make the build.

thorny jay
#

That would be great.

manic glacierBOT
#

We didn't make a new release yet, we just tagged 6.0.0-alpha.0, but there was no release.

.uf2 artifacts for the meowbit started showing up as of June 17: https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/meowbit_v121/en_US/

But there hasn't been a commit to https://github.com/adafruit/circuitpython-org/blob/master/_data/files.json since June 8, when the last 5.4.0 beta was released.

I'll check during the meeting today whether 6.0.0-something is imminent. If not ...

solar whale
#

@thorny jay I had to build the arm GCC toolset locally -- send me your e-mail address in a DM and I will provide you access to it

#

or you can build it -- only take 8 hours on a Pi 4

raven canopy
#

on Ubuntu Server, firmware compiles take around 6-9 minutes for me. RPi 4 is a little quicker than a 3B+. booting from SSD didn't speed it up as much as i thought it would, but haven't booted the 4 from SSD yet.

#

i also need to test -j[2,3,4] on the RPi 4. j2 helped a little on the 3B+ for me.

thorny jay
#

While the SSD surely help and the USB3 also, it is more for reliablilty compare to SD card than for anything else. Also space from the SSD is great.

raven canopy
#

yep. in my context, the SSD reliability is the driving factor. the speed will just be a perk. 😄

solar whale
#

each board build only lake about 3 minutes on the P4

raven canopy
#

i wonder if its the Raspbian/32-bit improvements over the Ubuntu/64-bit "shimming". i've read reports of 64-bit operations taking a bit longer vs 32-bit.

idle owl
#

@slender iron Do you expect to release 6.0-beta.0 this week?

slender iron
#

It may be alpha if we don't do all of the API changes

idle owl
#

ok, rephrase

#

Are you planning to release 6.0 this week

slender iron
#

Yes of some sort

idle owl
#

Thank you.

slender iron
#

to start the messaging of 6.x

idle owl
#

Hello, all! The CircuitPython Weekly is in about 40 minutes. Please add your Hug Reports and Status updates to the notes document, even if you'll be attending - it's super helpful! Talk to you all soon! <@&356864093652516868> https://docs.google.com/document/d/1P9jItrwitljf_oKBBXYs92uRks99zoFmye2YEzAj2lE/edit#

modern wing
#

Good afternoon all you wonderful folks -- happily lurking today 🙂

onyx hinge
#

much louder though, I'd bring it down a touch

simple pulsar
#

Lurking

onyx hinge
#

I'm trying to gather lurkers, wish me luck

#

I always miss at least 2

idle owl
#

Thanks, @onyx hinge

stuck elbow
#

lurking

manic glacierBOT
#

OK, thanks

On Mon, Jun 29, 2020 at 11:51 AM Dan Halbert notifications@github.com
wrote:

We didn't make a new release yet, we just tagged 6.0.0-alpha.0, but there
was no release.

.uf2 artifacts for the meowbit started showing up as of June 17:
https://adafruit-circuit-python.s3.amazonaws.com/index.html?prefix=bin/meowbit_v121/en_US/

But there hasn't been a commit to
https://github.com/adafruit/circuitpython-org/blob/master/_data/files.json
since June 8, when the last 5.4....

onyx hinge
#

It is the distant future. The year 2000

uncut nexus
#

lurking today

errant grail
#

text only today

ivory yew
#

👋

manic glacierBOT
#

Same core issue as #3077

While on this page:
https://circuitpython.readthedocs.io/en/latest/shared-bindings/board/
The "5.0" version link points to

https://circuitpython.readthedocs.io/en/5.0.x/shared-bindings/board/index.html
which does not exist. The actual URL is
https://circuitpython.readthedocs.io/en/5.0.x/shared-bindings/board/__init__.html

To be explicit about the scope of this issue, I won't consider it fixed until all known broken links that resulted from the autodoc...

tulip sleet
#

@idle owl @slender iron @onyx hinge I may have to cut out during about 2:30 - 2:45 for some non-work tech help thing; I'll ask to delay or be early if my turn is coming around. Should be back 2:45 or earlier if that happens.

manic glacierBOT
prime flower
#

@ionic elk same! the thunder is wild

tulip sleet
#

are you in western ma @ionic elk

ionic elk
#

poor doggos are freaking out 🐶 😱 ⛈️

#

yeah

#

I was trying to heat up some soup in the kitchen and they were trying to literally lie down on my feet

inland tusk
#

I am lurking

idle owl
#

@viral minnow Are you lurking today?

twin mica
#

lurkin' today ✌🏽

viral minnow
#

@idle owl no I can talk

onyx hinge
#

@summer dagger will you be participating in the meeting today?

slender iron
#

👍

onyx hinge
#

@viral minnow I'm moving your notes into alphabetical order. Thanks for adding them!

viral minnow
#

@onyx hinge thanks Jeff, first time doing this 🙂

onyx hinge
#

@anne_engineer @adafruit @microbit_edu @Dan_Halbert Hi. Code for CLUE is available here: https://t.co/izfcY52nhy and micro:bit project is here: https://t.co/9KcifcGz1A. I'm still learning so CLUE part can probably be optimized. If I'll find some time, I'll make simple library...

#

@adafruit Clue and WiFi Featherwing bridged with @pimoroni Pinbetween uploading sensor stats to @AdafruitIO , nice’n’easy , kinda !

#
Twitch

nnjaio went live on Twitch. Catch up on their Science & Technology VOD now.

▶ Play video

▪️Developer
▪️Pythonista 💜🐍
▪️PSF Director
▪️Speaker
▪️@frontendmasters author
▪️@recursecenter alum
▪️Opinions my own
▪️Advocacy at microsoft
▪️she/her

Tweets

12046

Followers

25374

Thea Flowers ✨ CircuitPythonista ✨ Synth crafter (@wntrblm) ✨ PSF Fellow ✨ She/her.

Tweets

24151

Followers

5821

slender iron
#

yay @ivory yew !

onyx hinge
#
Hackster.io

Track the ISS' current location & trajectory using a Raspberry Pi, ePaper Display, ProtoStax Enclosure and Python. By Sridhar Rajagopal.

Adafruit Industries - Makers, hackers, artists, designers and engineers!

Here’s a fun project that uses an ePaper Display in concert with a Raspberry Pi to make a visual home tracker for the International Space Station. Here’s a bit on the nuances of coding …

slender iron
#

pretty!

onyx hinge
raven canopy
#

oh man. those protostax enclosures are nice. i've been looking for similar for RosiePi...

onyx hinge
#

User wtuemura on github is another new contributor; probably their pull request wasn't merged by the time the stats were generated this week

raven canopy
#

i really need to track that -1 result down... 😄

slender iron
#

off by one errors are no big deal 🙂

onyx hinge
#

The PCF8591 is a single-chip, single-supply low-power 8-bit CMOS data acquisition device

slender iron
#

@finite vine are you just listening in (aka lurking?)

tulip sleet
#

@gilded cradle should we add the blinka displayio and _bleio libraries to the Blinka status now?

gilded cradle
#

That would be nice 🙂

#

Probably platform detect as well

finite vine
#

yeah just listening

slender iron
#

kk, welcome!

#

awesome! thanks!

#

🎉

onyx hinge
modern wing
#

Regarding moderation -- I hope no one gets the wrong idea. Things are actually going pretty well.

We've mentioned it before, in a community of over 21k -- a tremendous majority are awesome folks. It's just a handful of isolated incidents that need attention.

We always want to say -- thank you for being really good everyone 🙂

slender iron
#

thach too

onyx hinge
slender iron
#

they were here to hear their hug report

thorny jay
#

I wanted to try saying my Hug report, but the hangup button is next to the mute button.

#

I'll try my other report. 🙂

onyx hinge
#

@thorny jay noted

slender iron
#

@uncut nexus are you looking at the pulseio issue?

tidal kiln
#

@solar whale did you say it's a radio feather?

onyx hinge
solar whale
#

adalogger

tidal kiln
#

ah. ok. nvm.

prime flower
#

@viral minnow I mightve missed this, do you work for RAKWireless? I have a RAK5010 for testing if you want. Excited to see support for rak hardware.

onyx hinge
#

@solar whale I notice you're not muted, though I don't hear anything from you

viral minnow
#

@prime flower Yes I joined RAKwireless this month 🙂 RAK5010 is working really well I'll send a PR to support it this week.

prime flower
#

@viral minnow congrats! I like the super-thin antenna they include with their boards 🙂

simple pulsar
#

@solar whale What was the exact hardware combination that was problematic? I think those SD card slots have card physically present pins, could those be involved?

solar whale
#

feather_m4-express. 2.4inch TFT feaherwing, adalogger featherwing -- jumpers are set -- both readers are acceesible but the circumstances are very inconsistent.

onyx hinge
crude blaze
#

hey 👋 (just listening in)

modern wing
#

+1 that's an awesome scrolling sign. Brings back memories of programming an old high school LED sign, carefully over an infrared controller every week. This looks a 1,000x nicer, and a lot easier to program I'd reckon 🙂

tulip sleet
#

@idle owl please skip me; impt phone call

ivory yew
raven canopy
#

those pastel patch cables are glorious! 😄

viral minnow
#

That's a nice photo 🙂

inland tusk
#

@ivory yew good luck with your move.

ivory yew
#

thanks!

crude blaze
ivory yew
#

it's so stressful

crude blaze
#

same

raven canopy
#

indeed.

inland tusk
#

whats up with everybody seems to be moving

crude blaze
#

just the thought of packing up my workshop gives me shivers

inland tusk
#

undersstood

tidal kiln
slender iron
#

nice!

#

makes me want to hike too

ivory yew
#

oh that's rad!

modern wing
#

looks at workshop

thinks about packing it up and moving

nope. I can't do it. my neurons just segfaulted considering it.

inland tusk
#

@errant grail My make noise 0 coast does that

ivory yew
#

@errant grail please keep me posted on that!

errant grail
#

@ivory yew will do. Hopefully will have a breakthrough today or tomorrow.

prime flower
#

@ivory yew I'm moving 35min away, across the country would be stressful indeed! I hope it goes well.

ivory yew
#

@prime flower I'm gonna try to hire a full service mover to just do it

slender iron
#

I moved across a courtyard and it was stressful

onyx hinge
slender iron
#

paying someone to move stuff is worth it

onyx hinge
slender iron
#

ooooh, neato

prime flower
#

@thorny jay re: computer falling asleep, I use Caffeine for macOS.

onyx hinge
thorny jay
#

@thorny jay re: computer falling asleep, I use Caffeine for macOS.
@prime flower One of those computer is corporate where I cannot install anything... a surface that had only one USB plug (now I have the docking station) so BLE was interesting. My other computer is Thinkpad with only two USB still working, so there BLE permit me to plug a mouse and a CP board.

#

Of course I could use two BLE CP board... but then it is not fun.

modern wing
prime flower
#

TIL, thanks mr certainly.

thorny jay
#

@ionic elk is that H7 you are talking about is STM32H7 (like on that Maximite I was talking about)?

slender iron
#

@ionic elk if you end up with time this week, we should get you going on esp32-s2

ionic elk
#

STM32H7 yeah. Right now we support the H743, which is used on the OpenMV and some other high performance boards

#

I haven't seen the maxemite but if it's available online I can grab one and add support.

slender iron
#

looks like the maximite is 743 too

ionic elk
#

@slender iron I'll start reading the docs for the ESP32 and put some notes together if I have time

#

Is there something in particular you'd like help with so I can focus on it?

#

what's this actual maxemite thing, does somebody have a link?

slender iron
#

pulseio?

raven canopy
#

are the F743i and F743zi essentially the same? STM's models number confuse me at a certain point. 😄

slender iron
#

its a retro computer

tulip sleet
#

@slender iron @idle owl I'm back

ionic elk
#

@raven canopy for ST, the letters that come after the line number dictate the flash/ram combo and the package size

idle owl
#

@tulip sleet Jeff read your status update. You'll be up for in the weeds.

thorny jay
ionic elk
raven canopy
#

i did yes. haha. see...confuses me. lol

slender iron
#

I wonder if you could enable both CS lines at the same time

#

I guess that's bad because then they both drive MISO

ionic elk
#

@raven canopy the exact naming scheme for STM32s is this: for the H743ZI, H7 is the family name (high performance M7/M4 combo chip tier), 743 is the line number (these can seem kind of random but have certain trends across families), Z is the package type (100pin LQFP, always uses this letter across all families) and I is the RAM/Flash combo (which are arbitrary per chip line)

slender iron
#

sdcards are cheap 🙂

ionic elk
#

@thorny jay what is the actual Maximite tho?

slender iron
#

its a retro computer

ionic elk
#

so is it emulated on the H7?

simple pulsar
#

Unplug and replug or press reset button?

ionic elk
#

wikipedia says it was pic based

slender iron
#

"The Colour Maximite 2 is a small self contained computer inspired by the home computers of the early 80's such as the Tandy TRS-80, Commodore 64 and Apple II."

thorny jay
#

@thorny jay what is the actual Maximite tho?
@ionic elk This explain better than me: https://www.youtube.com/watch?v=lzrX72aB7zg

I've coded BASIC since I was 5 : C64 then QBASIC then VB - so when a sub-100USD boot-to-BASIC touting 16-bit graphics appeared, I decided to build one (aka 5) from beta plans. Anyone who struggled with QBASIC on a 386 or AMOS on an Amiga and just wished it was faster (without ...

▶ Play video
onyx hinge
#

I have Linux eric 5.2.0-0.bpo.3-amd64 #1 SMP Debian 5.2.17-1~bpo10+1 (2019-09-30) x86_64 GNU/Linux and it actually hasn't happened in awhile

thorny jay
#

wikipedia says it was pic based
@ionic elk new version just out now and based on STM32.

slender iron
#

@thorny jay USB host and VGA support is probably the toughest part

ionic elk
#

@slender iron should I get the whole computer or just the core chip?

#

off waveshare

#

or waveshare via amazon

onyx hinge
slender iron
#

I don't think it's urgent. the 743 should already be supported

#

USB host and VGA will be a non-trivial amount of work

ionic elk
#

tru

simple pulsar
#

Does this crash only happen on Pis?

solar whale
#

no

thorny jay
#

@thorny jay USB host and VGA support is probably the toughest part
@slender iron Right now I was just interested in reusing the board if I get bored by Maximite 2. But of course, if it is possible to replace their "Basic" software by Circuit Python... then this is a Circuit Python computer !!!

tulip sleet
#

no, it also happens on x64

#

I've tried kernels from 4.10 to 5.7; they all have the bug

slender iron
#

@thorny jay I'd love to support USB host and VGA but it isn't a priority

thorny jay
#

USB host... again.

tidal kiln
#

could that info be in the lib?

inland tusk
#

@tulip sleet So isn't just me having the problem.

simple pulsar
#

When I wrote the plotter for the clue I noticed there was no (standard) way on the APIs for finding min/max for sensors

ionic elk
#

@thorny jay if you have the actual H7 part, I can add board level support without having it on hand, if you're available to test.

tulip sleet
#

@inland tusk no, a number of people using Linux on various platforms have been bitten by it

thorny jay
#

@ionic elk I order the stuf... (it's in back order)!

inland tusk
#

I just reurned 18.04 to avoid it

tulip sleet
#

i was getting this on 18.04 also

inland tusk
#

It was intermitent for me in 18.04

prime flower
#

@tidal kiln yes, I meant that the sensor properties would be part of the sensor library design much like universally calling sensor.temperature in a temperature sensor lib.

simple pulsar
onyx hinge
#

e.g., sensor.min_temperature = -40; .max_temperature = 100; .temperature_resolution = 1/256; ?

#

we could release 5.3.1 with the new names

prime flower
slender iron
onyx hinge
#

@prime flower but say you have an AHT20 (?) and it has .humidity and .temperature .. it then needs 2 sets of min/max/resolution right?

#

@raven canopy random neuron firing: can we help people in getting "main" branch when they use cookiecutter, or is initializing git distinct from running cookiecutter so that's not possible?

prime flower
#

yeah, ICs with multiple sensors are tough in that case..

raven canopy
#

@tulip sleet for eventual removal of API, maybe just throw in a Deprecation Warning print, based on versioning? not sure how far they'll propagate beyond library dev...

tidal kiln
#

@prime flower sort of reminds me of "transducer electronic data sheets" (something i ran into in a previous life)

onyx hinge
solar whale
#

👍

thorny jay
#

I spend a lot of time downloading the bundle and updating my board... then I get a mix of old and new, so I update things.

#

And the picture in learn guide help to know what is a file *.mpy and a folder.

raven canopy
#

@raven canopy random neuron firing: can we help people in getting "main" branch when they use cookiecutter, or is initializing git distinct from running cookiecutter so that's not possible?
@onyx hinge honestly, i don't remember if cookie init's the git. however, the adafruit repository on github should be separate.

tidal kiln
#

🎁 ⬆️

modern wing
#

Thank you all!

slender iron
#

thanks!

simple pulsar
#

bye

gilded cradle
#

thanks

onyx hinge
#

👋

#

time to stretch my legs & clear my head .. or vice versa

uncut nexus
#

@slender iron - would you have a few minutes for a phone call regarding the pulseio issue for CP5.4 on M0s?

idle owl
#

I need to drop off.

#

Thanks all!

modern wing
#

I just had to setup a new Mac this past week while I was out -- my old one got a bloated battery and had to be retired. And I feel your pain @idle owl -- after seven years, I forgot how to setup all the little tweaks and quirks in the OS and my workflows...

slender iron
#

@uncut nexus sure! will discord work?

uncut nexus
#

well, there's likely to be a lot of back-n-forth

idle owl
#

@modern wing Exactly. It's like moving into a new house except you only have some of your stuff, and there's a bunch of stuff already there.

slender iron
#

we can do voice over discord

modern wing
#

And the worst part, you don't really know what stuff you used to have.

uncut nexus
#

ok - how to do that?

lone axle
#

I usually end up throwing my old hard drive into an external enclosure and the first 6 months of using the new PC I end up pulling it out a few times a week to check on something or copy some old thing over

solar whale
#

Dog is desperate -- better go now -- have a good week 👋

modern wing
#

@lone axle I hear ya, I was doing last minute referencing while doing the final battery discharge -- while backing up preference files. Having a package manager is such a relief for bulk installs too.

prime cove
simple pulsar
#

Random displayio question, am I allowed to stick None in a displayio Group half way through a list? I'm using "allowed" in the sense of the other non-None elements will still display properly.

#

I can try this, of course and just see what happens...

onyx hinge
#

@solar whale http://elm-chan.org/docs/mmc/mmc_e.html#spiinit "Initialization Procedure for SPI Mode"

After a power-up sequence, MMC/SDC enters its native operating mode. To put it SPI mode, follwing procedure must be performed as shown in this flow.

placid stirrup
#

Hi all, new here. I have a question regarding CircuitPython and particle products. I have a Particle Argon that I can convert over but I was wondering if anyone knows if doing so gets me wifi with that board? I’m going to connect it to a mqtt server and that board does have a built in wifi chip cause it’s accessible via particles code.

lone axle
#

@placid stirrup I am not 100% certain because I don't have any of the particle devices myself. I believe the deal is that if you use Circuit Python on the particle Argon at this time you cannot make use of the built-in wifi. At present time if you want to use wifi I think you would need to use an AirLift featherwing or other ESP32 breakout device with NINA firmware to act as a co-processor.

#

Even though the argon device has builtin wifi, I think Circuit Python does not have support for using it.

placid stirrup
#

Ok thanks for the answer 🙂

viral minnow
#

Oh wow my sound was so bad on the recording really bizarre, sounded like the wrong sample rate

onyx hinge
#

@viral minnow yeah it sounded odd to me but I could understand you so I went ahead with things. If you would like to do a mic check between now and the next meeting, just let us know.

viral minnow
#

@onyx hinge thanks and yes please when you have a chance, I think I had the wrong sound input source selected here.

onyx hinge
#

@lone axle three possibilities for capturing images from displayio: 1, there is a method on Display to get the content of one screen line, and a library can make a bmp file out of it. I don't have the link handy. 2, if you settle for small displays perhaps framebufferio can help. 3, you could do it on the blinka implementation which might have additional options for capturing output

#

@viral minnow I could hop back on the voice chat now if you don't mind the sound of a 3d printer in the background

viral minnow
#

Cool, I'm there now will stay a bit

#

Ok problem solved, thanks

crimson ferry
#

@lone axle @placid stirrup I think the issue is that the ESP32 on the Argon doesn't have the right pins exposed to use ESP32SPI and the NINA firmware. I believe some folks have used the AT command protocol with that firmware, but I don't think that's really supported anymore.

lone axle
#

Oohh Neat! Thank you! I like the idea of using Blinka so the images can get stored on the Pi and I don't have worry about transfering them anywhere.

#

I have a tiny bit of experience with Pillow, I may be able to figure out how to get it to save out a file.

slender iron
#

@prime cove Looking at it now. I'd probably just implement __get__ and __set__ rather than having read and write as well.

#

You probably want __len__ as well if you know the length

placid stirrup
#

What would you guys say is the go to device that has wifi built in? Is it that little m4?

slender iron
#

Ideally, it'd be a drop in replacement for nvm

#

@placid stirrup right now the airlift line

#

I'm actively working on ESP32-S2 which will be a good option soon.

placid stirrup
#

Awesome I’ll look into those

prime cove
#

@slender iron Thanks! Is it just a semantic thing then? I.e. I should change"read" to "_read" and remove it from the example?

placid stirrup
#

Mqtt is implemented in CircuitPython correct? I think I saw the library.

#

Are there any issues with it to be aware of?

slender iron
#

@prime cove ya, a style thing. Basically, having one way to do something means more consistency in the code that uses it. By mimicing an existing API, it's easy to swap your object in as well.

#

another python style thing is separating words in names with _ rather than caps

raven canopy
#

glad i didn't delete that folder yet... 😄

slender iron
#

@tulip sleet what was the 64 bit math thing that you fixed to save code size a while back?

raven canopy
#

oh. i remember exactly where to find that (since i caused one)

slender iron
#

thanks @raven canopy !

prime cove
#

@slender iron Made those changes, thanks for the help!

slender iron
#

np!

tulip sleet
#

similar issue

#

but a little trickier to fix

slender iron
#

thanks!

onyx hinge
#

Thank you Scott!

slender iron
#

Thank you!

#

looks like my busio change has some boards to fix still. will do that now

topaz quest
errant grail
#

@onyx hinge @ivory yew Holy cow! With ulab, I was able to reduce the automatic Eurorack cable discovery process latency from 15.8ms to unmeasurable (using time_monotonic())! Code is much simpler as well. Going to set this aside for a couple of hours and see if it's really true when I return. Thank you @onyx hinge for the incredibly helpful learning guide! UPDATE: after averaging 1000 iterations, it looks like the latency is 0.876ms, well under my 1.0ms target. Special thanks to @lapis hemlock, as well.

#
    poll_pin.value = False  # set polling voltage to 0v (high impedance)
    inputs = ulab.array(read_inputs())  # read inputs before testing
    poll_phase_one = ulab.array(inputs < 1000)  # create no-cable mask
    poll_pin.value = True  # set polling voltage to 5v
    poll_phase_two = ulab.array((read_inputs() * poll_phase_one) > 20000)  # mask with first test results then check for polling voltage change

    return poll_phase_two, inputs  # return with result mask and raw data
ivory yew
#

nice!

lone axle
manic glacierBOT
onyx hinge
#

@lapis hemlock ^^^ see what cgrover says above

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
solar whale
#

@onyx hinge some interesting developments to ponder over your morning coffee --First, sdcardio is working well on my feather_m4_express! I have been workin on the strange SDCard issue I found yesterday - no difference using sdcardio BUT I found that is is only an issue with the TFT featherwing -- It does not happen with an SDCard breakout board replacing the TFT. It is related to the specific HW config of the TFT featherwing. The plot thickens...

simple pulsar
#

@solar whale I have not used feather wing but have a TFT Gizmo on a CPB nowadays. That has some interesting characteristics for the screen being active. CircuitPython "remembers" the screen has been used and it stays active after that as a serial console. Is that the same on the TFT feather wing?

manic glacierBOT
solar whale
#

@simple pulsar yes. It behaves the same

manic glacierBOT
placid stirrup
#

Hey quick question, can I use an 8266EX to add wifi to a board?

#

Like to another board which doesn't have it

solar whale
#

@placid stirrup another option I have used is to put Micropython on the ESP8266 for WiFi access and pass data via UART from a CircuitPython board -- then have the ESP8266 handle the WiFi.

#

MicroPython supports Wifi on the ESP8266 and ESP32

placid stirrup
#

Hmm

#

Ok, sounds good. Maybe I'll just look at getting the airlift m4 and be done with it. I can implement my little project on the Argon now but I so want to use python to do this instead

manic glacierBOT
trim elm
#

hey @lone axle do you remember the settings you used to get the bitmaps to work with imageload? I'm thinking it could be worthwhile to add a few sentences in the README explaining what types of bitmaps do and don't work, and the ways to export those sorts of bitmaps in GIMP, photoshop if you have it, and using CLI tools.

lone axle
trim elm
#

Oh, great. I'll just put a link to that in the README

lone axle
#

@trim elm The one gotcha with the recent update to imageload is that BMP image files with negative heights are only supported on builds with longint enabled. Builds without longint can only render positive height BMPs.

trim elm
#

Ah

lone axle
#

I never knew negative height existed to be honest. If I understand correctly I think it's used to flip the contents before showing or something like that.

#

I'm not sure how to actually create a negative height BMP though. I just tested on the one supplied in the original PR that added it.

trim elm
#

Hmm... Yeah, that is interesting

#

I could definitely see that being useful

placid stirrup
#

I just remembered that I have a raspberry pi 2 sitting somewhere, hows circuitpython on one of those? I know it's kind of a different animal than what circuitpython is intended for

solar whale
manic glacierBOT
placid stirrup
#

Alright, I'll stop bugging you guys and read up on this. Thanks for all the help

solar whale
#

No worries -- Keep asking questions

#

@placid stirrup Using the CP libraries on your Raspberry Pi will work well. And you get to code in Python!

placid stirrup
#

Do the networking libraries work via blinka/raspbian? Gotta get that MQTT connection 🙂

solar whale
#

you use the standard RPi libraries for that -- use "blinka" to talk to the sensors.

#

or am I misunderstanding?

placid stirrup
#

Well what I'd like to accomplish is to have the MQTT client directly in the control code cause I want it to talk to the actual control program. It's all good I need to read up on this, maybe I'm thinking about it wrong. In something like the particle firmware you create everything is part of the control program, the control program calls the mqtt agent to publish/subscribe and as such push and pull data in and out of the program itself. I'm not familiar with how actually having a general purpose OS underneath complicates the matters

#

I'll poke around and see what the internet has to say

#

But ya, I want to do this all in python if I can

solar whale
#

Good luck and feel free to come back with more questions. There are many options!

placid stirrup
#

Thanks. If I figure it out and get it running I'll be back

onyx hinge
solar whale
#

where did you get them, My WROOMs and WROVERs from Digikey and Mouser were in antistatic foam.

placid stirrup
#

What boards are those?

solar whale
#

ep32s2 saola development kits

placid stirrup
#

I see built in wifi 🙂

solar whale
#

yes and native USB (ESP32 does not have that) but no BLE

#

There is support in CircuitPython for the ESP32S2, not the ESP32 -- it is still a "work in progress" WiFi is not supported, yet....

ionic elk
#

can we just skip to the end where we get a chip with wifi, bluetooth, HS USB, 500MHz and costs under a dollar plz

topaz quest
#

and enough GPIOs to not need an MCP230xx 😛

ionic elk
#

and a free pony

#

comeon guys how hard can it be

simple pulsar
#

@ionic elk Powered by a built-in perpetual motion machine?

ionic elk
#

powered by tiny squirrels on treadmills

#

powered by the power of friendship

placid stirrup
#

Couldn't resist, bought the M4 with wifi

#

can't wait till it turns up

solar whale
#

Enjoy!

onyx hinge
#

@solar whale the saolas were from mouser

lapis hemlock
#

@onyx hinge @ivory yew Holy cow! With ulab, I was able to reduce the automatic Eurorack cable discovery process latency from 15.8ms to unmeasurable (using time_monotonic())!
@errant grail, @onyx hinge Great, but how does it work? The cable discovery process, that is. The question is not entirely academic: if I knew what is going on, we could, perhaps, shave off a couple of microseconds here and there.

errant grail
#

@lapis hemlock @onyx hinge @ivory yew t’s a two-phase process that can detect a connected plug regardless of its signal condition. It uses a TS-with-switch jack and a single digital output polling pin.

#

The test first sets the polling voltage to high impedance. If nothing is connected, it’ll measure zero volts. If it sees any other voltage than zero, it knows a cable is connected.

#

However, a connected cable may have zero volts on it, so a second test is needed. The polling voltage is raised to 5v (almost any voltage above the noise threshold would work). If the measured voltage jumps from 0v (in the first test) to 5v, then we know for certain that no cable is connected. If it stayed at zero volts, the logic concludes that a cable is plugged into the jack.

#

I suspect that the actual polling pulse is very short, probably 100us or so. Going to scope it today.

#

Getting the detection latency of the code to 1ms or less means that it should work okay with CV signals < 1kHz. Need to confirm that assumption.

lapis hemlock
#

@errant grail But where do you need to crunch numbers? Do you filter (convolve) your analogue signals to beat the noise?

errant grail
#

@lapis hemlock Nothing that sophisticated. I needed fast array processing to create masks for each test phase followed by a logical comparison of the test phase results.

lapis hemlock
#

Oh, I see. Neat.

#

In any case, I am glad that ulab helped you out with this.

errant grail
#
def poll_inputs():  # determine if cable is attached to jack
    poll_pin.value = False  # set polling voltage to 0v (high impedance)
    inputs = ulab.array(read_inputs())  # read input array before testing
    poll_phase_one = ulab.array(inputs < 1000)  # create no-cable mask
    poll_pin.value = True  # set polling voltage to 5v
    # mask with first test results then check for poll voltage change
    poll_phase_two = ulab.array((read_inputs() * poll_phase_one) > 20000)  

    return poll_phase_two, inputs  # return with result mask and raw data```
#

I tried setting dtype to uint16 for the values, but the floating default turned out to be the fastest.

lapis hemlock
#

With a bit of work, we could make this run faster. The problem is this poll_phase_one = ulab.array(inputs < 1000). inputs < 1000 returns a list of Trues/Falses, and then converts it to an array. That is a bit expensive. An update is in the works, where I treat Boolean arrays properly. I won't commit to a deadline, but it shouldn't be long before I can release that.

#

Another thought: we might want to implement any, and all for arrays. That would allow masking, instead of having to evaluate (read_inputs() * poll_phase_one) > 20000.

errant grail
#

Yeah, boolean would be nice, but I'm pretty darn happy as-is!

lapis hemlock
#

I think I meant where, or something similar.

#

Yeah, boolean would be nice, but I'm pretty darn happy as-is!
@errant grail A couple of weeks ago, the moderator bot deleted one of my comments with d.a.r.n. Odd.

errant grail
#

I haven't done much more with ulab than scratch the surface, but I can see some great possibilties for it.

lapis hemlock
#

It is always a bit fulfilling to see what people do with your code. I definitely haven't thought of such an application.

errant grail
#

Interesting. Didn't realize the bot wouldn't like it.

slender iron
#

I can help understand what the bot is doing if it ever moderates you when it shouldn't

errant grail
#

@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.

lapis hemlock
#

I can help understand what the bot is doing if it ever moderates you when it shouldn't
@slender iron I wasn't offended by the bot's pulling my comment. I understand that it is a bit borderline, when you do something similar to knitting🙃

#

Probably depends on the location, too.

slender iron
#

🙂

#

the word filter is pretty dumb so don't give it too much credit

errant grail
#

@slender iron Can't be too smart since it didn't pick up on you calling it dumb. 😉

slender iron
#

exactly 😉