#circuitpython-dev

1 messages ยท Page 285 of 1

obsidian compass
#

It worked , thanks alot @tulip sleet ๐Ÿ™‚

tulip sleet
#

yw!

obsidian compass
tulip sleet
#

very nice!

tidal kiln
#

neat!

obsidian compass
#

thanks, that's pybadge working with adafruit IO over mqtt using airlift featherwing

#

It's sad can't use the display, neopixel and airlift at the same time

tulip sleet
#

is it SPI bus contention? are the display and the airlift sharing the same SPI bus?

obsidian compass
#

I think it's airlift and neopixel

#

not sure, checking schematic

#

because I can surely do both display and airlift at the same time, it has to be neopixel right?

tulip sleet
#

what goes wrong?

obsidian compass
#

Maybe a shared pin, wait let me share that error

#
  File "neopixel.py", line 91, in __init__
ValueError: D8 in use ```
tulip sleet
#

i don't see that it's shared on the schematic.. hmm

#

tft and regular SPI bus are separate

obsidian compass
#

What pins are SPI?

tulip sleet
#

MOSI, MISO, SCK

obsidian compass
#

Neopixel using D8

#

I meant Dxx

tidal kiln
#

are you using pybadger library?

obsidian compass
#

@tidal kiln to use the display? Yes

tidal kiln
#

and also creating a separate neopixel object?

tulip sleet
#

bingo &^^

obsidian compass
#

Ok lmao

tidal kiln
#

pybadger lib does that for you

obsidian compass
#

I feel good and bad ๐Ÿ˜›

tidal kiln
#

(for the pybadge neopixels)

obsidian compass
#

Thank You ๐Ÿ™‚

#

Yes that was stupid of me

tidal kiln
#

no worries. it happens a lot.

idle owl
#

That it does.

ionic elk
#

@tulip sleet sorry for being a git dumb dumb, but I still want to totally nail down what I should do here:

  1. Should I make my own hierophect/uf2-stm32f fork and submit prs to the adafruit fork, or just clone the adafruit fork and submit directly?
  2. Say I want to make a commit/PR that changes the drive name to CPYBOOT, which the upstream repo won't want. Will that be skippable in what we send to them?
tulip sleet
#

@ionic elk 1) the former, so we can review your changes ourselves, and them submit them upstream

#
  1. with the right PR's yes, but we try make it so we and they can stay in sync. Worst case there could be compile options.
half sedge
#

Err that is not for displayIO that is for the neopixel on board.

#

@obsidian compass I have another piece of code that does web color to color on PyPortal with this:
pyportal.set_background(eval("0x"+value.lstrip("#")))

I don't know if it is pythonic but it works for me.

tulip sleet
#

@half sedge use int(value.lstrip("#"), 16)

half sedge
#

@tulip sleet Perfect, thank you.

tulip sleet
#

eval() has to compile and run the string you pass as Python code, which is quite expensive, and can also be unsafe (malicious code could be passed in)

lone axle
#

yep, I was going to mention make sure you have a full understanding of what value could contain if you are going to pass it to eval.

idle owl
#

@tulip sleet @slender iron Any ETA on the next CP release?

half sedge
#

It is likely that I borrowed this code from... the internet!

slender iron
#

not that I have planned. something you'd like released?

obsidian compass
#

Thanks for sharing that @half sedge ๐Ÿ™‚

idle owl
#

@slender iron We didn't include the updated Circuit Playground library in the last release. I wondered when it would next be released. Doesn't need its own release. Was simply curious whether there was anything planned. Not a big deal that there isn't.

half sedge
obsidian compass
#

Thanks, I am looking forward to get my hands on a PyPortal soon

slender iron
#

kk, I don't know what @tulip sleet is thinking. he's been squashing bugs

idle owl
#

Alright. Thanks.

tulip sleet
#

@idle owl do you mean 4.x? I started a PR, but decided it was not urgent and we could wait for things to settle

idle owl
#

@tulip sleet I meant 5.x. But I suppose 4.x as well. I agree with waiting. It was more of a curiosity. I have an updated version of the soundmeter code to PR, but I don't think it relies on the recent updates. So it should be fine with the current version.

bright aspen
#

@tidal kiln Are you tinkering with busio.SPI? Here are couple of my observations: On Feather M4 Express it currently takes a minimum of 30 us to do an I/O operation. The lock takes twice as long.

half sedge
#

@gilded cradle do you know the future of displaying on LCD from Blinka?
Should we be able to use a supported I2C or SPI display, connect to a Pi and display on it from Python but with Blinka and CP library?
Are we going to miss DisplayIO?
The idea is to get that 240*240 on a Pi, write code and then move that to the Gizmo for CPX or CPB.

tidal kiln
#

@bright aspen thanks. i'm not doing anything that low level though.

obsidian compass
#

@tidal kiln I am kinda lost here finding the API exposed by pybadger library to control on-board neopixels, any idea?

#

I see a "pixels" property in lib code but not really sure how to use that one

tidal kiln
#

that's the neopixel instance, so just access it and then use any neopixel API call on it

obsidian compass
#

trying...

tidal kiln
#
pybadger = PyBadger()
pybadger.pixels[0] = 0xFF0000
pybadger.pixels[1] = 0x00FF00
pybadger.pixels.fill(0xADAF00)

etc.

obsidian compass
#

Yes, worked. Thank you!

ionic elk
#

@tulip sleet ok, current F405 bootloader pattern is it alternates on reset presses between circuitpython and the ARCADE-F4 drive. If I want to match the Atmel behavior, it seems changes will need to be made.

#

works great otherwise though.

#

@slender iron & @meager fog you might want to weigh in on this too? I've got a working UF2 bootloader for the Feather F405, but it will need changes to be in line with other feather boot behavior.

idle owl
#

<@&356864093652516868> Here is the notes document for Mondayโ€™s CircuitPython Weekly meeting. 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 Iโ€™ll read them off during the meeting. Hope to see you there! https://docs.google.com/document/d/16ssd4xtTLyBV_5dmoOSjXIWLtJrESWVIxJ5BIfoUfYA/edit

gilded cradle
#

Currently it's not there, but I like to see it added this year.

slender iron
#

thanks @idle owl !

#

@ionic elk it'd be best if it worked the same way with a double tap to enter the bootloader

ionic elk
#

@slender iron Ok I'll look into making it do that. What about the drive name? Are you ok with our fork of the uf2 bootloader diverging from upstream so it can by FEATHERBOOT instead of ARCADE-F4?

#

@stuck elbow I'm recreating your snake game - is refresh_soon deprecated?

tulip sleet
#

@ionic elk the boot drive name can be board-specific. We load the bootloaders on our boards at the factory so we'd choose that. Worst case is a compile-time option or two board defs. I'd rather not diverge if we don't have to

#

i got buy-in from the MS group that we would try to keep the uf2-samdx1 repos sync'd, and it would be good to do the same here

ionic elk
#

Ok that makes sense, you'd just go in and change the config for your local copy at the factory.

#

no sense worrying about that, good point

slender iron
#

@ionic elk refresh_soon is removed in 5. you can omit it

slender iron
gilded cradle
#

Hmm, thanks @slender iron.

slender iron
#

np, thank you

gilded cradle
#

I opened an issue on github and let them know

slender iron
#

thansk

slender iron
#

any ideas why build sizes would be 200 bytes different between my computer and github actions? It outputs the same version of gcc

onyx hinge
#

@slender iron 200 bytes is a big difference. I observe small differences from build to build, though, even on the same system. I think it's down to the fact that (sigh) the lto linker involves random numbers for some reason (!?) https://gcc.gnu.org/bugzilla/show_bug.cgi?id=66305

#

two consecutive builds of metro_m0_express just now gave me: ```5396 bytes free in flash firmware space out of 253696 bytes (247.75kB).
5392 bytes free in flash firmware space out of 253696 bytes (247.75kB).

slender iron
#

I think it's that github actions is creating a merge commit

onyx hinge
#

oh, so it's not even building the same code as you? that could explain 200 bytes easily.

slender iron
#

ya, believe so

#

the run is marked as 5e789b3 but in the output HEAD is now at e9860007d Merge 5e789b38504846982a8cd7fa447297a51efc8352 into eb0ef3726f7c5857bcb3b75910ee445767b2af89

bright aspen
#

@onyx hinge @slender iron Perhaps the 4-byte changes are related to a date/time string?

slender iron
#

ok, now it is spot on for me

#

en us is off by 4

#

I'd believe linker randomness

#

@bright aspen I don't think we include the build date though the compiler may

tidal kiln
slender iron
#

I think the version string is git commit

#
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
Font missing character: รผ 252
Font missing character: รœ 220
Font missing character: รŸ 223
Font missing character: รถ 246
Font missing character: รค 228

0 bytes free in flash firmware space out of 237568 bytes (232.0kB).```
#

nailed it

#

its -4 on github actions ๐Ÿ™‚

#

did tinyusb get bigger?

#

gonna go for a run. will debug after

idle owl
#

@tidal kiln Yes please

manic glacierBOT
ionic elk
#

@tulip sleet for the arduino nano 33 ble, do you know if these lines in board.c will cause breakage if included after the filesystem is inited?


    // Errata Nano33BLE - I2C pullup is on SWO line, need to disable TRACE
    // was being enabled by nrfx_clock_anomaly_132
    CoreDebug->DEMCR = 0;
    NRF_CLOCK->TRACECONFIG = 0;

    // FIXME: bootloader enables interrupt on COMPARE[0], which we don't handle
    // Disable it here to avoid getting stuck when OVERFLOW irq is triggered
    nrf_rtc_event_disable(NRF_RTC1, NRF_RTC_INT_COMPARE0_MASK);
    nrf_rtc_int_disable(NRF_RTC1, NRF_RTC_INT_COMPARE0_MASK);
tulip sleet
#

@ionic elk does "bootloader" here mean the UF2 bootloader or the Arduino-supplied bootloader?

ionic elk
#

If you're referring to what I just posted I have no idea, that's nrf port code

tulip sleet
#

I don't know if the softdevice uses NRF_RTC1 for anything

#

maybe I just copied that from the Arduino startup code forthe board

ionic elk
#

do you have one of those on hand? Scott had me move the board_init into main, after the filesystem, and this is the only board that could be affected by the change

#

everything else is either empty or won't have problems

tulip sleet
#

I think you could delete the "FIXME: bootloader" lines. I copied those from the Arduino variant.cpp

#

they aren't relevant to the UF2 bootlaoder

#

I am more worried about moving board_init() to past the filesystem. On some boards it does some pretty low-level stuff

ionic elk
#

This isn't related to the bootloader stuff I was talking about earlier, by the way, it's the display thing

onyx hinge
#

@slender iron I wrote this up and welcome thoughts, but like so many things it's not anywhere near the top of my todo list.

Improving memory usage for labels in displayio:

My idea is to introduce a type GlyphRow whose data fields are basically
uint16_t x, y;
mp_obj_t font;
mp_obj_str_t* content;

The first glyph is drawn with its origin at (x,y). Subsequent glyphs have the
x coordinate adjusted by the width of the prior glyph.

A row of pixels can be computed efficiently from left to right by just
iterating over the list of characters in the string. If it has to be
drawn from right to left, then you'd also need to keep an "end of string"
and a "total length" pointer (plus extra problems that arise from the memory
storage of unicode in circuitpython being utf-8; this complicates backwards
iteration). Drawing from top to bottom or bottom to top just mean using a
column of pixels at a time but are otherwise like RtL or LtR. I think all
these cases can arise from screen rotations.

It doesn't matter whether the glyphs are in one Bitmap or not, they are
fetched from the font object by calling the get_glyph method. No auxiliary
storage is necessary for the string data itself.

Multiline text would consist of multiple GlyphLines, and the responsibility
for laying them out would fall to a refined adafruit_display_text. In this
case we might want to allow for str to be qualified with a start and end, so
that there's no slicing of the overall string; or maybe YAGNI.

Protocol-izing Group / TileGrid so that GlyphRow can be added is probably a
sensible step to take before introducing a third type that needs to implement
similar operations at the shared-module level.

ionic elk
#

I looked through every board in circuitpython and it's empty in every single one but this and the i.mx, which scott thought was fine

#

These are the only boards that had any content in the function:

  • capablerobot_usbhub
  • feather_mimxrt1011
  • feather_mimxrt1062
  • imxrt1010_evk
  • arduino_nano_33_ble

scott emptied the capable robot one, the i.mxs he says should be ok, so it's really just this nano left.

tulip sleet
#

@ionic elk, ok then

half sedge
#

Big Hug to @idle owl for the MLX90640 learn guide and the use of my example. So proud. Also nice picture.

idle owl
#

Thank you and thanks for the example!

manic glacierBOT
meager fog
quartz raptorBOT
tulip sleet
#

it's not the rtd slug

slender iron
#

its in the subproject settings

tulip sleet
#

aha

slender iron
#

it can be hard to change because those settings tend to crash the server

tulip sleet
#

yes, I am getting irregular 502's, but I did succeed in making it a subjproject

slender iron
#

I've had better luck url hacking to avoid the giant list

tulip sleet
#

snagged it; I"ll bookmark the edit URL as a sample; tnx

slender iron
#

๐Ÿ‘

ionic elk
#

@slender iron all set

slender iron
#

k, looking

manic glacierBOT
ionic elk
#

@slender iron want me to merge or is there anything else we're waiting on?

slender iron
#

the CI ๐Ÿ™‚

#

I can keep an eye on it

ionic elk
#

k

manic glacierBOT
serene warren
#

I never got a note about the Clue being in stock ๐Ÿ˜ฆ

#

Now, it's out of stock.

ruby atlas
#

i had no clue the clue was in stock either.

#

(not really, but still fun to say)

serene warren
#

Shop Bot indicates that two hours ago, it was in stock (11).

idle owl
#

@serene warren There was no notification sent out. 17 were put in stock. There will be more in tomorrow. Keep an eye out here as well - sometimes we post here before that notification goes out.

serene warren
#

I await with anticipation... Thank you @idle owl

idle owl
#

You're welcome

slender iron
#

@tulip sleet I did realize we should add a wait to limit the number of advertisements

tulip sleet
#

@slender iron that's a good idea. I think what I'm seeing is that the event handlers have a param that is a stale object, either on the stack or in the heap. But I'm not sure that is the case. The event handler list gets reset sometimes but not all the time. Still trying to trace it. The stack traces I am seeing are weird

#

I might talk to you tomorrow about it

raven canopy
#

finally!...

redis-server.service  loaded active running   Advanced key-value store 
rosie-rq-worker.service  loaded active running   RQ Worker For Rosie      

note: if you're going to include systemd unit files in a distro package, please have them work out-of-the-box.

manic glacierBOT
rugged blaze
lone axle
#

Would the circuitplayground library be expected to work as-is with the CPX+displayio firmware? I'm having some trouble importing it, but I'm not sure if it's really expected to work

tulip sleet
#

@lone axle it is frozen in, so it doesn't need to be in your filesystem. Are you getting memory errors?

lone axle
#

I got an error when I try to import it:

Adafruit CircuitPython 5.0.0-beta.4 on 2020-01-22; Adafruit CircuitPlayground Express with displayio with samd21g18
>>> from adafruit_circuitplayground import cp
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "adafruit_circuitplayground/__init__.py", line 29, in <module>
  File "adafruit_circuitplayground/express.py", line 49, in <module>
  File "adafruit_circuitplayground/circuit_playground_base.py", line 54, in <module>
ImportError: no module named 'gamepad'
#

but I did include the library in my lib folder

tulip sleet
#

that is ok, lib/ comes after .frozen in sys.path

#

but i'll check this

#

ok, this is a problem; gamepad was added to the lib, is turned off in the build for space reasons. I'll make an issue.

#

gamepad is a native module

lone axle
#

I ended up trying an older build as well:

Adafruit CircuitPython 5.0.0-alpha.5 on 2019-11-04; Adafruit CircuitPlayground Express with displayio with samd21g18
#

on that one I was able to import it without gamepad issue, but I did have to use a slightly different import

slender iron
#

what is gamepad used for?

manic glacierBOT
lone axle
#

I peeked for a second and it looked like it was holding the A and B buttons

#

self.gamepad = gamepad.GamePad(self._a, self._b)

tulip sleet
lone axle
#

This one works. Thank you ๐Ÿ™‚

slender iron
#

What do folks think about this as a #circuitpython-dev2020 recap post? ```Wow, 2020 has seen CircuitPython growing even faster than 2019 already. We had many more #CircuitPython2020 responses than last year, 5.0.0 is just around the corner, we have over 200 libraries, over 100 boards and the website just got a face lift! Thank you to every one for helping make that happen.

With #CircuitPython2020 we asked you to post your vision for CircuitPython in 2020 and so many of you posted. Kattni, in particular, pointed out that we should do something similar throughout the year. It is a great idea! So, as you use and explore CircuitPython this year, post your thoughts about the future of CircuitPython with the #circuitpython2020 just as we requested earlier this month. We'll leave the email open and blog your posts as we see them. If you have a specific feature in mind or want to see what we're working on then check out the CircuitPython issues here.

Here is a list of all the posts so far:```

#

(with pictures and links of course)

manic glacierBOT
manic glacierBOT
lone axle
#

Weird. The blurb from the bot transposed some of the hex color digits.

manic glacierBOT
#

This fixes some apparent hangs when using adafruit_ble_heart_rate as a central. The problem was that on a soft reload, the old event handlers were still in effect (with stale pointers) and the connection was not reset. Tested with the sample HRM program.

  • vm_used_ble, which tracks whether any Python code (as opposed to supervisor) has done BLE operations, was not being set in a sufficient number of places. In particular, central-only BLE wasn't being detected.
  • Call `bonding_reset()...
#

bitbangio.OneWire uses no-interrupt microsecond-resolution timing delays for up to several hundred microseconds to implement the OneWire protocol. It calls common_hal_mcu_disable_interrupts() and common_hal_mcu_enable_interrupts(). As of PR #2562, these functions don't turn off all interrupts, but instead use the sd_ critical section functions to allow BLE interrupts to be serviced and avoid SD faults.

So this may break OneWire on nRF when BLE is in use.

umbral dagger
lone axle
#

It was valid last time I tried, but that would have been back in the 3.X days.

onyx hinge
lone axle
#

Ooooo nifty, disable_concurrent_write_protection

umbral dagger
#

This is what I have in boot.py:

import digitalio
import storage

switch = digitalio.DigitalInOut(board.D9)
switch.direction = digitalio.Direction.INPUT
switch.pull = digitalio.Pull.UP

# If the switch is pressed CircuitPython can write to the drive
storage.remount('/', switch.value)
#

Seems either to not get run, or remount isn't working. In code it's always readonly.

#

Even on a power-on disconnected from USB (battery powered)

lone axle
#

It does need to be a fresh power up, instead of the reset button iirc so it's good if you are using battery and unplugging / replugging. It might be worth trying to open a txt file and write something to it from inside boot.py and/or turn on or off the built-in LED (if you have one) to figure out if boot.py is running or not.

umbral dagger
#

Yes. eject, disconnect USB, attach battery based power, and powerup.

#

I'm using a neopixel as a status indicator, currently it's color is set based on whether or not the fs is readonly. Always comes up readonly.

lone axle
#

Have you confirmed somehow that switch.value is changing with your physical switch?

solar whale
#

@umbral dagger have you verified the default state of the the pin? IIRC it will be True at power on if the button is not pressed.

umbral dagger
#

I've run the same code (not the remount) in the REPL and it reads the pin as expected. So yes.

solar whale
#

so are you pressing the button at power on or leaving it unpressed?

umbral dagger
#

Pressing it in hopes of having a writeable fs ๐Ÿ˜ฆ

solar whale
#

waht MCU are you using?

umbral dagger
#

Beyond that, I've put storage.remount('/', False) in boot.py with the same results.

#

SAMD51 (Feather M4 Express)

solar whale
#

and what version of CP?

umbral dagger
#

Adafruit CircuitPython 5.0.0-beta.4 on 2020-01-22; Adafruit Feather M4 Express with samd51j19

solar whale
#

ok -- I'll try to reproduce

#

I just tried it and switch.value is defaulting to True and the drive remains writable by via CIRCUITPY

#

but grounding D9 -- it comes up as read-only via CIRCUITPY - switch.value is False

#

so it appears tp work as advertised.

#

In my case it is connected via USB ....

#

@umbral dagger I ran your original code ```import board
import digitalio
import storage

switch = digitalio.DigitalInOut(board.D9)
switch.direction = digitalio.Direction.INPUT
switch.pull = digitalio.Pull.UP

If the switch is pressed CircuitPython can write to the drive

storage.remount('/', switch.value)```

umbral dagger
#

Hmmm... here's my code in code.py: try: with open(settings.LOG_FILE, 'w') as fp: # first, get rid of any previous log fp.write('Log\r\n') system.indicate(colours.RED) import file_handler logger.addHandler(file_handler.FileHandler(settings.LOG_FILE)) except OSError as e: system.indicate(colours.GREEN) print(e) print('Logging to serial')

#

It always throws [Errno 30] Read-only filesystem

solar whale
#

with D9 grounded ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.4-95-g0b761f60e on 2020-01-30; Adafruit Feather M4 Express with samd51j19

fp = open("junk.txt","w")
fp.write('test\r\n')
6

#

the did fp.close() opened D9 and rebooted ```jerryneedell@Ubuntu-Macmini:~/projects/feather_m4_express$ cat /media/jerryneedell/CIRCUITPY/junk.txt
test

#

are you sure your button is "normally open" ?? grasping at straws...

umbral dagger
#

Yes. The button works fine, reading the button from the REPL works fine.

solar whale
#

odd...

umbral dagger
#

With the switch removed and D9 jumpered to ground it still behaves the same.

solar whale
slender iron
#

@umbral dagger try putting prints in boot.py. they should appear in boot_out.txt

umbral dagger
#

@slender iron I added print('D9: {0}'.format(switch.value)) but nothing different in boot_out.txt

slender iron
#

hrm

#

please file an issue. we should make sure that is working for 5.0.0 stable

umbral dagger
#

I emptied boou_out.txt, booted on battery power, after that boot_out.txt contains: Adafruit CircuitPython 5.0.0-beta.4 on 2020-01-22; Adafruit Feather M4 Express w ith samd51j19 settings.py output:

slender iron
#

only one will run

umbral dagger
#

yup

#

oh

#

that's messed up

slender iron
#

its always been that way

umbral dagger
#

What about all the wifi projects that use a settings.py that gets imported

#

which is what I'm doing

slender iron
umbral dagger
#

doah.. right

#

ok, that explains what's goign on.

slender iron
#

๐Ÿ‘

umbral dagger
#

renamed it to config.py and things are behaving better. Thanks.

#

Where's that documented?

#

settings is a pretty tempting filename for ... um ... well... settings

slender iron
manic glacierBOT
manic glacierBOT
onyx hinge
#

@slender iron @ruby atlas just saw the review request, will hop on that now.

slender iron
#

thanks @onyx hinge

lone axle
#

It would appear there are a few more CLUE boards in inventory in the shop if anyone missed them yesterday and wants one. Probably going to go quick again though I would imagine.

modern wing
#

Just a friendly note -- clue boards are back in stock ๐Ÿ” 75 of them....wait, hold on....74. There. 74 are in stock ๐Ÿ”Ž

#

@lone axle Beat me to it ๐Ÿ˜‰

solar whale
#

got mine! 70 left

modern wing
#

Seriously, Clue is what got me to take a look at the Micro:Bit ecosystem. The original Micro:Bit, although perfectly appropriate for the target market, just didn't entice me -- but toss on BLE with a ridiculously sharp IPS screen? Why hello. ๐Ÿ”

lone axle
#

I loved playing with the microbit, but I did always wish for it to work like the Circuit Python devices where we could put the py file directly onto it rather than having to compile to hex or whatever it was first.

stuck elbow
#

there is a number of microbit-compatible boards

#

I have one with esp32 on it and 5x5 neopixel matrix somewhere in my drawer

#

bpi:bit

modern wing
#

I nabbed the new octagon robotics chassis. Something about making a BLE Clue with micro:bit-compatible Crickit....

timber mango
#

Nabbed a Clue a few minutes ago.๐Ÿ˜‹

manic glacierBOT
#

I built this and adapted a neopixel demo of my own to use it. It resulted in nearly doubling my framerate, according to time.monotonic, which is rather nice given that it's a fairly intensive on FP arithmetic. That means a LOT of performance improvement via this upgrade, nearly doubling my updates per second (18Hz -> 34Hz on a 96-pixel strip)

(the superseded neopixel release 4.1.0 did not work for me but---aside from the branch of code for parsing byte order as a tuple---it was not hard ...

pearl notch
#

Hi all. Iโ€™m looking for something fun to show at a Kโ€“8 science fair tonight with multiple Circuit Playground Bluefruits. @idle owl, you mentioned a project using 4 CPBs. Ideas, anyone?

#

Some kind of multiplayer game, perhaps.

onyx hinge
#

I just imagined playing the 'simon' color sequence game but with 4 CPBs that aren't even wired together. not helpful for getting something going for tonight though.

pearl notch
#

With part of it running on my Mac showing on a large monitor.

#

I made such a thing for Raspberry Pi with a nice webapp.

#

Kids played it at the same science fair last year and loved it. Iโ€™m just learning BLE, so this may need to be simple if I am to program it in the next couple of hours.

lone axle
#
Adafruit Learning System

Use Circuit Playground Bluefruit devices to create a colorful signal strength-based proximity detector!

Adafruit Learning System

Control NeoPixel colors and animation remotely over Bluetooth with the Circuit Playground Bluefruit!

Adafruit Learning System

Challenge a friend to see who can 'draw' the quickest over Bluetooth.

pearl notch
#

Quick Draw Duo might be just the thing. Thanks!

onyx hinge
#

@lone axle you beat me to the punch, I was about to share the quick draw link

onyx hinge
#

@tulip sleet what that merged based on it passing Actions, or should I let someone with a board verify the added pins function as expected? I assume Rev C is what is going out as alpha?

lone axle
#

Doesn't really involve multiple CPB devices though, it's 1 CPB "paired" with the phone at a time

pearl notch
#

Still, cool to show. Thanks!

#

I installed โ€œableโ€ on the Mac, which talks to the examples programs on a CPB.

lone axle
#

If you end up using the Android one, and run into any issues feel free to ping me in here. I made the Android one and am happy to help if you run into any trouble.

pearl notch
#

Excellent. Good to know you. Iโ€™m running it on Android.

tulip sleet
#

@onyx hinge right, rev c is alpha, and that PR will be reviewed by limor.

onyx hinge
#

okie

pearl notch
#

Hah! Quick Draw Duo is awesome!

solar whale
lone axle
#

whoa

#

Never seen that before, definitely tossing one of those in my next order.

idle owl
#

@onyx hinge I have someone lined up to test the PR you merged.

#

I'll have them test it anyway. No worries.

onyx hinge
#

@idle owl Thanks! I hope I didn't step on toes too hard.

modern wing
#

@solar whale I was thinking of getting one of those myself, but I figured I'd run with Crickit first -- plus that buggy bolts onto the microbit, whereas the Crickit is more easily accessible.

idle owl
#

@lone axle The VL53L0X PR was merged - please test it anyway once you have the hardware.

#

@onyx hinge It's on us, we should have commented on the PR.

#

@lone axle Moving forward, let's make sure we comment on PRs we have plans for.

solar whale
#

@modern wing but itโ€™s so cute ๐Ÿ˜‰

onyx hinge
#

@lone axle testing beats just looking at the code onscreen ๐Ÿ™‚ ๐Ÿ™‚

modern wing
#

It is! @solar whale --- and inexpensive since it's all inclusive of the chassis, motors, wheels, etc.

lone axle
#

@idle owl will do. I'll go through my list tonight and make comments on all of them indicating that I'll be testing soon.

idle owl
#

Excellent.

#

Thanks!

#

@tidal kiln Do you have a minute to talk Micro:Bit/CLUE? I'm doing the pinouts and saw you did the initial guide of the Micro:Bit and thought you might be able to help.

tidal kiln
#

@idle owl sure

idle owl
#

@tidal kiln I don't know how to describe the pads. I kind of fudged my way through explaining the edge connector.

#

same with 3V and GND

tidal kiln
#

should be very similar

#

looking at old guide to reminderfy....

idle owl
#

You didn't get into it much, it was much more of a broad stroke deal

tidal kiln
#

could just do same? or do you want more detail?

idle owl
#

Probably a little more detail

#

that's where I'm fuzzy

tidal kiln
#

are you trying to document all the small ones as well?

idle owl
#

Not yet.

#

Which is to say not unless Limor asks me to.

#

I'm unsure whether she wants that level of detail or "Micro:Bit compatible edge connector" is enough to get people started.

tidal kiln
#

i'd think that would be enough

#

but could make one for clue if needed

#

otherwise there's just the 5 big pads, which you can explain more simply

idle owl
#

right.

idle owl
#

I guess I wanted a little more than "Can be an input or an output"

#

but I don't know what they do beyond that.

#

Never did anything with micro:bit

tidal kiln
#

i'd have to do some looking around to figure out the other functions for the pins, on clue

idle owl
#

Eh. I'll deal with it then. I figured if you had some knowledge already, I'd take it

#

Limor usually fixes up the pinouts pages anyway, but I try to have something for her to work with

tidal kiln
#

you're wanting something more like "0 - is digital 0, but is also SCL, PWM3, ADC12, LASER_ENABLE_123, etc." ?

idle owl
#

Maybe? Except it's different for Arduino and CircuitPython I assume. Bleh. Not sure if there's a middle ground somewhere.

tidal kiln
#

should be the same, maybe different nomenclature

#

but it all comes down to what the specific pin on the nRF can mux to

idle owl
#

right.

#

Which may still be in flux even.

tidal kiln
#

ah. cause "alpha"?

idle owl
#

yeah., not sure to what extent.

tidal kiln
#

me either. but possible if something gets rerouted.

idle owl
#

That feeling when you run an upgrade command and it's doing way more than you expected it to and you're pretty sure your computer is going to explode on the other side. ๐Ÿคฆ

#

my SSL is broken. trying to fix it.

#

and now it's doing a million other things first.

modern wing
#

....imagine the same upgrade anxiety, but on an enterprise-class NAS array. You know it shouldn't take that long.

#

And then it completes....and you give it a side-eye.... "Ok buddy, how'd you drop the ball? What went wrong?"

idle owl
#

Yep. it removed something I was using. which means my dev environment is probably entirely borked right now.

#

:sigh:

#

ModuleNotFoundError: No module named 'pip'

modern wing
#

I'm sorry, for what it's worth.

idle owl
#

great.

#

Can't even install the thing I need because the installer doesn't exist.

modern wing
idle owl
#

Also Discord isn't sending messages very quickly.

#

Aaaaand it didn't just bork the env I was in. It's borked my entire machine.

#

I'm on mac.

modern wing
#

And i think it just doubled my message.

idle owl
#

And it's sending duplicate messages. Lovely.

tidal kiln
#

FWIW, stolen from arduino nrf core for clue:

D0  is P0.04 (GPIO D0 / AIN2 / UART RX)
D1  is P0.05 (GPIO D1 / AIN3 / UART TX)
D2  is P0.03 (GPIO D2 / AIN4)
idle owl
#

I haven't had Time Machine hooked up in a week. So I can't even restore.

#

A sense of dread is slowly setting in.

#

ok it looks like maybe pip still exists outside the venv.

#

I am now both dreading and confused.

#

It's like it upgraded things inside the venv maybe?.... I thought brew had nothing to do with envs though

raven canopy
#

venv [temporarily] changes environment variables, so that could have affected brew?

idle owl
#

crap.

#

ok

raven canopy
#

if its inside the venv, any "damage" should be confined there.

idle owl
#

ok creating a new one and starting over.

#

and hoping maybe it's contained.

raven canopy
#

does brew have things like apt/pip's list or show? that's a good way to see how/where things are installed...

idle owl
#

yeah brew list is a thing.

raven canopy
#

๐Ÿคž

#

discord be laggy

manic glacierBOT
idle owl
#

@raven canopy New venv is working. so I guess delete the other one and hope everything was contained.

lime trellis
#

is there a technical reason why CircuitPython_Register library never implemented SPI? I find the library super useful for I2C but don't know if @slender iron saw something that scared him away from finishing off the SPI side of things

raven canopy
#

smashing the old venv should be fine. but check that things are happy outside of the venvs...

idle owl
#

@lime trellis It's on the list, we simply haven't gotten to it.

#

Limor plans to do it eventually.

#

I'm unaware of a technical reason, but that doesn't mean there isn't one.

lime trellis
#

gotcha. I'll PR if I end up doing it

#

thanks @idle owl ๐Ÿ™‚

idle owl
#

@lime trellis Sounds great.

lime trellis
#

another question @idle owl. I have a handful of working-for-my-needs-but-likely-buggy circuitpython libraries on my github. Is there somewhere else I should list them so people can use them? I wouldn't say they're ready for primetime and I don't have the bandwidth to polish them right now

idle owl
#

You're welcome to submit them to the community bundle, but they'll have to be cookiecuttered and pass CI and so on... Hmm. I'm not sure past that. Ooh. You could file an issue on the CircuitPython repo, add a list of links to it, and then close it. And you can always continue to update it even if it's closed.

#

Then people searching CircuitPython issues for whether a driver exists or if someone is making it, will find your list.

lime trellis
#

that's a good idea. maybe there should be a more general list of half-baked drivers that people could contribute to?

idle owl
#

I'm thinking the same thing. But I'm not sure where it would go. Maybe a .md file on the community bundle.

#

Have to come up with a non-confusing name for the file/list though.

lime trellis
#

that'd work... then we could PR to to the .md. would that show up on the googles, though?

idle owl
#

Eventually, I assume.

lime trellis
#

I've been following the adafruit nomenclature for my driver repo names. Are you thinking that might make them look too official?

idle owl
#

I don't know of a way to force it, but I imagine if people search for it enough they'll find it.

#

As long as it doesn't say Adafruit_ on the beginning, you're welcome to call them CircuitPython_Foo.

lime trellis
#

cool cool. sounds good. I'll keep an eye out for that list on the community bundle

#

"works in progress" maybe?

idle owl
#

yeah that's pretty clear

prime flower
#

@lime trellis FWIW: I usually notice repos which are unpolished by a note at the top of their README file (sometimes they even have useful checkboxes on there for what's left for someone to pick up, I've contributed to one of those)

lime trellis
prime flower
#

I like the emoji

lime trellis
#

yeah very nice

prime flower
#

@lime trellis totally unrelated and more related to radio, but have you done any circuitpython work with the SX1262/SX1262?

idle owl
lime trellis
#

@prime flower LITERALLY what got me off on this library organization tangent. I have one sitting in my hand and I'm looking at the datasheet realizing it has the same command structure that I built for the SX1280

prime flower
#

AH, sweet. Yeah, it uses a different iface from the SX127x

lime trellis
#

yeah unfortunately :/

prime flower
lime trellis
#

know of a CP driver? haha

prime flower
#

I could probably look at semtech's reference code, but it's below low priority rn for me

#

What's higher priority would be doing an abstracted loramanager iface for circuitpython

lime trellis
#

yeah I met a guy with intimate knowledge of semtech die that told me its crazy they even sell the 127x given the performance of the 126x

prime flower
#

loramanager(rfm9x) / loramanager(sx1280) then loramanager.send

lime trellis
#

that would be very handy

#

ping me when you get the sx1280 part and I'll see if I can help

prime flower
#

I'll order one up from a tindie seller once CNY is over, havent seen a module yet but I haven't searched hard.

lime trellis
#

I gotchu! hang on lemme find the repo

#

let me know if you want a bare board and I can see if I have any lying around. There's commercial modules as well, but with different footprints grrr

idle owl
#

@lime trellis tag me on the PR please, so it doesn't get lost.

lime trellis
#

@idle owl you got it

#

thank you!

idle owl
#

You're welcome

#

@raven canopy do community bundle PRs show up on my lib PRs list?

#

Do the Adafruit bundle PRs show up, for that matter?

prime flower
#

oh sweet thanks maholli, bookmarked

raven canopy
#

community...hmm. let me look real quick. (i don't think so)

idle owl
#

@raven canopy If not, can we make that happen?

raven canopy
#

adabot can do all things... well, maybe most. ๐Ÿ˜„

idle owl
#

Well, yeah...

raven canopy
#

community should be included. let me check list_repos() results real quick...

#

oh yeah. its not included.... search:Adafruit_CircuitPython isn't going to grab CircuitPython_Community. ๐Ÿคฆ

#

throw up an issue?

lime trellis
#

PR sent. Thanks again @idle owl . I'll be eagerly watching what people contribute

tulip sleet
#

@slender iron hi - I am looking at increasing the number of connections, and did a bunch of experiments about the cost of increasing each parameter for sd_ble_cfg_set(). One thing you did is increase hvn_tx_queue_size from 1 to 10, which has a substantial effect on the amount of RAM per conenction (like 5kB). In looking for guidance about this, I see in DevZone that they don't recommend increasing this explicitly but instead increasing the GAP event_length. Do you remember anything about this?

manic glacierBOT
tulip sleet
#

i did write down what increasing each param costs in terms of bytes, and it will bein the comments

slender iron
#

@lime trellis I don't know of any technical reason why you couldn't do spi registers

#

@tulip sleet I wanted to have multiple notifications buffered

#

if you find it could be tuned better then thats ok

lime trellis
#

๐Ÿ‘

slender iron
#

I also increased buffer sizes

tulip sleet
#

you mean there or elsewhere?

slender iron
#

I think in the init stuff

tulip sleet
#

i think the implication is that changing the event length will change the hvn_tx_queue_size, but it's not clear

slender iron
#

to the sd

tulip sleet
#

yah, I"m in that routine.

slender iron
#

ยฏ_(ใƒ„)_/ยฏ

#

I wish I could see the source

tulip sleet
#

did you see it go too slow

slender iron
#

I was email back and forth with maureen from nxp/zephyr yesterday picking her brain about it

#

would love to get off the SD

#

one thing I'd like to add for the sensor stuff is an optional limit to the number of advertisements

tulip sleet
#

you bet. They talk about increasing some #define in the SDK headers, but don't really explain what's going on. Anyway, each new connection is about 9kbytes, and adding extra roles costs about 600 to 1k bytes each depending on the role. if i reduce the hvn queue from 10 to 1, then each connection costs about 4k bytes instead of 9k bytes. So that's why I was asking.

#

i'll keep studying DevZone, etc.

slender iron
#

I may have run into it when I was playing with stuff

#

maybe 2 would be best because it'd buy us time to queue a subsequent notification?

tulip sleet
#

anyway, even with the currrent settings, we can fit 2 more connections in like 56-64kb (instead of the current 32kb for the sd)

slender iron
#

how many are you going for?

tulip sleet
#

i don't understand why the event length would affect the queue lenght, but i'll see how changing one and not the other affects the ram allocated

#

so we need to reserve 1 for workflow. Then we have stuff like HRM + cadence + speed (could be two devices) + talking to music service. That's 5 (4 in use for that, 1 reserved for workflow)

#

that's a lot, we could peel back one (use a combined cadence+speed sensor)

slender iron
#

the music service is likely the same as workflow though

#

if there are a bunch of peripheral connections we'll be at the mercy of the centrals' scheduling

tulip sleet
#

same connection? I didn't know whether they would be paralllel. and we wnat to bring the music service connection up and down during development, but leave the workflow connection up

slender iron
#

I'd assume they are both on a phone

tulip sleet
#

are we central or peripheral for music?

slender iron
#

peripheral because the phone initiates

tulip sleet
#

k, got it

slender iron
#

just like current time service

tulip sleet
#

so do you think 32kB more is too much? stack is currently 40kB, I think, which is a LOT

#

could prune that

#

i don't have a good intuition about this; ideally we set # of connections in boot.py

#

like you suggesetd, but I'm not gonna do that for 5.0.0

slender iron
#

how much do we have total?

tulip sleet
#

256kB RAM

#

(better than 192kB on SAMD51x19)

slender iron
#

ya, and the imx rt 1011 is 128 with half as TCM

tulip sleet
#

that is going to be tight for larger programs

slender iron
#

yup

tulip sleet
#

high speed but not much ram, not the ideal combo

slender iron
#

that's why I'm thinking fast but small

#

the higher end parts have both

tulip sleet
#

yes, so 256kb -64kb for SD = 192kB - 40kB stack = 152kB heap + static RAM

#

maybe not so bad, and might be 60kB for SD, and stack could be 32kB or 24kB

slender iron
#

ya, I think that's ok

tulip sleet
#

i'll do a few more experiments

slender iron
#

40k stack is a bunch

#

๐Ÿ‘

tulip sleet
#

that was arbitrary, I assume

slender iron
#

I wonder how much stack the SD takes

#

should take that into account

tulip sleet
#

i'll see if they have a recommendation

#

also I don't know if central_role_count (currently 1) needs to be increased if you talk to multiple periphs or not. but that is only 600 bytes for each increment

#

ok, tnx for being a sounding board

slender iron
#

my guess would be yes

#

seems like its all just config for static allocations of everything

tulip sleet
#

each periph role increase is 1200-1800 bytes (it's not constant: a little weird); each central role increase is 650-1250. uuid table size is +16 bytes for each uuid (makes sense!) and attribute table size increases by 1k for each multiple of the default.

slender iron
#

oh! I have something to run by you

#

I'm debating whether we should use service + characteristic for each sensor value

#

like the app does now

#

or do a top level service with varying characteristics + descriptors

tulip sleet
#

hmmm...

slender iron
#

the sig version is characteristics + descriptors

tulip sleet
#

there are fewer objects and classes with fewer services

#

is it easy to determine if a characteristic is present now? If not i should be

slender iron
#

you can do hasattr

tulip sleet
#

could this be a single service with tons of characteristics, is this just for CPB or is it for sensor lab for many kinds of sensors

slender iron
#

many types of sensors

#

right, could be a single service with lots of chars

#

could be bad if it's all in one library

#

but likely easier to use

#

and can use our 16 bit service uuid

tulip sleet
#

yes, and maybe use some of the standard 16-bit uuids for various sensors

#

but suppose you have two, say accelerometers and want to read from both. how do you distinguish them and know their different characteristics?

slender iron
#

if we do that then we have to follow their model

#

you read the descriptor

tulip sleet
#

i just mean if they match nicely

slender iron
#

its not terrible now that I look at it

#

it depends a bit on whether we can to configure out of band or not

#

I'm not sure if using the standard buys us interoperability at all

tulip sleet
#

i don't care about that, really, I just care about smaller uuids

slender iron
#

I don't think that actually matters

tulip sleet
#

probably not

slender iron
#

we'll only advertise one thing either way

#
  • one service
tulip sleet
#

still thinking how we handle duplicate characteristics; i'm not sure there are many real-life examples.

#

if you had a product with two accelerometers, you would have diff characteristic for each

slender iron
#

bbq thermometers ๐Ÿ™‚

tulip sleet
#

with multiple probes? I should look on the thermoworks webiste

slender iron
#

yup

#

I think weber has some

tulip sleet
slender iron
#

is what I was thinking of

raven canopy
#

bbq therms are a win-win test. hardware works? you get yummy food as a reward! ๐Ÿ˜„

raven canopy
#

there are all sorts of DIY'd versions out there.

#

small victories are the best. i'm back to a working dev state on the RPi!

rosie-admin@ubuntu:~$ curl http://127.0.0.1:4812/status -w "%{http_code}\n"
[["Host","127.0.0.1:4812"],["User-Agent","curl/7.65.3"],["Accept","*/*"]]
401
rosie-admin@ubuntu:~$ curl -H "Authorization: Signature foobar" http://127.0.0.1:4812/status -w "%{http_code}\n"
{"busy":false,"job_count":0,"node_name":"ubuntu"}
200
rosie-admin@ubuntu:~$ curl -H "Authorization: Signature foobar" http://127.0.0.1:4812/run-test -X POST -w "%{http_code}\n"
{"message":"Endpoint requires valid json payload."}
406
manic glacierBOT
slender iron
#

I turned on the connect event extension thing too

meager fog
#

@fading solstice hey mrc - we're doing an audit of the adafruit github members and you're still on there. it seems you're takin' a break from reviews and PRs, so we're going to turn you into a 'external collaborator' for now, but the moment you want to come back as a member let us know and we can re-add you ๐Ÿ™‚

manic glacierBOT
lime trellis
#

@tulip sleet I'm struggling to build CP with custom boards since you implemented common.template.ld. I keep getting something like this:

collect2: error: ld returned 1 exit status
manic glacierBOT
lime trellis
#

actually, it's more commonly this:

/usr/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld:build-pycubedminiv01/common.ld:22: syntax error
collect2: error: ld returned 1 exit status
tulip sleet
#

@lime trellis we are using the gcc 9 release; not sure if that would make a difference here. Make sure you are starting from a clean build. Could you upload the build-.../common.ld file here? That's the expanded template file

#

yes, upload that common.ld file and I'll take a look

#

the board files changed a lot for this PR, so try to make your board files match a similar board

#

mostly they got simpler

lime trellis
#

yep I have done matching to similar boards. I have this sneaky suspicion that I'm not using a valid CHIP_VARIANT. uploading common.ld now

tulip sleet
#

@lime trellis The only thing different on that line from other similar files is the 0x00080000/2

#

that should be ok

#

is your code in a repo? I could try building it with the latest toolchain

lime trellis
#

not a public one. hmm let me zip and send it to you?

tulip sleet
#

ok

lime trellis
#

I appreciate the help. meanwhile I'm going to compare the old .ld file I was using to the common.ld

tulip sleet
#

@lime trellis I get the same ld error.

#

looking further...

lime trellis
#

thank you. I'm thrashing with it as well. Will keep you updated

tulip sleet
#

@lime trellis it seems to dislike the /2 , which is defined in ports/atmel-samd/mpconfigport.h. I changed it to >> 1 and it worked (but it didn't fit). That was a guess for boards without external flash. You can define your own value for CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE in your mpconfigboard.h.

#

it's supposed to handle all C operators, not sure what the issue is

lime trellis
#

oh wow. I was chasing down an entirely different path ๐Ÿคฃ thanks for solving that!

tulip sleet
#

@lime trellis, no, wait that didn't help; hold on

lime trellis
#

something is up here... I are you using some sort of regex for the common.template? I added a #define CALIBRATE_CRYSTALLESS and things started overflowing

tulip sleet
#

it doesn't like / or << , but I changed it to (128*1024) and it worked

#

you mean it's reporting not enough space?

#

paste the error

lime trellis
#

it's reported <0 for everything

tulip sleet
#

?

tulip sleet
#

common.template.ld uses Python Template to fill things in

manic glacierBOT
tulip sleet
#

what is your new mpconfigboard.h?

lime trellis
#

lots and lots of this:

./mpconfigport.h:184:6: note: in expansion of macro 'CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR'
     (CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_START_ADDR - CIRCUITPY_FIRMWARE_START_ADDR)
      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./mpconfigport.h:211:5: note: in expansion of macro 'CIRCUITPY_FIRMWARE_SIZE'
 #if CIRCUITPY_FIRMWARE_SIZE < 0
#

is the error

tulip sleet
#

what size did you give for CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE?

#

those are sanity checks when one of the values is too big

#

leaving no room for the firmware

lime trellis
#

I took out that define to model other boards. this is the mpconfigboard.h:


#define MICROPY_HW_BOARD_NAME "PyCubedMini"
#define MICROPY_HW_MCU_NAME "samd51G19"
#define CIRCUITPY_MCU_FAMILY samd51

#define MICROPY_HW_NEOPIXEL   (&pin_PB22)

#define MICROPY_PORT_A        (PORT_PA24 | PORT_PA25)
#define MICROPY_PORT_B        (0)
#define MICROPY_PORT_C        (0)
#define MICROPY_PORT_D           (0)

#define CALIBRATE_CRYSTALLESS 1
#define BOARD_HAS_CRYSTAL 0

// #define BOARD_FLASH_SIZE (FLASH_SIZE - 0x4000 - 0x0100000)

#define DEFAULT_I2C_BUS_SCL  (&pin_PA16)
#define DEFAULT_I2C_BUS_SDA  (&pin_PA17)

#define DEFAULT_SPI_BUS_SCK  (&pin_PA09)
#define DEFAULT_SPI_BUS_MOSI (&pin_PA08)
#define DEFAULT_SPI_BUS_MISO (&pin_PA10)

#define IGNORE_PIN_PA24     1
#define IGNORE_PIN_PA25     1
tulip sleet
#

NVMCTRL_ROW_SIZE is not defined for SAMD51's. This is kind of a pathological case. I need to fix mpconfigport.h

manic glacierBOT
tulip sleet
#

do this:

#define CALIBRATE_CRYSTALLESS (0)
#define CIRCUITPY_INTERNAL_FLASH_FILESYSTEM_SIZE (128*1024)
lime trellis
#

yep I did something similar and it just finished building

#

whew!!

#

do we need to define the NVMCTRL_ROW_SIZE based on internal vs external flash?

tulip sleet
#

no, the calibrate crystalless stuff stores a calibration value in a bit of internal flash. on SAMD21, NVMCTRL_ROW_SIZE (minimum size that can be erased) is 256 bytes. On SAMD51, it's 8192 bytes, and it's not called that.

lime trellis
#

ooo gotcha. ha- what an edge case

tulip sleet
#

I thought there were some other SAMD51 boards that don't have external flash, but there's something different in their builds that is not triggering this

lime trellis
#

yeah I have no issue building my board with external flash

tulip sleet
#

yeah, kicksat-sprite should have the /2 problem, i don't see why it's different

lime trellis
#

I have a couple of other custom boards I haven't submitted PRs for that are working fine.

tulip sleet
#

oh, maybe the LENGTH in that .ld line is negative after computation

#

or something like that

#

building kicksat-sprite now

lime trellis
#

kicksat-sprite wont have the crystalless edge-case, though,

tulip sleet
#

@lime trellis ok, the /2 problem IS due to gcc7 vs gcc9 toolchain. I mistakenly was using the gcc7 toolchain and hit the same bug as you. Switching to gcc9, and it works!

lime trellis
#

ah-ha! will do. Thanks for the help Dan

lime trellis
#

๐Ÿ™

onyx hinge
#

good (belated) morning

#

@slender iron I think we all imagined that there would always be a pretty long interval between needing to load audio DMA buffers, but there's an exception! A wave file's last buffer can be arbitrarily short, so if you loop it the time between loading the DMA of the last buffer to the first looped buffer can be small. In fact, the looping audio sample for the light saber project is a worst case, with just 1 sample in its last buffer. The glitches MAY be more severe or at least more frequent in 5.0 than 4.1, probably due to background tasks only happening once per ms. Any quick thoughts before I go in my own direction to work on it? (I don't know what that direction is yet)

slender iron
#

@onyx hinge ah! interesting! skip the last bit?

onyx hinge
#

@slender iron i.e., if number of samples in last block is less than X, just drop it on the floor? That seems implementable. Do you think anybody would notice that the last 1.5ms of their sound isn't played? It could increase popping if it cuts off the last "taper to 0". I could pass down a new flag that says that the sample will be played in looping mode, and only do it when both these things are the case (short block and looping)

slender iron
#

ยฏ_(ใƒ„)_/ยฏ

#

see how it sounds

tulip sleet
#

@onyx hinge an alternate fix for this is to tell people to make their looping samples be a multiple of block size. That would solve the problem for this project. The original sample could also be divided up into the largest equal-sized blocks that were possible (i.e. allow the DMA buffers be variable size), but that's a lot of code to solve a problem that might not be that important to solve

onyx hinge
#

Is "make looping sounds a multiple of 512 samples" (** for simplicity, it could be 128 or 256 depending on details) something makers of audio will get? If so, I'm all for it + some documentation ๐Ÿ™‚

#

"... or use audiomixer"

#
Registers in DMAC CHANNEL[0]:
    CHCTRLA:     0x00203B00  Channel n Control A
    CHCTRLB:           0x00  Channel n Control B
    CHPRILVL:          0x00  Channel n Priority Level
    CHEVCTRL:          0x80  Channel n Event Control
    CHINTENCLR:        0x00  Channel n Interrupt Enable Clear
    CHINTENSET:        0x00  Channel n Interrupt Enable Set
    CHINTFLAG:         0x02  Channel n Interrupt Flag Status and Clear
    CHSTATUS:          0x00  Channel n Status
``` finally set this up, it's pretty neat.  thanks @tulip sleet
#

can I write to a register this way, or do I have to do it via casting memory addresses?

tulip sleet
#

i think I checked this and you can only look at registers

#

learning to make good looping samples is more work than most people realize, to avoid clicks etc. Once they have to learn that make them a certain length is just another editing step, so I don't think that's terrible. If we document "you can loop anything but if you want it to be smooth make it a multiple of this size", I think that's ok

onyx hinge
#

in this case I think the wave files came directly from archive.org from a liberally licensed sample collection. it was designed to loop, but to be a particular number of samples wrong

#

(unless someone DID try to design it to be an exact number of samples, but was "off by 1" I suppose...!?)

manic glacierBOT
onyx hinge
#

๐ŸŒฎ and then using the laser cutter at the hackspace. probably dropping back in to hack on WaveFile some more this afternoon.

tulip sleet
#

@slender iron re

many types of sensors
right, could be a single service with lots of chars
could be bad if it's all in one library
but likely easier to use
and can use our 16 bit service uuid

You could monkey-patch the base service when importing more characteristics

manic glacierBOT
lone sandalBOT
slender iron
#

@tulip sleet ya, I'm not sure still. will finish up the advertising method first

tulip sleet
#

@slender iron I could make a release today. I'm still fine-tuning the increased number of connections, but that's the last thing I know of

#

but maybe we should not release on Friday ๐Ÿ™‚ ?

slender iron
#

I'm fine waiting

#

I don't know of anything super urgent

#

your fixes are nice and solid

#

my subclass fix may find some edge cases though

tulip sleet
#

the only strong reason is if we want to release the HRM guide today

#

prob fine to wait; we can test the increased connections build against multiple sensors before we release it

slender iron
#

๐Ÿ‘

manic glacierBOT
idle owl
#

@slender iron @tulip sleet Fresh 5.x CP installs now have an empty lib folder and a "hello world" code.py? Or am I misremembering that.

tulip sleet
#

they should

idle owl
#

ok

tulip sleet
#

but only if there was no CIRCUITPY beforehand. It won't add those files to an existing filesystem

#

or if you erase_filesystem()

idle owl
#

Ok. Hmph. Kind of complicates explaining install, but I get it.

#

Thanks

#

meh. Glossing over that I guess.

#

Otherwise it's a lot of "if this is the first time, but only if cp wasn't already installed, but if it's already been installed, or if blah blah."

solar whale
#

How do you put the UF2 bootloader onto the feather stm32f405?

slender iron
#

@solar whale I assume the same way you load circuitpython without it

#

the bootloader that is used currently is in ROM

#

(iMX RT works the same way)

manic glacierBOT
solar whale
#

Ok. There is a make flash that calls gdb. I was wondering if a j-link or something was needed.

#

But It sounds like I can use dfu-util

slender iron
#

ya, that would be my expectation

solar whale
#

Thanks. I canโ€™t try until next week anyway. On the road..

slender iron
#

np ๐Ÿ™‚

#

@prime flower @meager fog is there a way to post data to an IO feed with a unique id in case it gets posted twice?

ionic elk
#

Is there a good image of the Blinka snake I can use for our Boston Circuitpython Meetup?

split urchin
raven canopy
split urchin
#

holy crap that's actually really good lol

raven canopy
#

also, i can confirm that GIMP will open them if you don't have Illustrator available. ๐Ÿ˜„

stuck elbow
#

Inkscape

raven canopy
#

oh... or that. haha

#

its been a long time since i've used anything beyond Acrobat

stuck elbow
#

btw, that blinka in that artpack has a lot of unnecessary nodes

prime flower
onyx hinge
#

whee, I think it's time to learn about touchscreen on circuitpython.

prime flower
#

@slender iron But, you can only specify the 'value' metadata, not the 'identifier', I believe that's assigned on the server side...I'll ask justin

manic glacierBOT
#

Increase number of connections and other parameters for BLE.

Figuring 5 connections: 1 for workflow (not yet in use)
Connecting to 3 sensors + 1 other connection as a possible maxed-out application

  • Number of connections increased from 2 to 5.
  • Max number of peripheral roles increased from 2 to 4.
  • Max number of central roles increased from 1 to 4.
  • Increase size of attribute table by factor of 5 from default (was factor of 3).
  • Support to 75 128-bit UUIDs (was 32).
  • Decreas...
prime flower
#

ID is assigned by the server

slender iron
#

@prime flower I'm thinking about having multiple listening nodes that could report the same broadcast message. I can do it by having two feeds for it now

#

it'd also be cool to report discontinuities in a graph

manic glacierBOT
half sedge
#

@raven canopy Am I right in saying that all of those logo have been done by Phil? I remember an "Ask an Engineer" where he was talking with Guru from Pimoroni about logo, and I kind of remember Phil was the author of those logo. Is that right?

tulip sleet
#

there is an in-house artist

raven canopy
#

hehe. i'm not at all qualified for that answer... ๐Ÿ˜„

half sedge
#

So Phil is a fan of logo and did appreciate the one of Guru, but maybe not the author. Thanks.

tulip sleet
#

He may have roughed it out or did some photoshopping on it, etc. The finals are done by the artist.

#

oh, wait are you talkign about logos or Logo language??

half sedge
#

I have a question about old vs new BLE product and CircuitPython product. I am a bit confused. In the past there were BT product with serial interface and AT protocol that were maybe targeted to Arduino kind of board. I am talking about Bluefruit kind of product. And now we have those nRF52840 microprocessor at the center of some CP board.

#

Talking about Logos/graphics like the blinka.

tulip sleet
#

logo: ok, I'm not misunderstanding

onyx hinge
half sedge
#

So in the past there was Adafruit BLE friend, the UART version, the SPI version. And that was like Airlift to me.

tulip sleet
#

there are some products that are basically BLE coprocessors you can talk to over serial or SPI. Then we had an nRF52832 Feather that has an Arduino library for doing BLE. But that chip does not have enough RAM or flash to support CPy adequately, and it doesn't have native USB

half sedge
#

And there are all those serial encapsulation that were developped to control board, like to transmit button, color, ... (from your phone or from another board).

#

And that was "replicated" in CircuitPython.

tulip sleet
#

right, we developed an ad hoc protocol over Nordic UART Service that's implemented in the Bluefruit app

half sedge
#

So today, the recommendation would be to use nRF52840 if you want to do CircuitPython.

prime flower
half sedge
#

I mean there is no point in going for a coprocessor.

tulip sleet
#

@jeperl I think that may be a copy pasta bug

#

right, the '840 is hefty enough not to be used just as a co-processor. There are advantages to a co-processor, in terms of task scheduling and simplicity, but we were able to use the nRF libraries which hide the time-slicing going on underneath

onyx hinge
#

@tulip sleet I'll enter a feedback

half sedge
#

Thanks @tulip sleet I am not going to talk about Adafruit BLE Friend, and focus my little time to what can be done with the '840 as a core.

#

It is a bit assymetrical between the Wifi situation that now require a co-processor (while there was ESP32) and BLE that can be done with the '840.

tulip sleet
#

tnx - the emphasis is on nRF52840 going forward

#

ESP32 was not a good target for CPy because it doesn't have native USB. It also has a difficult architecture, and it has taken a while for the doc and software to mature.

#

Next-gen ESP32 has native usb

half sedge
#

I suggested in the CircuitPython2020 the use if Nina-FW to do BLE. It is the same fw used for wifi, but maybe that does not make sense from a developpement point of view.

tulip sleet
#

i am not sure if it can be simultaneous wifi and BLE

half sedge
#

No, it was said to me "not simultaniously".

tulip sleet
#

it is also a cost q: SAMD51+ESP32 vs just the nRF52840

#

and board real-estate consideration

half sedge
#

Yeah, sure.

#

I think the combo that I like is Feather '840 + Airlift. That could be the central node to connect BLE device to the internet...

tulip sleet
prime flower
#

@half sedge That's on my roadmap

#

@tulip sleet ๐Ÿ‘๏ธ Zigbee and BLE?

tulip sleet
#

it uses Zephyr instead of the SoftDevice libraries the earlier chips use

half sedge
#

Thank you all. I am going to continue focussing on what I know and structuring my talk.

tulip sleet
#

@half sedge There is a standard serial protocol for BLE coprocessors called HCI. Several different mfrs implement it. Same general idea as Nina

prime flower
#

I wonder if they're going to support LoRa next, the LoRa stack for Zephyr is good

tulip sleet
#

but it's a 2.4GHz radio, do people do lora at 2.4G?

prime flower
tulip sleet
#

@timber mango Hope FOSDEM is great! Thank you for speaking about our stuff there.

#

I just looked at the schedule and didn't realize it was this weekend

half sedge
#

It's only 20 minutes. ๐Ÿ˜‰ without any in between gap to connect the laptop and everything. So I most likely spend too much time on this. I prefer to manadge expectation. We will see later how good or bad it was. And I have 50 Blinka Stickers to distribute to anybody comming to me with any interest.

idle owl
#

@stuck elbow I have a quick question for you if you're around.

stuck elbow
#

@idle owl I am now

idle owl
#

Hey. If there were to be a Circuit Playground like library for CLUE, would you want the were_pressed feature in it?

stuck elbow
#

I suppose it would make sense to mimic the micro:bit libraries

idle owl
#

Is that feature in the micro:bit libs?

idle owl
#

Right on, alright. I'll include it.

#

@stuck elbow Thank you

manic glacierBOT
#
class GridLabel(displayio.TileGrid):
    def __init__(self, font, *, text=None, max_size=None, color=0xffffff,
                 width=None, height=None, **kwargs):
        if not text and not max_size:
            raise RuntimeError("Please provide a max size, or initial text")
        cwidth, cheight = self.calc_size(text)
        width = width or cwidth
        height = height or cheight

        self._width = width
        self._height = height
        self....
stuck elbow
#

@idle owl I wonder if it would make sense to organize the library the same way too

idle owl
#

@stuck elbow Same way as which, the micro:bit lib?

ionic elk
#

@tulip sleet do you know if this line in a debugger indicates some failure of TinyUSB? tud_cdc_n_connected (itf=itf@entry=0 '\000') at ../../lib/tinyusb/src/device/usbd.h:62

tulip sleet
#

@ionic elk I don't know if entry=0 is a legitimate value or not, sorry.

idle owl
#

There's a number of differences. And the main point of this lib is to expose all the sensor capabilities and such.

manic glacierBOT
#

This PR adds support to the STM32F4 Discovery board (a bit confusingly named, possibly because it was the first Discovery?). This board runs an STM32F407VG board with 1MB of flash and 192K of SRAM, and has a nearly identical pin layout to the STM32F411 Discovery board (this board adds the PB11 pin to replace an NC pin). Requires #2568 for some linker stuff.

Todos for this PR:

  • [ ] Need valid VID/PID (@tannewt/@ladyada)
  • [ ] USB not currently working

I'm not sure what the USB issu...

ionic elk
#

@gentle bronze do you need to add something to TinyUSB for it to support the STM32F407? It's virtually identical to the F405. nvm you've got an example for it and everything. hmm.

tulip sleet
#

@gilded cradle are you around? you build working CPy for CLUE, but master is not workign for me (display init problems)

old smelt
#

Okay - how about a Friday afternoon Hug Report for the whole CP development gang?

I'm currently writing some Arduino code to control a SparkFun Tsunami Super WAV Trigger over and I'm surprised by how arduous I find the process of compiling and loading for every minor tweak!!

Where's my REPL?!!

#

Thanks for making life easy with CircuitPython!

meager fog
#

@indigo wedge hihi i brought up a 1011 feather -USB works (ROM bootloader thingy) and JLink finds it

#

whats my next step ๐Ÿ™‚

tulip sleet
indigo wedge
#

@meager fog Darn, my boards are coming Monday ๐Ÿ˜„ Depends how much time you have, if you wanna code that kinda works and you wanna tinker then I'd advice to try tinyuf2 https://github.com/arturo182/tinyuf2 otherwise the uf2 branch of tinyusb should just work but it's not pretty https://github.com/arturo182/tinyusb/tree/uf2 (build for feather_mimxrt1011). As for CPY, I haven't tested the Feathers with https://github.com/adafruit/circuitpython/pull/2532 merged so unsure if that works, you can always check out the tree just before that commit and that code should work, you need to make a new board definition for the board cause it uses different pins than my Feather. Or just wait for Monday and I'll do all when I get my boards ๐Ÿ™‚

lone axle
meager fog
#

@lone axle there would be one example and it would work with any magnetometer/accel combo

#

the exmaple would not live in this library - it would live in a guide

lone axle
#

I see, Thank you.

manic glacierBOT
#

UICR fix

At least some CLUE's have NRF_UICR->REGOUT0 set to all 1's, which when the chip is in "high voltage mode" will make the outputs be 1.8V instead of 3.3V. However the nRF module on the CLUE is not in high voltage mode, so this register is ignored.

Nevertheless, we had code to fix this to rewrite REGOUT0, but it wasn't working because the update to nrfx v2.0.0 forced us to use a new nvm writing API, which doesn't let you write to UICR because it out of bounds of regular fla...

tulip sleet
trim elm
#

@tulip sleet It works! Thank you!

tulip sleet
#

yay!

onyx hinge
manic glacierBOT
#

maybe we can call it STM32F407 Discovery although its official name is only STM32F4 Discovery . TinyUSB does support f407, in fact this is one of the first board I used to tested with STM32 port, here is its BSP
https://github.com/hathach/tinyusb/tree/master/hw/bsp/stm32f407disco

However, F407 USB FS only has 4 pairs of endpoints, including control endpoints. Which means we can only have CDC ( 2 IN + 1 OUT) and MSC ( 1 IN + 1 OUT) only. Could you skip the hid, midi to see if that ...

manic glacierBOT
lone axle
manic glacierBOT
river quest
#

here's the DRAFT of the upcoming โ€œPython for microcontrollersโ€ newsletter that ships out tuesday at 11am ET via adafruitdaily.com - please send any links, news, events and more via an issue/PR, or @ us or really any thing ๐Ÿ™‚ we'll get it added! https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2020-02-04-draft.md

short phoenix
#

Is there any way to wirelessly code onto a feather? Or does it have to all be done by connecting it to a computer

main meteor
#

I suspect there are ways, even if one of them is just hooking a Bluetooth UART to the serial pins.

onyx hinge
#

I'm not aware of anything standard in circuitpython for doing it. micropython can do it as part of its "web repl", I hear; but circuitpython doesn't presently have a web repl.

bright aspen
#

@onyx hinge @slender iron I saw something about dropping samples in looping audio. That can be awful to one of my projects. I want to create some pure tones, so if my buffer has to be a multiple of both the wavelength and 512 memory might seem very small. I did not catch the context, so maybe it doesn't really apply to me or I can avoid the problem.

#

Oh, that use case does not read from a file.

orchid basinBOT
wanton fiber
#

theres no way _i2c_write can send more than 60 bytes, and also it doesnt support repeated-start

#

(even though it is attempting to be able to send more than 60 bytes)

manic glacierBOT
#

The 32-bit signed integer value used when converting seconds-since-epoch to structured time using time.localtime() causes a date limit of 2038-01-19 03:14:07 before overflowing.

Adafruit CircuitPython 5.0.0-beta.4 on 2020-01-22; Adafruit Pybadge with samd51j19
>>> 
>>> # test an integer value of 2^^31 (maximum 32-bit signed integer +1)
>>> mk = int(math.pow(2, 31))
>>> time.localtime(mk)
Traceback (most recent call last):
  File "", line 1, in 
OverflowError: overflow con...
tulip sleet
#

@short phoenix @onyx hinge @slender iron developed initial strawman support for editing over BLE in the current version of CircuitPython, and started a very simple app. We have plans to flesh that out in the future.

lone sandalBOT
half sedge
#

The demo part of my presentation went wrong. I could not connect my laptop to the projection system. And I had to start without my slide.

#

But I had a lot of positive feedback.

stuck elbow
#

@half sedge at fosdem?

half sedge
#

@stuck elbow yes IoT track. There was someone from Samsung doing Augmented reality with MicroPython...

#

But the demo failed due to WiFi issue...

stuck elbow
#

that's why I'm a huge fan of cables :P

tidal kiln
#

@wanton fiber curious about MCP2221A bug you mention in Blinka. please ping me when you can. thanks.

obsidian compass
idle owl
#

@half sedge Glad to hear you received a lot of positive feedback! It's good that you persevered through the technical difficulties.

short phoenix
#

@tulip sleet keep me updated then on that app!

idle owl
#

Not being as good with RGB hex as I am with tuples, I'm wondering why display_text and ostensibly displayio accept only hex. And whether there's a reason for it, or an easy way to make it take tuples as well.

#

It apparently also takes byte arrays. This helps me even less. ๐Ÿ˜„

wanton fiber
#

what do you consider a tuple? its a trivial exercise to break apart an RGB value (expressed in hex if you choose) to a format of your choice. it would be my pleasure to assist, seeing as im using a board with your name on it at this very instant

#

or is this a rhetorical complaint

idle owl
#

๐Ÿ™‚

onyx hinge
#

@idle owl It would be nice if more knowledge about neopixel would carry over to displayio Palette. but I think that you can use bytes() with a tuple to get something that you and Palette will both understand

idle owl
#

Oi, giant emoji

onyx hinge
#
b'\xff\xff\xff'
idle owl
#

It was not a rhetorical complaint. ๐Ÿ™‚

#

@wanton fiber Nice about the board.

#

@onyx hinge Odd but interesting.

#

I'm trying to add some things to a library and I do not expect a majority of those who will use it to be familiar with hex colors.

#

But at the moment, that or byte arrays is the only option.

#

The change would have to go into Palette though as far as I can tell.

#

So into core CircuitPython.

#

as display_text uses palette to set the color of the text.

wanton fiber
#

is it at least 24-bit RGB encoding? 1-byte R, G, B components?

#

(as opposed to 16-bit 565)

idle owl
#

The value argument represents a color, and can be from 0x000000 to 0xFFFFFF (to represent an RGB value). Value can be an int, bytes (3 bytes (RGB) or 4 bytes (RGB + pad byte)), or bytearray.```
#

I'm not sure of the answer to that question.

wanton fiber
#

yeah, 24-bit encoding, is the simpler (more accessible) of the two at least

#

each component R, G, and B is represented with an entire byte (0x00 - 0xFF) packed together RRGGBB

onyx hinge
#

@idle owl yes I also think a change in core would be necessary to accept a tuple directly.

idle owl
#

Which is way outside my wheelhouse.

onyx hinge
#

and also introduces a dependency for your guide

idle owl
#

The other dependency is already merged. ๐Ÿ™‚

onyx hinge
#

would you feel introducing but not explaining a function to convert (r,g,b) to the hex value?

idle owl
#

And it wouldn't be the first time I've had code that relied on other things.

#

Bleh. I guess I'd rather tell people to go google hex colors.

#

The point is to keep this code super simple.

onyx hinge
#

there are some very nice lists of hex colors

#

It's funny how different people run into the same thing at nearly the same time, I tried to use the "color wheel" effect on a displayio palette just yesterday

wanton fiber
#

thats a fun function to learn how it works ๐Ÿ™‚

#

very clever

#

and equally maddening when it doesnt work

manic glacierBOT
onyx hinge
#

@idle owl ^^ we can do it in the core with just 2 lines and a little punctuation

#

so this works for me now label.palette[1] = wheel(w)

#

afk, it's nice enough out for a walk (60F according to the computer!)

half sedge
#

@idle owl @onyx hinge About color and palette representation, there is the format expected by displayio and all the format supported by FancyLED.
I have not investigated, but it would be great to make be compatible.
I wanted to build a palette gradiant for displayio using FancyLED. Is that what you are working on?

idle owl
#

@onyx hinge Love it!

#

@half sedge I'm working on a library for CLUE.

manic glacierBOT
half sedge
onyx hinge
#

@idle owl I'll fix the PR so it builds, and then there will be one attached to the "checks" in about 20-25 minutes

idle owl
#

@onyx hinge Oh right! I forgot about the artifacts. Excellent.

manic glacierBOT
onyx hinge
#

I think this format is different than what FancyLED uses, which seems to be a custom type with red, green, and blue float values. This works with tuples of integers that are in the range 0..255.

#

a CRGB.pack() value should be what DisplayIO needs though

onyx hinge
idle owl
#

@onyx hinge Works!

manic glacierBOT
onyx hinge
#

@idle owl yay, thanks for checking. seems to make pewpewm4 not fit, though, so it'll need further finesseing

#

finessing ?

idle owl
#

Apparently. :/

manic glacierBOT
onyx hinge
#

apparently "finessing". thanks english ๐Ÿ™‚

serene warren
#

when trying to run the Weather Station learning guide.

main meteor
serene warren
#

Line 8 is about the Pyportal and I have copied and recopied the files.

#

I copied line 13 right out of the guide with the name issued by referenced OpenWeatherMap site. I even backed up to the original New York, US.

#

How do I "look" at an MPY file?

crimson ferry
#

Hopefully it exists somewhere as a .py file and you can look at that. Github for CircuitPython libraries, for example.

serene warren
#

How should the SD card be formatted? In the Weather Guide

onyx hinge
#

Normally secrets py will be a file you edit yourself. It needs to be filled with info about your WiFi and adafruit io accounts (and maybe other things depending on the project)

serene warren
#

Thank you @onyx hinge . I think I have a handle on the secrets file. It worked earlier to log me through my network and all (even initially had the weather for New York, US albeit in a small window on the Titano). It was when I downloaded the new Code.py (295 lines) and ran it that things went south. I'm sure it's on my end, no one else seems to be having issues.

tulip sleet
#

@slender iron I wrote draft release notes for the next beta so we could release it quickly when we decide we're ready.

manic glacierBOT
#

Hi Guys, sorry to reopen this topic. Is there a circuitpython module that includes this low power feature? I will either be using the Adafruit STM32F405 EXPRESS or the Adafruit M0 Express board and would like to be able to run off the battery supply if possible. Apologies if @crowecawcaw's code is the answer, I am relatively new to circuitpython, and not experienced enough to implement it if it is.

onyx hinge
#

I investigated "shoco" and "smaz" as possible alternatives to huffman encoding of translated strings. Both would add complication to the build process, and (without actually integrating them) it doesn't look as though they would have a memory size savings. "smaz" is tuned only for english and never released its compression catalog making script. "shoco" does have a script that will tune it for your input corpus, but (code + tables) size seems to be clearly bigger than huffman.

#

e.g., // 10431 bytes worth of translations compressed from huffman, vs 16907 bytes just for the same corpus compressed by "shoco"

main meteor
#

Good research, but pretty much the expected (if not hoped-for) outcome.

manic glacierBOT
manic glacierBOT
slender iron
#

Hey all, just a reminder that the meeting is tomorrow, Monday, as usual at 11am Pacific / 2pm Eastern here in the Discord voice channel. Notes doc is here and in a pinned message. We have another US holiday two weeks from tomorrow so expect it to be shifted then as well. <@&356864093652516868> https://docs.google.com/document/d/16ssd4xtTLyBV_5dmoOSjXIWLtJrESWVIxJ5BIfoUfYA/edit

manic glacierBOT
manic glacierBOT
onyx hinge
#

@slender iron thanks for the link. I independently came up with a dictionary scheme. Mine just uses the 32 most common digrams (best result out of several values I tested on zh_Latn_pinyin) and gets back ~400 bytes flash. I could get it to PR status this week, or I could hold on to it for when we "really need it". let me know what you think

onyx hinge
#

interesting, it seems that on nRF when a pin is configured as a PWM output but it's not actively being DMA'd, it is left floating rather than being driven with the last PWM duty cycle.

manic glacierBOT
manic glacierBOT
onyx hinge
idle owl
#

@onyx hinge Yep.

onyx hinge
#

I appreciate it!

manic glacierBOT
idle owl
onyx hinge
#

yes thank you!

manic glacierBOT
idle owl
#

@tulip sleet We did this in the Circuit Playground library for touch: python def _touch(self, i): if not isinstance(self._touches[i], touchio.TouchIn): # First time referenced. Get the pin from the slot for this touch # and replace it with a TouchIn object for the pin. self._touches[i] = touchio.TouchIn(self._touches[i]) self._touches[i].threshold += self._touch_threshold_adjustment return self._touches[i].value
With the list of touch pins in init. Comment in init says it saves a little on RAM. Is there any point in doing it this way in a lib strictly meant for a nRF MCU?

#

Or should I handle each touch pin in its own method?

#

There are three.

tulip sleet
#

you still have to not init them in advance, because you'll grab the pins otherwise. But no, not necessary for nRF

idle owl
#

Right, init them when they are called.

#

Is there any reason not to do it that way on nRF?

tulip sleet
#

no, and it makes it easier to understand if the libraries copy each other's styles.

idle owl
#

Ok.

tulip sleet
#

in the long run, there might even be a base class that's common to CP and CLUE

idle owl
#

Names will be different.

#

For the touch pins.

#

There is some crossover though.

#

Not, I think, enough to justify that though.

#

But depends on where things go I guess.

manic glacierBOT
#

Huzzah!

On Mon, Feb 3, 2020, 9:25 AM ladyada notifications@github.com wrote:

following up, with WebSerial now included, this is not important - we can
use the every day repl in a browser! it would be nice to have webusb
eventually but i don care too much anymore :)

โ€”
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<https://github.com/adafruit/circuitpython/issues/605?email_source=notifications&email_token=AAB5I44YWSWYVURRT4RHCM...

tulip sleet
#

yeah. I would say copy/pasting the code is fine, though, because it's already been debugged

onyx hinge
#

afk until the meeting

idle owl
#

@tulip sleet Sounds good to me.

#

Thank you

slender iron
#

@onyx hinge kicad can import eagle files

manic glacierBOT
onyx hinge
#

@slender iron I'll try that next time

manic glacierBOT
crimson ferry
#

Is there a resource to get started with WebSerial? Can't find anything in Learn guides or Adafruit Github.

manic glacierBOT
#

I still want to do this, I've just been busy with Sol's manufacturing plan.
Will loop back to it soon.

On Mon, Feb 3, 2020, 9:49 AM Dan Halbert notifications@github.com wrote:

@theacodes https://github.com/theacodes Is this still on your radar for
for 5.0.0 or should we move it to the 5.x.x or Long Term milestones? Thanks.

โ€”
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<https://github.com/adafruit/circuitpython/issues/2...

lone axle
#

They are using a microbit with espruino firmware to demo it, but should apply to Cicruit Python devices as well I believe

idle owl
#

@onyx hinge It passed! Any changes that I should test again?

#

Or can I approve it as is

onyx hinge
#

I don't think so

idle owl
#

nice

manic glacierBOT
ionic elk
#

I'm coming down with something this morning so I don't think I can make the meeting ๐Ÿคข but I've added my hug reports/status updates for text only

#

Hopefully will be back up at full speed tomorrow

slender iron
#

feel better @ionic elk !

ionic elk
#

thanks

#

imma lie down and drink a lot of tea

idle owl
#

I'll use it in the CLUE lib if it goes in.

onyx hinge
idle owl
#

YES

#

CLICK IT.

manic glacierBOT
modern wing
#

Good afternoon all you wonderful folks -- I'm happily lurking today.

#

Loud and clear

sterile bronze
#

lurking, just a general hug for all the great people doing great work