#circuitpython-dev

1 messages Β· Page 392 of 1

mental nexus
#

Hi everyone! Text only for me today.

onyx hinge
#

hi @mental nexus nice to see you're able to join us even if it's in text-only form

lone axle
slender iron
#

me πŸ™‚

lone axle
onyx hinge
#

We've merged 91% of all our closed pull requests, which I think is also a REALLY good average compared to github projects at large.

lone axle
idle owl
#

The Hacktoberfest labeling did not work properly. Search for Good First Issue.

onyx hinge
#

Because of the 8 days between meetings, the list of contributors may have been incomplete (it covers 7 days). Yesterday's report recognized: ajs256, EmergReanimator, and fgervais in addition to the ones in the report that Dan was reading.

lone axle
#

Great looking GUI @errant grail

onyx hinge
#

Windows 8.1 Mainstream support ended on January 9, 2018. Extended support until January 10, 2023

thorny jay
#

Here I am receiving Frankfurt signal. I am in distance from French equivalent but it is less documented. Might be in reach for the UK signal too... but not my time zone. πŸ™‚ @onyx hinge

onyx hinge
#

TDF would need a different receiver, I think

gilded cradle
#

Thansk

mental nexus
#

Thanks all!

lone axle
#

Thanks Dan!πŸŽ‰

blissful pollen
#

Thanks Dan and all. Trying to listen from the new office I’m in with almost no signal

thorny jay
#

That was great, and I love your voice too!

#

I made a CLUE timecode something that HID type the timecode.

#

Not sure it was really a succesfull gadget, but it exist.

onyx hinge
#

Interesting things, the TDF signal has two bits to signal whether today/tomorrow are public holidays. WWVB doesn't transmit that information.

thorny jay
onyx hinge
#

it was kattni

thorny jay
# thorny jay It's a rabit hole! I have learned a lot.

I recommend this video: https://www.youtube.com/watch?v=6SHGAEhnsYk about time... this is how it started for me.

A remotely controlled, precise analog wall clock like that one from IKEA is a cool thing. Today we will build our own remote control for such analog and digital clocks. All we need is a Raspberry Pi and a few electronic components. And we will learn something about resonance frequencies, capacitors, and ferrite antennas. Let’s hack!
I am a proud...

β–Ά Play video
onyx hinge
#

I didn't really have a way to say it, I started with your document

#

I'm apparently up to 15 items "in progress" for hacktoberfest, my t-shirt is assured πŸ™‚

idle owl
#

Seriously, nicely done.

onyx hinge
#

it's what happens when I shirk my reviewing duties

lone axle
#

I've got the audio / discord screen recording configuration worked out successfully for recording a backup of the meeting this week. I will try to record a backup every week that I am present.

manic glacierBOT
tulip sleet
#

@slender iron My recording is only me 😦 which is frustrating because I have a bunch of test recordings that worked fine. Some setting change happened. If you want to pass me your recording I will upload it and do the commenting, etc. I'm glad we had a backup, and I'll test it again next time.

slender iron
#

@lone axle did you record today?

#

my recording has discord not in streamer mode at the start

tulip sleet
#

My video is fine, I could substitute your audio track

slender iron
#

I don't think it actually matters since this is a public server

#

what's the best way to share a 1.1GB file?

#

or I can just upload it

lone axle
errant grail
# lone axle Great looking GUI <@!339922377746022402>

Thanks. There could be some viable display widgets in there. Was also experimenting with β€œnormalized” cartesian and polar coordinates to try to achieve some independence from display pixel limitations β€” to support porting to various boards with integral displays.

tulip sleet
#

@slender iron you could drop it in the adafruit google drive and share it; or @lone axle something similar -- thanks!

slender iron
#

k, putting mine on google drive

idle owl
#

@tidal kiln I have a question about the ATtiny8x7 breakout. If you're around. You may or may not know.

tidal kiln
#

sure

tulip sleet
lone axle
slender iron
#

mine is a second or two early too

lone axle
#

I noticed the top bar when it was discussed just before we began. I put it in but didn't know the best way to add purple background to it. I figured that out afterward though so future backup recordings will have the purple background and match visually the ones uploaded to youtube.

tulip sleet
#

that's mine, so good resolution, but much smaller. I don't think it's 900MB of missing audio

#

that is from VLC media info

slender iron
jaunty juniper
#

just noticed that semver thinks 7.0.0-155-gf6681ef93 < 7.0.0-alpha.1, that makes the code that checks the mpy version in circup get it wrong on latest/local builds. We can simply change the cutoff in circup to 7.0.0-0 for example (who would fiddle with 7 pre alpha 1 ?) or ignore it until 7.0.1 which will also solve the issue for subsequent builds

idle owl
#

@jaunty juniper How badly does getting it wrong break things? Aren't the mpys all the same for 7x builds?

#

If it'll be fixed later on its own, might as well wait if it's not terrible. But if it's really breaking things, probably worth the temp fix.

jaunty juniper
#

wait, I might be getting that wrong, let me check what version I'm using

#

among venvs and pyenvs

idle owl
#

venvs and pyenvs, oh my!

#

(Wizard of Oz reference.)

tulip sleet
#

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

idle owl
#

Cheers @tulip sleet!

tulip sleet
#

this document is terrific! sorry for the misattribution

idle owl
idle owl
jaunty juniper
#

ah, ok yes the exact issue is with circup update complaining that the files have the wrong MPY format, but then installing the same (correct) version, so it's not a real issue ultimately

idle owl
#

Or maybe not? I'm not looking right at it, you are.

jaunty juniper
#

it just gives you a bunch of:

WARNING: 'adafruit_hid': mpy format doesn't match the device's Circuitpython version. Updating is required.
Do you want to update? [y/N]:

yes or no, it will still work

idle owl
#

Hmm.

#

What do you think? We don't want it to end up a bad experience for folks...

#

I guess if it works after yes, it's probably fine.

#

We could wait until someone else complains πŸ˜„

onyx hinge
#
jepler@bert:~/src/zircup$ python3 -mcircup.__init__ update
Found device at /media/jepler/CIRCUITPY, running CircuitPython 7.0.0.
Found 1 module[s] needing update.
Please indicate which modules you wish to update:

'adafruit_progressbar' is a Major Version update and may contain breaking changes. Do you want to update? [y/N]: y
Updated adafruit_progressbar
jepler@bert:~/src/zircup$ python3 -mcircup.__init__ update
Found device at /media/jepler/CIRCUITPY, running CircuitPython 7.0.0.
Found 1 module[s] needing update.
Please indicate which modules you wish to update:

'adafruit_progressbar' is a Major Version update and may contain breaking changes. Do you want to update? [y/N]: y
Updated adafruit_progressbar
``` speaking of weird stuff with circup, it doesn't seem to upgrade adafruit_progressbar no matter how many times I say "yes"
#
Device version: None, Bundle version: None
Updated adafruit_progressbar
``` that's odd
jaunty juniper
#

it always assume it's a new version when the library doesn't have a version number

#

circup freeze will tell you the versions if finds

adafruit_hid==5.1.1
adafruit_progressbar==None
onyx hinge
jaunty juniper
#

oh yeah

#

__version__ and __repo__

onyx hinge
heavy tendon
#

I'm trying to build CircuitPython for a custom STM32H742VIT6 based board by using the openmv_h7 board files as a reference. That board is based on the STM32H743 which simply has more features than the STM32H742. I copied/renamed the directory to my board name, and changed the pins.c file to match my pinout. I didn't change the processor name anywhere (might be a mistake), and I left the HSE value the same as I also use as 12MHz clock. It builds just fine, but after I program the chip it doesn't do anything. I have no issues compiling/deploying CircuitPyton for custom STM32F405, but this is my first time with an H7 device. Anyone have any suggestions on things I should try?

manic glacierBOT
slender iron
#

@heavy tendon it's usually best to use a debugger to see how far the code is getting

#

when a new chip isn't working

manic glacierBOT
#

CircuitPython version

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

Code/REPL

# boot.py

import time
import usb_hid

print("booting...")

def find_device(devices, *, usage_page, usage):
    """Search through the provided list of devices to find the one with the matching usage_page and
    usage."""
    if hasattr(devices, "send_report"):
        devices = [devices]
    for device in devices:
        if (
           ...
manic glacierBOT
#

Here is a post that I found some times ago:
https://developer.apple.com/forums/thread/652700
This is also about absolute mouse positioning.
I also fiddled around with the HID descriptor but in my case the mouse movement under IOS always was relative regardless if I used relative or absolute in the descriptor.
But I will try again with the descriptor from bitboy85 mentioned above.
I will let report back.

manic glacierBOT
#

How difficult is it to create a branch of CircuitPython with the HID device at position 0?

I'm currently writing a documentation for my upcoming DIY keyboard. The firmware is based on CircuitPython and is much easier to use than others like QMK. Not being able to emulate a boot keyboard is of course a big show stopper. For example: under macOS you can not login without a boot keyboard if your hard disk is encrypted and most users encrypt their HD.

See ![Kaenner-Keyboard](http://Kaenn...

manic glacierBOT
manic glacierBOT
#

I can make HID always be interface #0 just by reordering some code. But it will cause problems on Windows 7 and 8.1, which expect CDC to be at interface #0.

I have a branch where I did this work. I can give you a test UF2. Tell me the board you need a build for. If you are used to building CircuitPython yourself, the branch is https://github.com/dhalbert/circuitpython/tree/hid-boot-protocol .

Then you'll try this: in boot.py, turn off all other USB devices except HID. So something lik...

manic glacierBOT
#

Thank you very much. I have never built CircuitPython myself. Therefore I would like to ask if you could build me a version for the Raspberry Pico?

With boot mode I simply mean: Boot the mac and try to login. A CircuitPython keyboard does not work at this point. It event does no work if the mac is in sleep mode and you try to wake it up with a CircuitPython keyboard. If you press a key in sleep mode, then the Mac does not wake up. But worse, the keyboard does not work after waking up. You ...

manic glacierBOT
#

CircuitPython version

7.0.0 on Pi Pico with ESP32, connected as in http://helloraspberrypi.blogspot.com/2021/05/raspberry-pi-picocircuitpython_16.html

Code/REPL

As in http://helloraspberrypi.blogspot.com/2021/05/raspberry-pi-picocircuitpython_16.html

Behavior

Same error as in https://github.com/adafruit/nina-fw/issues/26 , despite newest nina-fw (1.7.4). After switching to CP 6.3.0 everything works as expected.

Description

No response

##...

manic glacierBOT
manic glacierBOT
heavy tendon
# slender iron <@!707036631219306568> it's usually best to use a debugger to see how far the co...

Just for clarification the chip is working fine, and it programs just fine (using the DFU Bootloader). The Circuit Python build isn't working so either I missed something in modifying the board files for it or what I'm basing it on isn't working. My next step is to test out the OpenMV_H7 board to verify that works as I based the board files from that. If that works okay I'll pull out the debugger to see where the code is stopping on my board.

idle owl
#

@tidal kiln I can't figure out how you highlighted multiple lines on GitHub to provide a permalink that highlights multiple lines. Did you edit the URL? Or is there some click and drag magic I'm missing.

tidal kiln
#

in general, same as single line, the ... next to hightlight

idle owl
#

Right but... I can't get it to recognise more than one line.

tidal kiln
#

<SHIFT>-click to multi select

idle owl
#

Oi.

#

Hah.

#

Ok thank you πŸ˜„

tidal kiln
#

once you've got more than one line highlighted

#

then same, url via ...

idle owl
#

Ohhhhh ok .

#

I got it finally.

#

Thanks!

tidal kiln
#

np

manic glacierBOT
#

I've started on this. Difficulties so far include:

  • [ ] f-string implementation is not quite compatible. In particular, f"" f"" concatenation is not supported. I think we should accept this minor regression
  • [ ] we should consider whether to revert our make_new slot prototype to match upstream

In my WIP branch, make VARIANT=coverage test_full now passes, but all the ports are broken.

#

I did a bisect on this, and it turns out to be

  • #5100

When PDMIn.record() happens, it now loops forever inside common_hal_audiobusio_pdmin_record_to_buffer().

@tannewt @DavePutz
common_hal_audiobusio_pdmin_record_to_buffer() uses the event system for handling incoming I2S data. I do not know yet why #5100 broke this, but one or the other is making some assumption about the event system setup that is not shared by the other. If you have an idea, I'd be very interested.

manic glacierBOT
manic glacierBOT
#

Upstream uses a make_new signature of

typedef mp_obj_t (*mp_make_new_fun_t)(const mp_obj_type_t *type, size_t n_args,
    size_t n_kw, const mp_obj_t *args);

while we have

typedef mp_obj_t (*mp_make_new_fun_t)(const mp_obj_type_t *type, size_t n_args,
    const mp_obj_t *args, mp_map_t *kw_args);

I've completed the transition for one board (CircuitPlayground Express) and found the sum of the size of all the make_new functions in that build. Before, they summed...

slender iron
#

@crude blaze fyi I'm working more on cp rpi. so check with me before you do

manic glacierBOT
#

I am on the track of something. Commenting out the !event_interrupt_active(event_channel) check loop below prevents the infinite loop. That test is probably being misled by the new use of the event system.

        // Wait for the next buffer to fill
        //uint32_t wait_counts = 0;
        #ifdef SAMD21
          #define MAX_WAIT_COUNTS 1000
        #endif
        #ifdef SAM_D5X_E5X
          #define MAX_WAIT_COUNTS 6000
        #endif
        // If wait_counts exceeds th...
spiral elk
#

I would kind of like to revisit the decision not to make a board.I2C singleton for the Lolin S2 Mini. While the board does not explicitly show an i2c pair of pins explicitly on the silkscreen, it is designed to interoperate with the existing ecosystem of boards for the D1 Mini, for which there IS a standard for i2C on the pinheader (SCL D1 aka GPIO35 and SDA D2 aka GPIO33)

manic glacierBOT
manic glacierBOT
#

I tested some "Digitizer"-usage absolute positioning HID devices a long time ago, considering whether to include them in the standard devices we provided. I could not find a descriptor that would work on all three major operating systems, so I omitted it. At that time I did include a gamepad, but even it did not work on all three. That's why I dropped it when I added custom HID device capability.

onyx hinge
#

but perhaps you tried it

manic glacierBOT
#

@tannewt there's a nice size savings to reverting to upstream's make_new signature ^^^ so I think we should follow them.

Can you give me an idea what to test for subclassing native types? #1472 is about displayio.Shape. I did test that class NeoPixel(adafruit_pixelbuf.PixelBuf) still works, which I think fits the bill. The brightness= and other kwargs are successfully handled when constructing the native object.

manic glacierBOT
#

I've got this same issue, here's a simple example:

import alarm
import board
import time

from neopixel import NeoPixel

pixels = NeoPixel(board.NEOPIXEL, 4)

if alarm.wake_alarm is None:
    pixels.fill((255, 0, 0))
else:
    pixels.fill((0, 255, 0))

time.sleep(1)

pins = (board.BUTTON_A, board.BUTTON_D)
button_alarms = [alarm.pin.PinAlarm(pin=pin, value=False, pull=True) for pin in pins]

alarm.exit_and_deep_sleep_until_alarms(*button_alarms)
tulip sleet
#

@slender iron if you have time for a video discussion I am trying to fix the PDMIn bug and noticing hundreds of thousands of calls to the evsys handler in a very short time. Very confusing

slender iron
#

@tulip sleet I have a meeting in 10 but can chat after

tulip sleet
#

sure; i am still making some progress.

#

tnx!

slender iron
#

πŸ‘

gloomy shuttle
#

@tidal kiln thanks for your testing and review on those PRs! Sorry for that erroneous PR. I thought I missed a step on that first PR and didn't look at it carefully.

tidal kiln
#

no worries. many moving parts. it can be confusing.

#

@idle owl hey, do you know state of CP lib for VL53L1X? (PID 3967)

idle owl
tidal kiln
#

yah, it's the newerish one.

#

hmmm...not sure. mayb. product page says nothing w.r.t. CP.

idle owl
#

I thought it replaced it? The PID is low for a new product.

#

I didn't realise it was different.

#

I was told to order one or two, so I'm assuming its guide is coming up. I'd obviously know at that point.

tidal kiln
#

ok. maybe it's in work. also easy enough to check using 0x lib real quick...

idle owl
#

True

tidal kiln
#

doing that now...

idle owl
#

Great

tidal kiln
#
Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit QT Py M0 with samd21e18
>>> import board
>>> import adafruit_vl53l0x
>>> vl = adafruit_vl53l0x.VL53L0X(board.I2C())
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_vl53l0x.py", line 153, in __init__
RuntimeError: Failed to find expected ID register values. Check wiring!
>>> 

no free donuts here 😦

slender iron
#

@tulip sleet I'm free now

tulip sleet
#

ok, I'm in better shape, but still a couple q's

idle owl
#

So it'll need to be updated or a new lib.

#

@tidal kiln Do you have an APDS9960 handy? Can you check something if you do?

manic glacierBOT
idle owl
#

If they're right, then the guide is wrong. Not sure how it ever worked that way. There's a screenshot in the guide of it working.

tidal kiln
#

@idle owl will take a look. handy enough if need to test.

idle owl
#

Thanks. If it is wrong, can you get a screenshot of it done right and, if you don't want to update the guide, give it to me and I'll do it?

tidal kiln
idle owl
#

Hah nice

tidal kiln
#

just so old it goes back to when we weren't using @property as regularly

idle owl
#

Ah fair enough. So what makes more sense. Make it work like it used to or update the guide?

tidal kiln
#

no need to test, just remove () and change verbiage to me property-esque

#

yah. just simple guide update.

idle owl
#

Ok right on.

#

Screenshot needed though.

#

Or edit screenshot in the guide I guess.

tidal kiln
#

or cheat. one sec....

idle owl
#

I'll reply to the post.

tidal kiln
idle owl
#

Nice

tidal kiln
#

might match existing a little better?

idle owl
#

I figured you'd clip out the () in the current screenshot, heh

#

but yeah close enough

manic glacierBOT
manic glacierBOT
#

In that actions,

Run dorny/paths-filter@v2
Fetching list of changed files for PR#5465 from Github API
  Invoking listFiles(pull_number: 5465, page: 1, per_page: 100)
  Received 1 items
  [modified] ports/raspberrypi/boards/melopero_shake_rp2040/pins.c
  Invoking listFiles(pull_number: 5465, page: 2, per_page: 100)
  Received 0 items
  All changed files has been fetched from GitHub API
Detected 1 changed files
Results:
Filter changed = true
  Matching files:
  ports/raspberr...
manic glacierBOT
crude blaze
idle owl
#

Halp, pls.

#

How do I take this code and make it fade the LED down as well as up (which is what it does right now. Fades up, then turns off, fades up again.)py while True: pwm.duty_cycle = (pwm.duty_cycle + 256) % 65536 time.sleep(0.01)

#

I tried to do it the other day and went in circles, so I'm not even going to try today without some assistance.

#

The standard PWM fade up and down code doesn't work the same. Tried to adapt that too. Failed.

tidal kiln
#

you'll probably want a second loop

crimson ferry
#

or a trig function πŸ˜‰

tidal kiln
#

neat. yah. could do that.

#

@idle owl where's the "standard" code?

manic glacierBOT
#

Closes: #5463

Minor incompatibility: String concatenation of f-strings is no longer permitted. It did not work properly before (or it had important caveats), but CP didn't detect the problem.

Needs a change in ulab

Testing performed so far:

  • built & tested firmware on CPX
  • built firmware for feather nrf52840 sense & adafruit feather rp2040

I'll fix up other ports & boards after CI. I know I missed some "make_new" cha...

idle owl
#

Uses a for loop.

#

Which I think might work

#

but I can't figure out the second half of the loop.

tidal kiln
#

that should work. looks like basically a saw tooth.

idle owl
#

I can try it again. But I kind of like the simplicity of the current example.

tidal kiln
#

error? or just nothing happened?

idle owl
#

Nothing happened, or wait, maybe it flickered weirdly?

#

Not sure I remember now.

#

Flickering I think.

#

Or wait....

#

Ok when it "worked" it flickered, when it didn't work, it gave an OverflowError

jaunty juniper
#

I like to use a "step" variable and change its sign when the max or 0 is reached

idle owl
#

that's right.

#

Coming back to me now.

tidal kiln
#

that's a good idea too, flip step

idle owl
#

I am unsure how to implement any of the suggestions so far, heh

jaunty juniper
#

or a for loop on (list(range(0,max,step)) + list(range(max,0,-step)))

#

but that's a little weird looking

idle owl
#

I'd like to avoid weird looking πŸ˜„

#

I have to be able to kind of explain it.

tidal kiln
#
STEP = 100
DELAY = 0.01
while True:
    for dc in range(0, 65535, STEP):
        led.duty_cycle = dc
        time.sleep(DELAY)
    for dc in range(65534, 0, -STEP):
        led.duty_cycle = dc
        time.sleep(DELAY)
idle owl
#

Hm ok, let me try that.

#

Fades up, then stays on.

tidal kiln
#
STEP = 100
DELAY = 0.01
while True:
    print("fade up")
    for dc in range(0, 65535, STEP):
        led.duty_cycle = dc
        time.sleep(DELAY)
    print("fade down")
    for dc in range(65534, 0, -STEP):
        led.duty_cycle = dc
        time.sleep(DELAY)
#

get expected prints at least?

idle owl
#

Now it's working

#

Works without the prints too

#

Who knows.

#

Works now.

tidal kiln
#

show()

idle owl
#

llol. Apparently.

#

OK, so it goes through the range at step increments up, and then does the same but down?

tidal kiln
#

yep

#

that's a non-fancy simple approach

idle owl
#

That's good for me

tidal kiln
#

could probably make the whole thing a single list comp if you wanted

idle owl
#

Blergh.

#

Yeah, but harder to understand I think.

jaunty juniper
#

can we join 2 iterators without unrolling them ?

stuck elbow
#

itertools.chain?

#

you can also make your own:

def chain(first, second):
   for item in first:
       yield item
   for item in second:
       yield item
idle owl
#

Thanks for the help all!

stuck elbow
#

hmm can you use yield from there?

jaunty juniper
#

ah that works, it's an iterator, but multiple for in a comprehension is not the most comprehensible

iter = (item for a_range in (range(500000), range(800000)) for item in a_range)
for i in iter:
  ...
stuck elbow
#
def chain(first, second):
    yield from first
    yield from second
jaunty juniper
#

yep, that works in CP

#

I didn't know that syntax πŸ’‘

stuck elbow
#
def chain(*args):
   for item in args:
      yield from item
#

here is one for chaining any number of them

#

yeah, yield from is one of those things they added in python 3, which as we all know is no longer real python ;-)

idle owl
#

@tidal kiln Mind looking at my wiring diagram? It's super simple but I'd appreciate a second opinion on it.

#

Now I have to wait N minutes for my screenshot to show up. Thanks, laptop. Sigh.

#

There it is.

crimson ferry
#

well this didn't turn out as minimal or intuitive as I thought, but it's a pretty sinusoidal pulsing ;-)```STEP = math.pi / 100
DELAY = 0.01
led = pwmio.PWMOut(board.LED, frequency=5000, duty_cycle=0)
dc = 0
while True:
led.duty_cycle = int(65535 * (1 + math.sin(dc)) / 2)
dc = (dc + STEP) % (2 * math.pi)
time.sleep(DELAY)

tidal kiln
#

@idle owl sure. you uploading here? or in a guide?

idle owl
#

Oh here. I was waiting to hear back from you @tidal kiln

#

Is that easy to follow or should I use a jumper wire to the resistor?

#

I mean, that's literally how I wired it up on my board

#

But I don't want to make support issues

tidal kiln
#

i think ok

#

as is

idle owl
#

Ok thanks

#

@tidal kiln What range of resistor is good for LEDs? I used 220Ξ© but we usually recommend what, 220-1k or something?

#

I know I wrote that into a guide somewhere, but finding it will take ages I think.

tidal kiln
#

i'd just call out 1k or something

idle owl
#

Oh ok

idle wharf
idle owl
#

Should I update the diagram then?

tidal kiln
#

LEDs come on fine with small amount of current

idle owl
tidal kiln
#

no need to try and figure out r value for max

idle owl
#

Ok, I'll change the diagram and text to go with it.

idle wharf
#

That made me seriously bust out thank you for that

tidal kiln
#

pretty sure i've used 10k even and was good enough to see

idle owl
tidal kiln
#

you'd also need to consider max current source for the given chip - like what the attiny817 can put out on pin 12

#

LEDs typ max is like 20mA

#

which can be more than some MCUs can source

idle owl
#

Right, my housemate started in on all of that when giving me a resistor to begin with

#

Then I Said "just give me 220"

tidal kiln
#

another reason to just crank up the value

idle owl
#

He was going to math it based on the type/size/color of LED, and the ATtiny output, etc....

#

Fair enough

#

Everything is updated.

tidal kiln
#

if people really want to make brighter, can link to guide

#

there's an adafruit one also

idle owl
#

Nah, this isn't about the LED really.

#

It's about seesaw PWM.

#

So...

#

not super concerned.

#

But when I show 220, I always say "you can use up to foo Ξ© resistor"

#

Because maybe I was told to ages ago? Or I made that up in my head and have been doing it for no reason.

idle owl
#

@tidal kiln Sorry to keep bugging you, but can we talk EEPROM?

slender iron
#

@gilded cradle do you have updates to code.cp.org pending? I think I'll wait to test until it's updated

tidal kiln
#

@idle owl sure

idle owl
#

So apparently the ATtiny has actual EEPROM. But the SAMD09 gets emulated EEPROM through the seesaw firmware. Is the idea here that the seesaw firmware gives you access to the ATtiny EEPROM space?

tidal kiln
#

that'd be my guess

idle owl
#

(To be clear, I have no idea what EEPROM even is, but I'm going based on comments in the example.)

tidal kiln
#

it's non-volatile memory

idle owl
#

Does that mean it persists?

tidal kiln
#

yep. with power cycle.

idle owl
#

Ok

tidal kiln
#

it's general purpose

#

can just write/read stuff

#

it there again after reset and power cycles

idle owl
#

Ok, and apparently on the ATtiny, full erase as well, but not the SAMD09.

#

?

#

Which I pinged Limor about because she had me mirror that in and it's not really relevant to ATtiny.

#

Not entirely anyway.

tidal kiln
#

let me look at the attiny firmware. curious what it acutally does.

idle owl
#

Ok thanks

tidal kiln
#

so, uses real EEPROM

idle owl
#

That's what the example implied

#

in the comments

tidal kiln
#

yah, so the SAMD09 verbiage doesn't apply

idle owl
#

Right, exactly.

tidal kiln
#
Performing a chip erase will erase all data stored in the emulated EEPROM.
idle owl
#

So is it fair to say "The seesaw firmware that ships with the ATtiny817 breakout provides access to the 128 byte EEPROM. This example reads from and writes to the EEPROM."

#

?

tidal kiln
#

this comment is just because, for the SAMD, it's emulated in FLASH

tidal kiln
#

^^ that looks OK

idle owl
#

Ok great, thanks. Now I need to do a quick explainer on the code.

#

Seems like the prints kind of give away what it's doing

tidal kiln
#

the firmware may limit access to 64 bytes though?

idle owl
#

so I don't need to understand it.

#

Hmm.......

idle owl
#

Good question.

#

oh

#

ok

tidal kiln
#

so the register values would be different also

idle owl
#

Right....

gilded cradle
#

@slender iron yeah. I'm still working on some more file operation stuff. I'll submit a PR after that and will focus on the device compatibility stuff after.

idle owl
#

so that entire EEPROM page is kinda not right for it.

tidal kiln
#

the word "EEPROM" is correct

#

πŸ™‚

idle owl
#

lol. Fair enough.

tidal kiln
#

and the base address is prolly same 0x0D

idle owl
#

But the I2C address change byte would be different.

idle owl
#

Ah yeah

tidal kiln
#

yes, the other address would change

idle owl
#

Code says # THE LAST BYTE IS USED FOR I2C ADDRESS CHANGE!

#

So... different for each.

tidal kiln
#

0x00 to whatever size of actual EEPROM for general purpose access

idle owl
#

Oh..... wait it's not a special addr based on... the size of the EEPROM

#

oh

#

ok

#

That doesn't entirely make sense to me.

#

ohhhhhh

#

Nevermind, I just parsed what you said.

idle owl
tidal kiln
#

yah

idle owl
#

That comment in the code is confusing then.

#

Also the EEPROM page says ```
0x3F

I2C Address

8 bits

Read/Write```

#

So... I'm back to confused

tidal kiln
#

0x3F == 63, so the last byte of the 64, of the emulated SAMD EEPROM

idle owl
#

Ok, so the comment is accurate.

#

So what does that make it for 128 bytes?

tidal kiln
idle owl
#

Ok

tidal kiln
#

earlier in same code:
#define EEPROM_I2C_ADDR (EEPROM.length()-1)

idle owl
#

Ahhh

tidal kiln
#

still not sure about the setting (writing) part though. i could be confused, so still looking...

idle owl
#

Maybe you can't set the I2C address? It's stored there only?

#

No, comment says "change"

#

so presumably you could increment it or something

idle owl
#

That does not bode well for me understanding it.

tidal kiln
#

not sure why it can't just be generic writing to whatever address

#

and the docs just cover the fact that the last entry has special meaning

idle owl
#

Hmm.

tidal kiln
#

i'm probably missing something though

#

can ask over in other chat when you get a response

idle owl
#

I'm not fully sure what to even ask. πŸ˜„

#

Also, will likely not be around when I hear back. It's already 6pm here. Limor often replies at $TIME of the day.

tidal kiln
#

it's the i2c address part that's confusing

idle owl
#

I'll try to ask about it tomorrow then.

tidal kiln
#

yah

idle owl
#

made a note to do so.

#

@tidal kiln This EEPROM example doesn't run anyway.

#

This is for tomorrow for sure. Heh.

#

Thanks for all your help with this board. I seriously wouldn't have managed to get this far without your assistance.

idle owl
#

Yes

#

I tweaked a couple of cosmetic things with it, but nothing crucial.

#

So I don't think I made it fail

#

It's failing on the write line.

tidal kiln
#
Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit QT Py M0 with samd21e18
>>> import board
>>> from adafruit_seesaw import seesaw
>>> ss = seesaw.Seesaw(board.I2C())
>>> ss.eeprom_read8(0)
255
>>> ss.eeprom_write8(0, 42)
>>> ss.eeprom_read8(0)
42
>>> 
idle owl
#

Ugh.

#

Um...

#

Going to reload the library.

tidal kiln
#
>>> val = ss.eeprom_read8(0)
>>> ss.eeprom_write8(0, val + 1)
>>> ss.eeprom_read8(0)
43
>>> 
idle owl
#

Same issue.

#

Was wondering if I had an older version of it somehow, which I knew I didn't, but was worth a try I guess.

#

@tidal kiln Are you around tomorrow?

tidal kiln
#
>>> import seesaw_eeprom_test
Read 0xff from EEPROM address 0x02
Incremening value
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "seesaw_eeprom_test.py", line 22, in <module>
  File "adafruit_seesaw/seesaw.py", line 437, in eeprom_write8
OverflowError: value must fit in 1 byte(s)
>>> 
idle owl
#

That!

tidal kiln
#

it's because it was 0xFF to start

idle owl
#

Oh hmm.

tidal kiln
#

+1ing that made it not fit

idle owl
#

So update it to -1 ?

#

For the purpose of the example?

#

Or... is it an underlying issue?

tidal kiln
#

write a 0 there real quick from repl

#

and then run example again

idle owl
#

Right, but that won't help folks who are running the example themselves, will it?

tidal kiln
#

correct. they'd hit same issue.

idle owl
#

I don't have another one of these boards to run "fresh" if I write it manually.

#

Ok, then something has to change.

#

The example, or something...

tidal kiln
#

the simulated in SAMD is probably int'd to all 0s

idle owl
#

Ahhhh

#

Which means -1 would fail on SAMD?

tidal kiln
#

yes. probably.

#

i'd update the example

idle owl
#

I'll add a variable at the beginning, that you set to +1 or -1 depending on board.

#

And increment by the variable

#

There are other examples with things that don't work by default on SAMD

#

pin assignments there, but still

tidal kiln
#

or just some absolute value

idle owl
#

I don't follow

#

Oh like abs?

tidal kiln
#

instead of incrementing what was read

#

just write something and then read it back

#

or do the increment thing, but add some logic to check bounds

idle owl
#

So write first, read, increment, read?

tidal kiln
#
print("Incremening value")
ss.eeprom_write8(0x02, min(0xFF, val + 1))
idle owl
#

That results in the same value.

#
code.py output:
Read 0xff from EEPROM address 0x02
Incrementing value
Second read 0xff from EEPROM address 0x02
#

Code runs though.

tidal kiln
#

yah. expected. but confusing.

idle owl
#

Right.

tidal kiln
#
MY_VALUE = 42
#
# blah blah blah
#
print("Writing value")
ss.eeprom_write8(0x02, MY_VALUE)

val = ss.eeprom_read8(0x02)
print("Read 0x%02x from EEPROM address 0x02" % val)
idle owl
#

Ah ok

tidal kiln
#

the incrementing is cute, but not sure it's really necessary for the example

idle owl
#

Fair enough.

#

That works better.

#

Thanks!

tidal kiln
#

imho

#

ymmv

idle owl
#

I'll try it tomorrow. It's getting late here.

tidal kiln
#

yep

idle owl
#

You around tomorrow?

tidal kiln
#

only in am

idle owl
#

Ah ok. I may miss you then. Which sucks for me because I have to tackle Arduino tomorrow for this guide. πŸ˜„

#

But good to know, so I don't bug you when you're out.

tidal kiln
#

i'll be around, but got out-of-towners showing up at some point

idle owl
#

I mean, you're 3 hours behind me, afaik, so we might have a bit of overlap, but I guarantee it won't be when I run into problems.

#

Ah nice.

#

Well, if I don't talk to you, have a lovely weekend!

#

Thanks again

tidal kiln
#

np

#

u2

manic glacierBOT
#

Originally when the S2 Mini board was brought up, there was some discussion as to whether or not to include an I2C singleton for it, as there was no explicit marking for such on the silkscreen for the board.

However, the S2 Mini is designed to be pinheader compatible with the ecosystem of shields for the Lolin/Wemos D1 Mini, and that does have a standard for I2C (they produce at least 6 shield boards using this standard as well as a board that provides a qwiic-like connector for several di...

gilded pewter
#

Since circuit python don’t have interrupts, how can I use encoders with it?

blissful pollen
gilded pewter
mortal mica
#

@gilded pewter Isn't rotaryio designed to work with rotary encoders? It works very well for me...

gilded pewter
crimson ferry
#

When a device (esp32-s2) goes into hardfault, are the pins in an unknown state? I'm trying to come up with a hardware watchdog that will hard reset the device if it goes into hardfault.

tulip sleet
#

the pins usually all get reset to inputs

crimson ferry
#

yes, the hardfaults are intermittent and I haven't narrowed them down yet, so I want to workaround it by resetting

tulip sleet
crimson ferry
#

I can probably rig up some continuous output as a watchdog

tulip sleet
crimson ferry
#

I have both, was looking at the TPL5111 earlier and I think that might do it, thanks!

#

safemode.py is a cool idea

manic glacierBOT
#

rotaryio: Add the ability to set the divisor

At present, Adafruit's rotary encoders all move 1 quadrature cycle per detent, so we originally hard-coded division-by-4. However, other encoders exist, including ones without detents, ones with 2 detents per cycle, and others with 4 detents per cycle.

The new divisor property and constructor argument allows selecting a divisor of 1, 2, or 4; with the default of 4 giving backward compatibility....

manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; Raspberry Pi Pico with rp2040
Board ID:raspberry_pi_pico
boot.py output:
	Write to Flash  : False
	Write to SD Card: True
	boot.py Finis

Code/REPL

No erreo code given when it crashes.  Must push reset or remove power.

Behavior

Crash without 'import microcontroller' even though not used.
Runs just fine with 'import microcontroller'

Description

I built an application that...

#

'''
IR Relay and translate by B.B.Blake 10/10/2021
'''
import board
import digitalio
from digitalio import DigitalInOut, Direction, Pull
import neopixel
import pulseio
import pwmio
import time
import microcontroller
#from microcontroller import pin
#test = pin.GPIO6

import adafruit_esp32spi
from adafruit_esp32spi import PWMOut
import adafruit_irremote

Pico = False
Itsy = False
bd = board.board_id
print("\f" + bd, end=" ")
if(bd == "adafruit_itsybitsy_rp2...

tulip sleet
#

@onyx hinge could i ask you about the make_new signatures?
This kind of sig:

STATIC mp_obj_t bleio_adapter_make_new(const mp_obj_type_t *type, size_t n_args, const mp_obj_t *pos_args, mp_map_t *kw_args)

is becoming

STATIC mp_obj_t bleio_adapter_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *pos_args)

But why is the last argument called pos_args? They are not the positional-only args, but the entire array of args, is that right? I would call it args but it conflicts with mp_arg_val_t args[MP_ARRAY_SIZE(allowed_args)];

onyx hinge
#

@tulip sleet yeah that's more or less why I didn't rename the parameter: I didn't know what the new name should be

tulip sleet
#

all_args ?

#

what does micropython call it in their similar make_new's

#

i would really like to call n_args -> n_pos_args, but that involves changing extmod stuff, etc.

onyx hinge
#

extmod/modbluetooth.c:STATIC mp_obj_t bluetooth_uuid_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *all_args) { yeah I guess all_args

#

often just args but probably they're not using kwargs at all there extmod/moduasyncio.c:STATIC mp_obj_t task_queue_make_new(const mp_obj_type_t *type, size_t n_args, size_t n_kw, const mp_obj_t *args) {

tulip sleet
#

oh, they are already using all_args sometimes? I just made that up

#

i like all_args, and we can change ours

onyx hinge
#

OK I'll change them to all_args

tulip sleet
#

thanks! I am at 225/412 files. I will keep going on this commit.

onyx hinge
#

unfortunately this'll make a bunch of files appear as changed again

tulip sleet
#

that's ok, I will just look over the latest commit by itself after I finish the current list from the current latest commit

#

i have not seen anything else to change yet; it looks really good. I really appreciate your doing this!!

onyx hinge
#

happy to

#

I appreciate you looking over it

#

weird, none to change in port bindings?

#

oh there's one

#

weird is gnss module actually not enabled on cxd56? it doesn't look like it should build.

tulip sleet
#

one more q. why is this no longer .exe ? It is a windows executable, I thought. Or is the .exe added later?

onyx hinge
#

3d9af877215c9f904a7d64c3fa4da79e5780a818

#

windows/Makefile: Add .exe extension to executables name.

tulip sleet
#

aha, thanks

onyx hinge
#

seems that it automatically applied itself to our mpy-cross build

#

the build worked but actions didn't upload the artifact .. a non-fatal condition, but happily I noticed it as a warning

tulip sleet
#

hmm, but is mpy's windows build mingw or MS's compiler?

#

weird that it applies

#

i am not complaining

onyx hinge
#

the windows mpy-cross.exe is built on linux with mingw

tulip sleet
#

but windows/Makefile came into the picture

onyx hinge
#

I think the commit comment is wrong, it changed py/mkrules.mk

manic glacierBOT
onyx hinge
#

@tulip sleet whoops, just pushed it

tulip sleet
onyx hinge
#

@tulip sleet hmmm I saw that they did away with use of $(PYTHON3) across all the Makefiles/.mk files and just use $(PYTHON) now.

tulip sleet
#

yes, I was surprised by that, but we can live with it. Maybe due to windows, which installs python3 as python

onyx hinge
#

the top-level Makefile has Makefile:PYTHON = python3 but that's not used 'normally' while building CP

#

officially, you're supposed to invoke "python3", according to some PEP I can find if ya like. so it seems a bit wrong..

tulip sleet
#

i wonder if we should force it somewhere

onyx hinge
#

make PYTHON=python3 probably works too

#
diff --git a/py/mkenv.mk b/py/mkenv.mk
index 981187685..5e7ae6a02 100644
--- a/py/mkenv.mk
+++ b/py/mkenv.mk
@@ -2,6 +2,9 @@ ifneq ($(lastword a b),b)
 $(error These Makefiles require make 3.81 or newer)
 endif
 
+# Invoke the python3 interpreter by default when $(PYTHON) is called for.
+PYTHON ?= python3
+
 # Set TOP to be the path to get from the current directory (where make was
 # invoked) to the top of the tree. $(lastword $(MAKEFILE_LIST)) returns
 # the name of this makefile relative to where make was invoked.
``` maybe?
tulip sleet
#

i like that; i am trying to find the mpy pr where they changed it

onyx hinge
#

huh maybe we failed at taking that bit during a past merge? That's from 2019

#

so really we want ```patch
--- a/py/mkenv.mk
+++ b/py/mkenv.mk
@@ -46,10 +46,7 @@ CD = cd
CP = cp
FIND = find
MKDIR = mkdir
-PYTHON = python
-# Set default python interpreters
-PYTHON2 ?= $(which python2 || which python2.7)
-PYTHON3 ?= python3
+PYTHON = python3
RM = rm
RSYNC = rsync
SED = sed

tulip sleet
#

there were some old scripts that were python2, at some point

#

I think the old PYTHON lines were not changed when the merge happened because they were otherwise identical

onyx hinge
#

we have a lot of $(PYTHON3) uses in our makefiles right now

#

do you want to handle this right now or leave it for .. soon ?

tulip sleet
#

we could change those back if we make a top-level change

#

well, it didn't actually build for me until I fixed my python-is-python2 problem (I normally have it as python3). I think I changed it temporarily while working on something else completely, and then forgot to change it back

#

we could change those back to PYTHON if you add your other fix above. I think that's OK. We can cancel the build that's running now.

onyx hinge
#

oh wait you had /usr/bin/python -> python3 and it didn't work?

tulip sleet
#

to save time

onyx hinge
#

I have python-is-python3 installed and that was okay here

tulip sleet
#

no no, I had this:

EN build-raspberry_pi_pico/genhdr/moduledefs.h
  File "../../py/genlast.py", line 50
    print(e, file=sys.stderr)
                 ^
SyntaxError: invalid syntax
make: *** [../../py/mkrules.mk:100: build-raspberry_pi_pico/genhdr/qstr.split] Error 1
halbert@tuna:~/repos/jepler/circuitpython/ports/raspberrypi$ which python
/usr/bin/python
halbert@tuna:~/repos/jepler/circuitpython/ports/raspberrypi$ python
Python 2.7.18 (default, Mar  8 2021, 13:02:45) 
[GCC 9.3.0] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> 
#

Ubuntu does not come out of the box with a /usr/bin/python, I think

#

I was running some other build script (not us) that needed it

onyx hinge
#

with this patch https://gist.github.com/5a7f83c284b0628b2bbd5b308abb09cc I can build circuitpython even with no "python" "python2" or "python2.7" program on the PATH.

/usr/bin/python3
/usr/bin/python3.9
jepler@bert:~/src/circuitpython/ports/raspberrypi$ make BOARD=adafruit_macropad_rp2040 -j9
I: Building for adafruit_macropad_rp2040 0 
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
mkdir -p build-adafruit_macropad_rp2040/genhdr
   text       data        bss        dec        hex    filename
    244          0          0        244         f4    build-adafruit_macropad_rp2040/boot2.elf
GEN build-adafruit_macropad_rp2040/genhdr/moduledefs.h
QSTR updated

720464 bytes used, 324016 bytes free in flash firmware space out of 1044480 bytes (1020.0kB).
15872 bytes used, 246272 bytes free in ram for stack and heap out of 262144 bytes (256.0kB).

Converting to uf2, output size: 1436672, start address: 0x10000000
Wrote 1436672 bytes to build-adafruit_macropad_rp2040/firmware.uf2
tulip sleet
onyx hinge
#

OK it's added to that PR

tulip sleet
#

i canceled the previous action runs

onyx hinge
#

thanks

tulip sleet
#

i am going out for a walk and will approve and merge when I get back

blissful pollen
#

Just a sanity check but there is not a current way to take say the LED glasses and use displayio on them as there is no driver like the RGBMatrix?

crimson ferry
#

from adafruit_is31fl3741.adafruit_rgbmatrixqt import Adafruit_RGBMatrixQT ?

#

but I don't see a way to use displayio on it

manic glacierBOT
#

CircuitPython version

Adafruit Circuit Python V7.0.0 Image from the website

Code/REPL

N/A

Behavior

N/A

Description

The STM32H743 Nucleo board doesn't seem to connect to via either the USB Serial or Mass Storage connection to the host using the Circuit Python 7.0.0 bin image off the website or an image built from the CircuitPython GitHub repository.

I verified the board works fine using the latest version of MicroPython.

I've also used...

onyx hinge
manic glacierBOT
crimson ferry
manic glacierBOT
manic glacierBOT
#

Update README in docs/ to reflect changes in package requirements. recommonmark is no longer used and has been replaced with myst-parser. Additionally there are other packages required, like isort and black. This change to the documentation covers all that and is future-proof for other changes to requirements that may happen.

manic glacierBOT
#

Hi Dan,

I compiled your hid-boot-protocol branch and tested it with my keyboard but I'm sure I'm doing something wrong. Maybe you can help me. Here is the message in boot_out.txt:

Adafruit CircuitPython 5.0.0-alpha.0-11771-g13210d2cc-dirty on 2021-10-15; Raspberry Pi Pico with rp2040
Board ID:raspberry_pi_pico
boot.py output:
Traceback (most recent call last):
  File "boot.py", line 41, in <module>
TypeError: extra keyword arguments given

Here is the code in line 41 in...

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

ok, here is the part of my boot.py which disables other devices and enables just the keyboard.

if not maintenance_mode:
    storage.disable_usb_drive()
    usb_cdc.disable()
    usb_midi.disable()
    
usb_hid.enable((usb_hid.Device.KEYBOARD,), boot_device=1 if not maintenance_mode else 0)

The USB-Stick does not show up in the Finder an if I'm already logged in to the mac, the keyboard works.
But the keyboard still does not work when I try to login on a machine with an e...

manic glacierBOT
#

Today I "stumbled" over this when trying to use an HID descriptor with a feature report...
Only after this test, I became aware of this issue here.

@dhalbert: once you figured out how to support feature reports "long term" in your C code, please check the code in
hid.py | HIDService | _init_devices(self) | line 645 and following.
There is a elif case missing for "tag == _MAIN_ITEM_TAG_FEATURE:"

Without this elif the code runs into an: raise RuntimeError("Unsupported main item in HID...

manic glacierBOT
#

@ThomasAtBBTF I did a trial implementation of feature reports in https://github.com/dhalbert/circuitpython/tree/hid-boot-protocol, which I have not yet PR'd. If you have some non-BLE way of testing this, I would be very interested. I don't have a device in mind where I know the feature reports are used. The Surface Dial has one, but I am not sure how it's used, and it's hard to spy on the BLE HID traffic to see how.

onyx hinge
#

oh okay, it's disabling the USB peripheral's "run on standby" bit, wouldn't matter for CP.

manic glacierBOT
manic glacierBOT
onyx hinge
#

oh neat, I hadn't seen before that github will integrate failure messages from actions into a "compare" view. not sure what exactly allows it to do this.

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

The wakeup problem is different than boot keyboard, and I need to work on that separately. If you plug in the RP2040 when the password prompt appears, does it still not work?

My Macs are not set up for this disk encryption, but there may be other boot-time choices (option-shift-whatever, etc.) that I can use to test without having to set one up for encryption. Do you know of some boot-time entry screens similar to the password request?

#

If you plug in the RP2040 when the password prompt appears, does it still not work?

No, this also does not work.

Do you know of some boot-time entry screens similar to the password request?

I don"t know how to reproduce this behaviour without an encrypted HD. But you can encrypt your HD at any time. It just takes some time to finish. See System Preferences > Security & Privacy > File Vault

manic glacierBOT
#

@akaenner I have a simpler test of this, which is to start the Mac while holding down the "D" key, to get it into diagnostics mode. Then it lists the available wifi networks (wait for the spinning to stop), and an external keyboard's up and down arrow keys can go up and down the list of networks.

The "D" key is for Intel Macs. For M1 ("Apple silicon"), you just keep holding down the power button to get into a startup menu. https://support.apple.com/en-us/HT202731

Anyway, what I see on a...

orchid basinBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; Adafruit PyGamer with samd51j19

Code/REPL

import board
import displayio
import busio

_TFT_INIT = (
    b"\x01\x80\x96" # SWRESET and Delay 150ms
    b"\x11\x80\xff" # SLPOUT and Delay
    b"\xb1\x03\x01\x2C\x2D" # _FRMCTR1
    b"\xb2\x03\x01\x2C\x2D" # _FRMCTR2
    b"\xb3\x06\x01\x2C\x2D\x01\x2C\x2D" # _FRMCTR3
    b"\xb4\x01\x07" # _INVCTR line inversion
    b"\xc0\x03\xa2\x02\x8...
manic glacierBOT
manic glacierBOT
#

CircuitPython version

Adafruit CircuitPython 7.0.0 on 2021-09-20; Teensy 4.1 with IMXRT1062DVJ6A
Board ID:teensy41

Code/REPL

import busio
import board

ser = busio.UART(board.D20, board.D21, baudrate=115200)

for i in range(20):
  print(ser.read(1))

Behavior

Auto-reload is on. Simply save files over USB to run them or enter REPL to disable.
code.py output:
b'%'
b'\xbe'
b'\x1f'
Traceback (most recent call last):
  File "cod...
orchid basinBOT
#

Hi, please keep items in the features list limited to the items under: https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website/adding-to-downloads#header-3034486-5. This is used to generate a list of possible filters and the user won't see it otherwise. Even slight variations in spelling will cause multiple items to appear in the filter list.

You can move them to the description area and it will be fine. Thanks.

slender iron
onyx hinge
#

<@&356864093652516868> heads up! we'll be having the weekly meeting in about 20 minutes from now. Please add your notes to the document https://docs.google.com/document/d/1GNNz8pJxypYCDj5toMMGoUZO56_Oiib-eYr4YLBjs4Q/edit?usp=sharing and note if you're "(no mic)" or "(missing meeting)" so we can read your notes if necessary.

solar whale
#

Lurking today. Nothing to report.

thorny jay
lone axle
manic glacierBOT
idle owl
#

Indeed.

idle owl
crimson ferry
#

lurking

errant grail
lone axle
#

I am here in the call. I can read my status report. I think lurking got pasted in the doc accidentally.

#

There is more info about Riskable's keyboard and switches in their Youtube here: https://www.youtube.com/channel/UCSsm4h2ccJMdR6bsAFyIu6A They've posted updates in the #show-and-tell channel as well, can find more pics and videos searching in that channel.

idle owl
#

ANO rotary encoder.

lone axle
errant grail
idle owl
#

@errant grail Been there with a fiberglass hazmat suit. Been a long time though. Had to deal with a deceased relative's attic, and we did it late at night, getting into the attic involved a hatchet... I was expecting someone to call the police because of how ridiculous it looked. But no one did. Not sure whom that says more about.

errant grail
idle owl
#

@gilded cradle I figure we can vid chat later today or tomorrow, depending on what makes sense.

gilded cradle
#

Sounds good

lone axle
#

The PyCharm page could be updated with a set of best practices for using PyCharm. I'd be willing to work on that one if there is interest in keeping it.

idle owl
#
     great as is; the photo is a bit long in the tooth now

--- a missing topic: "How do I Learn Python?"
    we are agnostic about this, but I think we should provide some pointers, perhaps to pages at Python.org, some books, online courses, etc. This question comes up frequently.

Frequently Asked Questions
    maybe move this section down to above Troubleshooting? The first subsection about old library bundles is duplicative of something in Troubleshooting.

Installing CircuitPython
     mention RPI-RP2 in the list of BOOT drive names

The CIRCUITPY Drive
     The "renaming the drive" section could put on its own page and moved further down, since it takes a lot of space and is not that relevant to beginners.

Connecting to the Serial Console
Interacting with the Serial Console
    Group these with the other Serial Console pages? See below.

CircuitPython Hardware
    This is old and describes only some M0 boards. We could delete this, or make a separate guide. There is this page, but it's also out of date: https://learn.adafruit.com/how-to-choose-a-microcontroller/circuitpython-boards

Advanced Serial Console on Windows
Advanced Serial Console on Mac and Linux
    Perhaps these could be grouped with the other Serial pages and some or all put under an expandable heading to reduce the size of the left sidebar

PyCharm and CircuitPython
    Move this under "Creating and Editing Code"?

CircuitPython for ESP8266
    I think we can remove this completely.

Troubleshooting
    Include RP2040 "flash_nuke.uf2" info

---- a missing page: "CircuitPython Documentation"
    Point to readthedocs for CircuitPython and the libraries, and explain that it's for reference. I have helped several people who were unaware of readthedocs, and this would help.```
ember iris
#

Python. org has a ton of types of resources, videos, books, demos, etc

slender iron
errant grail
#

Maintaining the freshness of all links forever will create exponential issues that will ultimately be unmanageable. It's time to rethink how to approach configuration management into the future. For example, can a bot be developed to map existing links throughout Adafruit publications/posts/documents to help content removal/freshness?

gloomy shuttle
ember iris
#

I'm working on an FAQ on reddit so I've been running through the beginner resources

#

Can do, I'll drop what I have in soon--I'm mostly aiming at referring to python.org's resources and mostly just explaining how to find a resource that fits the readers learning style

#

In the "Learn Python" section, you might want to flag how this is different than python--some things will use 3.10's pattern matching, which if someone relies on PatMa, they could be confused jumping to circuit python. That's a thing that's easy to address, it just needs to be highlighted in the "learning python" section as well

lone axle
#

I didn't know those badges in the readme were linked for the longest time. Definitely like the idea of that being spelled out a little more in the readme.

errant grail
#

Thanks!

ember iris
#

When it comes to the reddit FAQ, the related questions I've highlighted are:

How do I install Python?
What version of Python should I use?
Which IDE should I use?
Book/Course/Tutorial/Video recommendations
Best way to learn python

onyx hinge
#

@tulip sleet I started trying to enable (u)asyncio in circuitpython but found that we need select too, for the frozen-in parts

tulip sleet
onyx hinge
#

(who has two thumbs and is bad at staying on task? this guy)

#

either way it seems select is a dependency, but we don't have it

idle owl
#

The first three are already covered in the guide for CircuitPython-specific info.

ember iris
#

Best way to learn python has a, "Everyone learns differently" explanation I haven't finished writing, the IDE I feel is pretty well fleshed out with options, and then a solid paragraph about how it's a tool not the key to success

#

the recommendations are things I'm not doing building out/explaining, but here's what I have thus far:

#
### Books
- [https://wiki.python.org/moin/PythonBooks](https://wiki.python.org/moin/PythonBooks)
### Courses
- Automate the Boring Stuff: [https://www.udemy.com/course/automate/](https://www.udemy.com/course/automate/)
### Podcasts
- [https://talkpython.fm/](https://talkpython.fm/)
- [https://www.pythonpodcast.com/](https://www.pythonpodcast.com/)
- [https://realpython.com/podcasts/rpp/](https://realpython.com/podcasts/rpp/)
### Tutorials
- [https://docs.python.org/3/tutorial/](https://docs.python.org/3/tutorial/)
### Videos
- [https://www.python.org/doc/av/](https://www.python.org/doc/av/)
- [https://www.reddit.com/r/learnpython/wiki/index#wiki_videos.2Flectures](https://www.reddit.com/r/learnpython/wiki/index#wiki_videos.2Flectures)```
#

Almost all of this was grabbed through the python.org resource section

idle owl
#

Unrelated, the official Python tutorial really didn't work for me. Heh. It may have been updated since.

idle owl
lone axle
#

My backup recording seems to have come out all good. If there turns out to be any issue with the main recording I can share the copy.

stuck elbow
#

@idle owl I think the official tutorial is mostly aimed at programmers who already know similar languages

ember iris
idle owl
stuck elbow
#

in particular, they don't teach programming concepts

idle owl
#

Right. They teach Python concepts.

#

In the end, my learning situation was partially unrelated to their tutorial - manipulating the physical world hooked me more than manipulating data ever could.

ember iris
tulip sleet
idle owl
#

Later this week though. Still need to get through this ATtiny guide.

tulip sleet
#

roger; my async task is my highest priority task in my event loop πŸ™‚

stuck elbow
#

but it's async, you never know which tasks get starved

idle owl
#

@lone axle Ok, Adabot could do some of it, but not much of it. So, I figure at that point, if it's going to be scripted, there's no point in running Adabot on a tiny number of the libs, when you'd be running the script on all of them anyway. So, I'll write something up on the TestRepo, and we can look into whether we can script it manually at that point.

onyx hinge
#

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

idle owl
#

@tidal kiln BTW, about the I2C address byte. I guess Dean implemented it, it was super kludgy, they took it out, and then never reimplemented it. Or at least that's what Limor vaguely remembers. The process was bonkers, involved writing a page or something, erasing everything, rewriting everything... I don't remember exactly, but she said it was Bad ℒ️ . That said, the ATtiny apparently supports it happily. That said, she told me to leave it out of the guide. So I don't know if this clears anything up for you or not, but you wanted me to ask about it.

onyx hinge
tulip sleet
onyx hinge
#

haha oops

tulip sleet
#

great, thanks

tidal kiln
#

@idle owl thanks. i remain mildly confused. but that is ok.

manic glacierBOT
#
  • Addresses #1136, but only for PC BIOS, not for Mac

  • Fixes #5197

  • A new optional argument, boot_device, was added to usb_hid.enable() tells the host that a boot keyboard or mouse is available.

  • All other devices should be disabled to ensure that the HID device is at interface number 0 if a boot_device is specified. We check for that after boot.py finishes and go into safe mode if that is not true.

  • Feature report support was added, but could not be well tested, since I don't ...

idle owl
#

Sigh. I found my container of buttons recently, and now it's nowhere to be found. I have a button, but it's a bigger one, and I need a littler one. Bleh.

tidal kiln
#

have you checked to see if you are doing the holding-the-lost-thing thing?

idle owl
#

πŸ˜† No, but no. Sadly.

#

Maybe need to call show().

tidal kiln
#

leave the room, come back, look in same spot you've already looked?

idle owl
#

lol. Worth trying at this point.

#

I was going to do the order-it-from-Adafruit-and-find-it-after-clicking-submit thing.

#

I give up. Ordering it won't get it here in time, at this point. I'll have to deal with the bigger button. Which means a bigger breadboard. Which means bleh.

turbid radish
#

?serverinfo

digital shoreBOT
#
adafruit
Owner

adafruit#3230

Channel Categories

8

Text Channels

60

Voice Channels

6

Members

31364

Roles

35

onyx hinge
#

I added select, so I could make asyncio importable. but the simplest thing I can do with it just freezes

#
import asyncio
async def f():
     return 1
asyncio.run(f)
#

actually after a verrry long time it responds to ctrl-c, but it seemingly never becomes ready for use

idle owl
tidal kiln
#

On the SAMD09, are 64 bytes --> "there are"

idle owl
#

Thank you

tidal kiln
#

otherwise looks good. at least for now. can update as needed based on feedback, what seems confusing, etc.

#

can see people potentially accidentally writing to last byte and then getting unexpected behavior on next reset/power cycle

#

but that same issue's been there. nothing new.

ornate breach
tidal kiln
#

me too. and even worse.

stuck elbow
#

I accidentally a verb every time

idle owl
#

That came out of adapting it from other wording. πŸ˜„ But yeah.

slender iron
#

@crude blaze just pushed with cpy working over uart

#

to my rpi branch

crude blaze
#

awesome!

#

I'll check it out, I should have some time on the weekend

manic current
#

Hi, i am stuck with a project . I want to use uart in writing

#

Can someone can hello me with :
uart.write( ? )

mortal mica
manic current
#

Thanks

mortal mica
manic current
#

Thanks a lotπŸ˜‰

blissful pollen
manic glacierBOT
#

Testing performed: In the REPL, set the timeout to 16s and enable. Call feed() once every 1-2 seconds and it keeps running indefinitely. Stop calling it, and reset (into normal run mode) happens approximately 16s later.

The "reset reason" is unimplemented on samd51 so it's not possible to tell that a reset was a watchdog reset. I didn't investigate whether it was difficult to implement the reset reason.

manic glacierBOT
manic glacierBOT
slender iron
tulip sleet
#

@slender iron I can make structural comments easily. It is not structured the standard way. Lots of stuff in the board directories.

slender iron
#

I just don't want it to languish

tulip sleet
#

I can make lots of comments, then.

slender iron
#

it'd be good to add some at least. maybe not all at once πŸ™‚

tulip sleet
#

Yes πŸ™‚

manic glacierBOT
idle owl
#

@tidal kiln lol. This. ```Snapping Behavior

No one fully understands Eagle's snapping behavior when using the dimension tool. Just punch your way through it as best you can.```

tidal kiln
#

happy to be wrong about that. would just like to know. πŸ™‚

idle owl
#

I would add a note about the "move" point in a dimension object being the center of it, even if it ends up being one of the ones with a measurement outside the two indicator lines. I'm not sure where to add that.

#

It's really annoying to figure out how to shift the dim object if you don't know to click in the center.

idle owl
#

Hmm maybe should mention that in the snapping section.

#

I'll add a sentence there.

tidal kiln
#

also, the goal isn't to make nice dimension diagram, like fab print

#

it's just for getting dimension info

idle owl
#

Ahhhh fair enough

#

Ok

#

Then I'll mention the layers trick

#

and leave the other out.

tidal kiln
#

so the dims can be a mess / unpretty etc.

#

it's for "what's dimension FOO on product BAR"?

idle owl
#

Gotcha.

tidal kiln
#

not "how to dimension in eagle"

#

which...yah...

idle owl
#

Check out what I added. See if it makes sense

#

In "Snapping Behavior"

tidal kiln
#

nice! thanks

idle owl
#

Keen.

#

I'll respond in Basecamp to let Limor know I took a look at it.

tidal kiln
#

w3rd

manic glacierBOT
#

Thank you for starting a new port! I haven't looked at the implementation of the parts that have been implemeneted, but have instead commented on the structure, and which files are where. I'm going to mark this as a draft for now.

Please feel free to ask about how to structure and re-factor the port-specific files. If you can use some NXP repos as submodules only, that's great. The https://github.com/adafruit/samd-peripherals is an example of how to structure a wrapper layer to hide some d...

manic glacierBOT
idle owl
#

@gilded cradle Hey! Does tomorrow work for a vid chat with you? Trying to finish up a guide in time for tomorrow's noon deadline, so today kind of ended up not being good for me. I have a short appointment at 1:30, though I don't expect it to happen on time, but sometime after 1:45pmET, I can ping you and let you know when I'm available. We can coordinate that way, if that works for you.

manic glacierBOT
#

CircuitPython version

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

Code/REPL

from keypad import Event
dir(Event)

Behavior

['__class__', '__name__', '__bases__', '__dict__', 'key_number', 'pressed', 'released']

Description

keypad.Event is missing implementations of members:

  • __hash__(); Calling hash() on a keypad.Event yields the same integer, regardless of instance.
  • timestamp; `AttributeErr...
idle owl
manic glacierBOT
manic glacierBOT
#

Jepler,

Below is my boot.py file. The result is not used. The pin to determine what action to take is changed board to board to avoid conflict. I get the same results when I remove boot.py. Pin A3 is unused on the ItsyBitsy.

###########################################
"""CircuitPython Essentials Storage logging boot.py file"""
import board
from digitalio import DigitalInOut, Direction, Pull
import storage

For Feather M0/M4 Express, RPi Pico, etc.

switch = Digital...

manic glacierBOT
#

The code has evolved. below is the code as it stands now. Also the symptoms have changed on the ItsyBitsy only. If "import microcontroller" ((Line 13)) is not commented out the device crashes after 4 codes are transmitted ((Line 245)). No error codes given on REPL. A hard reset is required. There was an issue between .mpy and .py library files but that went away for no good reason.
((Problem with .py library files. Replaced with .mpy files. Things OK. Test again with .py, problem go...

manic glacierBOT
spiral elk
#

Is there any board you're aware of that provides board.DISPLAY on an i2c-connection? Was looking for board.c code to crib but can only find SPI-connected examples.

manic glacierBOT
patent peak
stuck elbow
#

also requires fewer components

spiral elk
#

I found one other similar board, but it doesn't implement board.DISPLAY either.

lone axle
#

It seems like this device got added to circuitpython.org but never did completed and merged into the circuitpython core: https://circuitpython.org/board/hiibot_iots2/ so there are no builds in S3 or github release page, and no way to build unless you go back and grab a branch from one of the PRs that are closed.

spiral elk
lone axle
spiral elk
#

Yeah, that was the one

#

I was planning on working on the Lolin S2 Pico, the display is the bog-standard 128x32 i2c ssd1306 oled, so the initialization data should be pretty easy, but no examples of the stuff necessary to set up an i2c-attachment in board.c

manic glacierBOT
idle owl
#

@lone axle Did we upgrade your role in the Learn system, or do I need to add you manually to the Welcome to CP guide for you to update the PyCharm page?

lone axle
idle owl
#

@tidal kiln Guide format preference question when you're around. Absolutely no rush, I'll be at this update for the next week probably.

tidal kiln
#

@idle owl πŸ‘‹

idle owl
#

Ah hey.

#

I'm not sure the FAQ elements support code formatting in the question part.

#

They don't.

#

So I guess go with header+text for all of them?

tidal kiln
#

could use faq

#

and if you need code, add that element after

idle owl
#

I need code in the actual question though.

#

For a bunch of them.

#

"What is a MemoryError" has MemoryError in code formatting

#

etc.

tidal kiln
#

oh, like inline

idle owl
#

Yep

tidal kiln
#

i think ok without the formatting, if you use the FAQ element

idle owl
#

Hmm. Ok. Will be annoyed by that, but if you think that's a better option for that page, then I'll go with it.

#

Pinged Justin about making formatting possible, but I'm sure that's a long time out if it's possible.

tidal kiln
#

i guess either way would work

idle owl
#

I asked you for a reason, if you think FAQ is better, I'll run with that.

tidal kiln
#

the main thing that's useful is to be able to directly link to a specific FAQ

#

which either can do

idle owl
#

You can link to the header... yeah that

tidal kiln
#

and it looks like they changed the default behavior for the FAQ element to be expanded, which is much better

#

before, it was hidden, and not obvious how to make it visibile

idle owl
#

I saw that too, wondered if it was me

#

Like somehow it did it for me, didn't occur to me that it was a default change.

tidal kiln
#

i'm assuming that's what happened. i was going to mention it at some point.

#

maybe see what justin says/thinks?

idle owl
#

Yeah that's valid. He's not around at the moment. But I have plenty of guide to update in the meantime.

blissful pollen
#

Anyone have/know of any examples of using the core adafruit-pixelbuf? Looking as I have an idea with the IS31 glasses/matrix and speed in pure python isn’t quite there. The pixelbuffer seems to be a similar use case

idle owl
idle owl
#

I need someone who has never installed Mu Editor before to install Mu Editor and then answer a question for me.

idle owl
#

I'll ask in one of the non-CP channels, heh, since this isn't the best place to look for that.

blissful pollen
idle owl
#

Modifying the driver I think to work better with things.

blissful pollen
#

Cool thanks. If she has any ideas she wants to bounce off someone feel free to tell her to ping me.

idle owl
#

For sure! I'm certain that will be appreciated as I'm only good for API concepts, not gritty coding help. I'll let her know.

#

@tulip sleet Do you have a machine amongst your many that has never had Mu installed on it? As in very never, not ages ago even.

tulip sleet
#

what OS?

idle owl
#

Windows or Mac, but I really don't care. I assume its behavior is the same across all OSs

#

So Linux is probably fine too

tulip sleet
#

I think I may have a Windows instance that I recently redid.

idle owl
#

Basically, install it, and run it, and tell me what the default startup behavior is. Does it default to CircuitPython? Or does it give you the window to pick your mode?

tulip sleet
#

is a board plugged in or not?

idle owl
#

Because mine are defaulting to CircuitPython now, and I'm not sure if that's default, or not

#

Not plugged in

#

But I tried both ways

#

and it defaulted to CP both ways

tulip sleet
#

I could look at the code and see how it picks

idle owl
#

The guide says "Pick your mode" etc, but I'm now wondering if that's not a step anymore unless you do it.

#

That would also work, lol

#

I hadn't considered that angle.

tulip sleet
#

i will resurface with info πŸ™‚

idle owl
#

Thank you!

tulip sleet
#

@idle owl when Mu starts up, it restores settings from the previous session, including the mode. If there are no settings, which would happen the very first time, then it will pop up the mode selection dialog

idle owl
#

Ok, thank you! I tried deleting everything I could find and it still defaulted to CP.

#

So there's still something somewhere.

#

I'll get a screenshot of the new Mode dialogue and leave that step in there.

tulip sleet
#

I will try to find that file

idle owl
#

Nah it's ok

#

As long as I know what happens for newbies, it's all good

manic glacierBOT
#

CircuitPython version

Adafruit 7.0 latest, and master branch (yeah I compiled master).

esp32 wifi chip:
Firmware vers. bytearray(b'1.4.8\x00')

Code/REPL

import time
import board
import busio
from digitalio import DigitalInOut
import adafruit_requests as requests
import adafruit_esp32spi.adafruit_esp32spi_socket as socket
from adafruit_esp32spi import adafruit_esp32spi
import neopixel
from rainbowio import colorwheel
import gc
from secrets impo...
#

CircuitPython version

Adafruit Circuitpython 7.0 latest and master (yeah I compiled master branch)

Code/REPL

import time
import board
import busio
from digitalio import DigitalInOut
import adafruit_requests as requests
import adafruit_esp32spi.adafruit_esp32spi_socket as socket
from adafruit_esp32spi import adafruit_esp32spi
import neopixel
from rainbowio import colorwheel
import gc
from secrets import secrets

UDP_IN_ADDR="192.168.2.147"
UDP_I...
idle owl
#

@lone axle Opinion time. For the explicit callout of the documentation - does it need to be any more involved than this? ```
Documentation

API documentation for this library can be found on Read the Docs <https://circuitpython.readthedocs.io/projects/testrepo/en/latest/>_.```

#

I was considering adding more, but then thought maybe not.

#

That's in the README after the Usage Example.

idle owl
#

Right on.

lone axle
#

Will poke around and try some things out when I have a chance next.

idle owl
#

Thanks much!

#

I'm hoping because the contributing bit is pretty standard, that it'll be doable.

#

But I don't understand it, so I'm guessing here.

#

Anyway, whenever you get a chance is fine πŸ™‚

lone axle
#

I think it should be doable. From the thought I have given to it so far I think the "hardest" part is knowing the right readthedocs link for each repo. But I believe the script should be able to grab it from the existing badge link. Thats going to be my first way to attempt it at least.

idle owl
#

That was my thought too!

onyx hinge
idle owl
#

@gilded cradle Hey! Finally done dealing with the thing. Let me know when you're free for a vid chat.

#

Hmm. We suggest in the Welcome guide to create a new file, and then save it as code.py. But CP now creates a code.py. So now I'm wondering if we should instruct folks to open it instead of saving over it. Are there instances where CP doesn't generate the mostly empty code.py file on CIRCUITPY on install?

#

@tulip sleet Does CP always generate the Hello world! code.py on CIRCUITPY? Or are there situations where it doesn't... I feel like I've run into it not having a code.py, but maybe that's after some kind of catastrophic failure, and on restart, there's nothing on the drive at all.

#

I don't want to set folks up for failure here, but if there's already a code.py, this page isn't exactly right at the moment.

tulip sleet
#

LIke Trinket M0, etc.

idle owl
tulip sleet
#

yes, it's always present, it's just empty sometimes

idle owl
#

Mostly, right now, we say "create this file and save it as code.py" which makes no sense if there's already a code.py, empty or otherwise.

#

Ok

#

I will rework this to say open the file instead of create a new one.

gilded cradle
idle owl
gilded cradle
idle owl
#

@tulip sleet SYN

#

Would like some input on a warning I'm putting on the current "CircuitPython Hardware" page which is full of M0 boards.

#

Other than Circuit Playground (which we DO recommend!), we do NOT recommend purchasing M0 (ATSAMD21) boards for use with CircuitPython projects. The information available on this page is still valid for the boards listed. However, the filesystem size and memory footprint make them of limited use with CircuitPython. is what I have so far.

#

It's getting nested under "Archive" and replaced with a mirror from a different guide anyway, but I still want a warning on the page.

#

BRB, almost forgot to eat before the meeting.

#

(back)

tidal kiln
#

@idle owl hey, should cookiecutter be updated to add disable for consider-using-f-string?

idle owl
tidal kiln
#

yep. working one right now. πŸ™‚

idle owl
#

Perfect

idle owl
#

Merged.

pallid creek
#

Where can I see the Python code for TileGrid? Looking at the gitrepo I can see TileGrid.h and .c, but not a .py. Is TileGrid.py only generated?

#

My goal is to look at how pixels are actually drawn after I set a value in a bitmap.

#

To find the fasted way to do it. Currently filling the screen on a pygamer takes a 3rd of a second, which seems very slow.

tulip sleet
idle owl
lone axle
pallid creek
#

(strangely github doesn't let me search through source in forked repos)

lone axle
#

There is a python implementation of TileGrid inside of Blinka_Displayio. So you could look at it if you wanted here: https://github.com/adafruit/Adafruit_Blinka_Displayio/blob/main/displayio/tilegrid.py It is essentially a python implementation of the C code in the core. So it should have very similar / same behavior as the core, but it's not actually used on microcontrollers. Only RPi / other single board computers using Blinka.

pallid creek
#

is there an architecture doc somewhere that describes how displayio works? Basically I want to find the fastest way to update pixels in immediate mode (like HTML Canvas).

#

TileGrid and Rectangle and the other shapes seem to work by pre-drawing into a bitmap and rarely modifying them. Is the slow down from crossing the python -> C barrier? or is is number of pixels changed per frame (io limit)

lone axle
# pallid creek is there an architecture doc somewhere that describes how displayio works? Basic...

This guide describes how it works from the user level: https://learn.adafruit.com/circuitpython-display-support-using-displayio but I'm not sure if that will have the information you're after.

I am probably not the best person to be able to say where the slow down (or potential improvements) could be though.

I can give some general advice perhaps on how to speed things up possibly. What are you trying to draw? something in particular?

pallid creek
#

I've seen the user guide. I was hoping for something that explains how it works on the inside.

#

Oh, I hadn't seen bitmaptools. Taht looks interesting.

idle owl
#

@slender iron @tulip sleet @onyx hinge I updated the internal who's-running-the-CP-Weekly-meeting calendar to include Dan, and to be corrected for the last couple and next couple of meetings. So it's up to date at the moment.

lone axle
#

Those are implemented in C code so I would guess they are probably about as fast as it can get barring some substantial effeciency improvement in the logic of the code itself if one exists (not sure / guaruntee'd to be possible though)

pallid creek
#

my background is in graphics programming, so I'm happy to dig into the C code. Can C be used in user projects or does it have to be compiled into the core?

lone axle
#

I don't believe there is a resource that details/documents how it works internally. The best way would probably be to read the C code inside the displayio module in the core. If you are comfortable poking around there you could figure it out.

#

I don't necessarily understand all of it myself. But probably good to start with Bitmap, Group, and TileGrid objects.

tulip sleet
#

displayio's original motivation was for low-memory display work, as typically found in, say, older game hardware

#

but it can also be used in a general way

lone axle
#

It's possible there was a deep dive show with Scott that may have covered the internals in a bit more detail, I'm not sure though, and it would be video format not written documentation.

#

C code does have to be compiled into the core to use it.

pallid creek
pallid creek
#

thanks. I'll do some research and come back with what I find.

#

my end goal is to be able to create a vector game like Qix or Asteroids using the PyGamer.

lone axle
lone axle
#

whoops

tulip sleet
#

@idle owl you could say "we no longer recommend" because there are now newer boards available at the same price points that have much more RAM and are faster

idle owl
#

@tulip sleet Other than Circuit Playground (which we DO recommend!), we no longer recommend purchasing M0 (ATSAMD21) boards for use with CircuitPython projects. There are now newer microcontrollers available at the same price-point that are faster and have more memory. The information available on this page is still valid for the boards listed.

#

Thanks for the assist!

#

@tulip sleet While I have you... You recommended having all serial console stuff nested under a single serial console page. Scott recommended an "Advanced Setup" page with a bunch of advanced pages under it. I'm now leaning towards nesting like-things under like-things, and not having the Advanced Setup page. I guess, first real question is - where would the Windows 7 and 8.1 Drivers page go?

#

The page exists, it's not nested yet.

tulip sleet
#

it's "Installing CircuitPython", I think, since if you plug in a board before installing the drivers you will get errors on 7 and 8.1. It will still work, but you'll only have access to CIRCUITPY, not the repl

idle owl
tulip sleet
#

well, you've never had to deal with that πŸ™‚ fortunately

idle owl
#

Valid point.

tulip sleet
#

except helping people in workshops ... hmm

idle owl
#

Oi.... that too

#

That one guy who brought in a Pinebook. πŸ™„

tulip sleet
#

i think you pushed it out of your mind

idle owl
#

I was like "No, sorry, you can follow along."

tulip sleet
#

That looks good. What about nRF52840? Do you think that should be included? It's kind of a basic choice. Could drop one of the M4's. Did you include the itsy kit as variety?

idle owl
#

So.... "Advanced Serial Console on *" pages would go under "Connecting to the Serial Console"? I'm now rethinking this. I guess maybe an Advanced Setup page makes more sense. Otherwise people who click on "Connecting to" would also get the "Advance Serial" pages, and would try to do them, because apparently doing literally every page in a guide in order is a thing for some folks.

tulip sleet
#

if it says at the top of the page, "you can ignore this unless..." maybe that would help. I'll look at the pages...

idle owl
tulip sleet
#

i can understand, and the M4 boards show the form factors.

idle owl
#

Right.

idle owl