#circuitpython-dev

1 messages Β· Page 307 of 1

manic glacierBOT
onyx hinge
#

@half geyser because the displayio console can only show fixed width characters, and because storage is scarce, I think it was decided to avoid CJK characters altogether and force things into a little latin-shaped hole. UTF-8 would clearly be the coding method for any translation in CircuitPython.

#

however, I'd get the real dish from @slender iron if he's around

half geyser
#

@onyx hinge Ah, displayio. Always nice to realize there are other ways of looking at the data. This is what I get for exclusively using a serial console and not considering other usecases.

onyx hinge
#

hoo boy, github actions is not happy this weekend, and weblate's not making it better. Despite being set to only push changes after 24h, it has been seen immediately pushing change after change. Maybe it's related to this setting I changed so that it will "squash" multiple changes by one user? I don't know. Anyway, related or not, github actions is very slow to process the related PR and so that hasn't been mergeable all weekend

#

'night, talk to you all at the meeting tomorrow

slender iron
#

@half geyser ya. I think it was mainly the on-screen font situation that dictated it. totally open to separating that from having a translation though

manic glacierBOT
half geyser
#

Thanks for the suggestion, @tulip sleet . ^ That PR uses your trick of placing the RTC offset in a new, uninitialized section so that it persists across reboots.

manic glacierBOT
manic glacierBOT
#

See PR https://github.com/adafruit/circuitpython/pull/2116, which optionally provides a RAW HID device, enabled by compiling with `USB_HID_DEVICES = "RAW". This is not included by default. Since RAW cannot have a report id, you can't include other devices in the same endpoint. But it could be additional USB device. We don't currently have a mechanism for a second separate-endpoint HID device.

We were contemplating using RAW to have CircuitPython communicate as a special-purpose device ...

manic glacierBOT
#

Yes I have not forgotten about it :D
But since TinyUSB came a long its great to also profit from the increased flexibility and control that come with it.
I would also have thought to have it as a separate endpoint, I think its also solved in the Arduino core like that, didn't try raw in combination with a different hid device yet.
So what might be nice to have then is a way to create and manage multiple endpoints and assign each the device type the user wants?
Existing classes like keyboa...

ionic elk
#

@onyx hinge @half geyser as someone who spent an entire day trying to fit low res fonts of CJK on a 2MB nor flash recently, I can tell you it's not a super great idea right now. Not only does it fill up the ENTIRE flash filesystem for basically unreadably low resolution characters, it's also amazingly slow to fetch them out of the font. I chatted with Scott a bit and what it needs is a cache to store reference locations in the font file so it doesn't iterate through the whole thing every time it fetches a glyph.

#

Like, 5 seconds per glyph slow.

onyx hinge
#

We need a "all characters same size, all in one bitmap, but on flash/SD" abstraction. Then the label is based on TileGrid rather than Label, and memory usage is more tractible too.

#

but .. I haven't found the tuits to make that happen

ionic elk
#

I'd still like to work on it but it'd be on my own time so it's behind a long list of other stuff

#

Fitting every CJK onto one bitmap is going to be one big bitmap...

#

well, I guess that's completely subjective on resolution

lucid solar
#

What's the res you were using per glyph?

ionic elk
#

I found that the limit of readability was around 16 by 16

#

for CJK. You can go lower for Hiragana and Katakana for Japanese, 9pt was readable

#

There's a number of characters that don't have simplified chinese characters that are just bonkers to try and store in any kind of readable resolution. ε›Š is probably hard to read even in 16x

#

heck it's hard to read right here on discord

lucid solar
#

yeah!

#

I can confirm 16x16 is the only realistic size we can use.

manic glacierBOT
#

Just chiming in here with some extra context: The VCP TX/RX pins can be connected to the Morpho connector on most Nucleo boards. They aren't currently exposed in Circuitpython because I don't expose Morpho connectors through Board (since they don't even have soldered pins most of the time), and assume that if they want to use it they need to access it with Microcontroller.

ionic elk
#

@lucid solar I think the end goal for CJK is probably an SD card solution. I don't know exactly how that would play into translations. 16x CJK doesn't actually fit on a 2MB nor flash, it's a smidge too big - you have go just under the readability limit to get it on there, which was why I got so frustrated with it.

lucid solar
#

I'm thinking about some compression

ionic elk
#

well that and that my flashcard app took 40 seconds to load every card πŸ˜‘

#

that was also sub-optimal

lucid solar
#

Not traditional compression though...specialised for this use case

idle owl
#

@tulip sleet Thanks for the suggestion on the LED animations PR. I replied with a question and suggested change to your suggestion.

lucid solar
#

a ton of the glyphs have whole lines that are either black or white

ionic elk
#

That's an interesting idea

lucid solar
#

I watched some videos about how they made gameboy sprites and all the hacks for that...

ionic elk
#

Hmmm. Something that just encodes the starts and stops for black and white, maybe?

#

Assume white at edge, with an even number of changes

lucid solar
#

We'd have to analyze the data.

#

see what patterns there are.

#

We could probably also just have a subset of the font to include per locale.

ionic elk
#

These were the ones I was working with

lucid solar
ionic elk
#

It probably changes a lot depending on whether it's serif or not

manic glacierBOT
#

Yesterday I read through the short ninja build manual and wonder if it's worth using the depfile feature that automatically discovers required header files by using gcc -MM -MF $out.d ... to write out all required headers for a given C file. Using depfile could help in several ways:

Besides eliminating the need to specify the implicit header dependencies for an given C file using | foo.h, it also makes the process more robust by ensuring no header files fall through. For example,...

#

I've been experimenting by directly modifying the build.ninja file and can get past the genhdr/qstrdefs.enum.h error, but I don't trust the generated file is corrected because I haven't yet corrected for all the modified paths in the $include_pre, etc. Which is worrying: the ad-hoc sed commands, clearly are not fault tolerant and I think the sed functionality should be merged into the python later. What do you think?

ninja_required_version = 1.1

# These variables are...
#
[adafruit/circuitpython] New branch created: audiocore\-rawsample\-sinewave
ionic elk
#

@slender iron man, this mcu_pin_globals table has a LOT of C magic around it. I'm pretty stuck trying to get the actual pins out of it - I'm not grepping any locations in the code where that's done directly.

#

There's all this generic "table" struct stuff from Micropython, so I'm not even sure what its actual organization is. Is all that documented somewhere? Or is it just something you get used to as you go?

slender iron
#

@ionic elk @onyx hinge you should definitely talk to joey castillo about the CJK font stuff

ionic elk
#

Yeah I've been meaning to I kind of put the project down for a little bit

slender iron
#

@ionic elk I think it's an array of structs

onyx hinge
#

I may go text only on this meeting, my 3d printer is printing and it's not one of those silent ones

ionic elk
#

focused on my robot stuff isntead

#

@slender iron I'm just going to break and look at it under the debugger

onyx hinge
#

.. are we going to try this new video in "voice chat" feature that I saw discord plugging last time I restarted it?

ionic elk
#

??

#

voice cht

slender iron
#

@onyx hinge, we could

thorny jay
#

Let's say I am lurking once again, as I am required to do sport, but this time there are a few hug report in the meeting document.

slender iron
#

@ionic elk the pin table is type mp_rom_map_elem_t[]

onyx hinge
#

hm I connected to the voice channel and the "video" buttno is there but it says I "can't stream into this channel" so maybe it won't work out

slender iron
#

@onyx hinge try now

#
typedef struct _mp_rom_map_elem_t {
    mp_rom_obj_t key;
    mp_rom_obj_t value;
} mp_rom_map_elem_t;```
onyx hinge
#

yup now I am apparently streaming my face to the voice chat

ionic elk
#

so mcu_pin_globals.map.table[i].value but I think it needs to be cast?

slender iron
#

I think mcu_pin_globals[i].value and then cast

onyx hinge
#

no, there's no "pop in" that I could see either

timber mango
#

Ooooooo, video.

ionic elk
#

@slender iron you need the map, doesn't work without it

#

I think there's a bunch of stuff crammed into mcu_pin_globals

#

key information and stuff

slender iron
#

I think it's just key and value

onyx hinge
#
+mp_obj_t cp_enum_find(const mp_obj_dict_t *dict, int value) {
+    for (int i=0; i<dict->map.used; i++) {
+        const cp_enum_obj_t *v = dict->map.table[i].value;
+        if (v->value == value) {
+            return (mp_obj_t)v;
+        }
+    }
+    return mp_const_none;
+}
#

here's some code I have in an unsubmitted PR for factoring out "enum types"

#

it is looking through a dictionary (which the mcu_pin_globals is, after being cast), for an item where the "value" matches

#

it assumes that everything in the table is the same type, so that it can be cast to cp_enum_obj_t

modern wing
#

Good afternoon -- happily lurking today πŸ™‚

manic glacierBOT
#

@DavePutz I believe they are using PWM at a (relatively) low frequency to do the sequencing of the LEDs instead of doing the timing themselves with time.sleep or time.monotonic. I don't don't think the intent is to adjust the brightness.

@RetireeJay46 Am I correct? It's not a typical use of pwm with leds, but I don't see why it shouldn't work. Certainly deinit() should be releasing the timers so that seems like a bug.

Here's my run, modified to run on a CPX with the latest buil...

solar whale
#

Sorry. Missing meeting today

timber mango
#

More water for Scott to dump on his keyboard...

slender iron
#

np, @solar whale. next week's is on tuesday

serene warren
#

Lurking

sterile bronze
#

lurking

idle owl
#

<@&356864093652516868> Meeting notes doc is here - please add Hug Reports and Status updates even if you'll be attending the meeting, it's super helpful! See you in a couple of minutes! https://docs.google.com/document/d/15gBlvCmwW-f26oYTY5LI897XAfc5GpYlNC7httMFFqU/edit

serene warren
#

Hello Scott

manic glacierBOT
timber mango
#

How do I get video on Android?

onyx hinge
#

@timber mango no idea, I'm on desktop. It may not be enabled on all their apps yet, but make sure you have the latest update...

#

@prime flower you have to be in the circuitpythonistas role

#

we'll add you, but you have to agree to carry the card

prime flower
#

@onyx hinge ah, ok. Yes, I'll carry the card.

raven canopy
#

@ionic elk XPS, i presume? that camera location is a hint. πŸ˜‰

onyx hinge
#

@prime flower bam you're a circuitpythonista

ionic elk
#

what's an xps

raven canopy
#

Dell XPS laptop. guess not.. hehe

topaz quest
#

Someone else put that camera in the most awkward position you can imagine? o_O

onyx hinge
#

It looks like maybe it's the last person who turned video on who "sticks", so you may want to switch your video on/off with your mic

#

(it's brent for me now)

#

oh we're not even all getting the same people?

uncut nexus
#

Lurking today

turbid radish
#

Lurking, hug report in doc

timber mango
#

Text Only

tidal kiln
#

lurking

timber mango
#

@slender iron Could you please put me back in Circuitpythonistas?

onyx hinge
old smelt
#

We're #PrettyTypical !

timber mango
#

Thank you.

#

We are typical?? No way! :p

onyx hinge
timber mango
#

I am working on adding the UDOO Bolt to Blinka.

onyx hinge
tulip sleet
#

i was able to pop out the player so I can see the video and the channel at the same time. Maybe Scott already mentioned that.

onyx hinge
tulip sleet
#

i just meant for me, not necessarily for recording

onyx hinge
serene warren
#

Yea, Python on Makecode. Just the beginning.

onyx hinge
tulip sleet
onyx hinge
turbid radish
onyx hinge
#

22 authors? πŸ§‘β€πŸ€β€πŸ§‘πŸ§‘β€πŸ€β€πŸ§‘πŸ§‘β€πŸ€β€πŸ§‘πŸ§‘β€πŸ€β€πŸ§‘πŸ§‘β€πŸ€β€πŸ§‘πŸ§‘β€πŸ€β€πŸ§‘πŸ§‘β€πŸ€β€πŸ§‘πŸ§‘β€πŸ€β€πŸ§‘πŸ§‘β€πŸ€β€πŸ§‘πŸ§‘β€πŸ€β€πŸ§‘πŸ§‘β€πŸ€β€πŸ§‘

#

We can remove that name from the logs if you want ("weblate"); sommersoft suggested it too

#

(we're going to get a weblate section on that page soon!)

raven canopy
#

@past ether are you just listening (lurking), or do you want to participate/have notes?

modern wing
#

I see that too.

onyx hinge
past ether
#

Sorry, lurking @raven canopy

raven canopy
#

no apologies necessary! just wanted to make sure. πŸ˜‰

manic glacierBOT
onyx hinge
#

πŸ’― /2

serene warren
#

I see the same person (with the spider robot) regardless of who is speaking.

idle owl
#

@ionic elk Maybe try toggling your video off and on.

#

Because it's showing up permanently green for me as well.

serene warren
#

He's enjoying his beverage πŸ™‚

#

AHHHHH there it was and back to robot guy

ionic elk
#

dang it

#

Ill just leave it off till it's my turn

#

video likes me too much

tulip sleet
#

Lucian is green bordered even with no video

ionic elk
#

wat

#

WAT

serene warren
#

Early days of Google Hangouts was whoever is noisiest.

tulip sleet
#

maybe leave and come back

raven canopy
#

hehe. is it still beta? client versions per OS don't always track each other either, i think...

ionic elk
#

I left and came back is it still on me?

idle owl
#

Discord likes you, Lucian. πŸ˜†

ionic elk
#

WAT

#

HECK

onyx hinge
#

πŸ“« yay

prime flower
#

What happened to Hierophect!

raven canopy
#

i was about to say. Dan and his cat look like Brent. haha

modern wing
#

The video has live demo gremlins πŸ™‚

raven canopy
#

we're all about live demos around here right? gremlins and all.

onyx hinge
#

@timber mango we're happy to have you here!

timber mango
#

Thank you. πŸ™‚

ionic elk
#

can anyone else not hear him? I'm getting scott but not Jason

onyx hinge
#

I hear Jason fine

lone axle
#

I don't hear Jason

idle owl
#

I do.

onyx hinge
#

weird

lone axle
#

but I do hear Scott

timber mango
#

I do too.

ionic elk
#

Weird

timber mango
#

If you switch the "e" in "weird" to before the "d," it becomes "wired." Coincidence?

prime flower
#

@ionic elk is he muted for you in user volume settings when you click on him?

ionic elk
#

I checked that but it didn't seem to be it

#

and it's not disabled for anyone else is the funny thing, it's the only time it came up

lone axle
#

Same here (mute for jasonp is unchecked) and have heard everyone else so far.

serene warren
#

On my desktop I can't get back to the text.

modern wing
#

@ionic elk ....have you tried quitting discord and starting it back up? [it's been acting pretty funky for me, until I did that. less troublesome now, but not perfect yet πŸ™‚ ]

raven canopy
#

looks for talking neurons. they apparently escaped... πŸ‘€

ionic elk
#

It's not that big a deal - I'm chalking it up to quirky new software

#

Like I said it was only for jason

onyx hinge
#

my bug doesn't need to jump in line in front of anybody

prime flower
lapis hemlock
#

@onyx hinge It already has.

heady arch
#

I'm just watching. Very interestingπŸ˜‰

slender iron
#

πŸ‘

tidal kiln
#

may be collapsed?

gilded cradle
#

Yes @tulip sleet Web Bluetooth Dashboard

old smelt
#

@serene warren - can you share a link to that magpi article? Sounds like an interesting project.

serene warren
old smelt
#

Thanks!

serene warren
#

You are welcome.

onyx hinge
ionic elk
#

and I still can't hear Jason WACKY

#

what the heck mang

#

incompatible audio, or something?

slender iron
#

@steel beacon are you lurking and just listening?

lapis hemlock
#

@ionic elk what was the name of the intelligent servo?

serene warren
#

Hmmm, all speakers and video are awesome on my desktop. I just can't get back to text.

ionic elk
steel beacon
#

Yeah just saw it and wasn't sure what it was but it looked interesting

slender iron
#

πŸ‘ welcome!

lapis hemlock
#

@ionic elk thanks!

ionic elk
#

I literally can't use normal servos anymore, they're so nice

#

They're barely more expensive for torque, but they don't go as low as the PWM ones in terms of weak but cheap options. So less appropriate for super duper tiny robots

onyx hinge
#

stepping away for a second, will be back for in-the-weeds. @idle owl in case you need to take a note for a second

crimson ferry
#

@solar whale Does the Teensy 4.1 displayio speed issue seem to be at all related to rotation? I also notice it on my 135x240@90Β° Can test more also with the 240x240 and 320x240... edit: n/m, doesn't seem to vary based on rotation.

ionic elk
#

@idle owl I've been zoning out looking at it all meeting lol

serene warren
#

Wall is mezmorizing

modern wing
#

Sparkly ruby gus billie

#

@idle owl -- what's the approximate power draw for an LED wall like that?

idle owl
#

@modern wing I haven't done the math, but that seems like something worth knowing. It's running off of a 5V10A power supply, and if it's at 100% brightness with power injected in two places, and hits a solid color, it browns out the Feather into DFU mode. It's currently running at 50% brightness.

onyx hinge
#

did you consider using a PI GPIO to activate the reset pin directly? since if I understand right, that elimintes the bit of the software that's triggering the linux kernel bug

#

that's a nice size run!

idle owl
#

Everybody loves a big honking button.

raven canopy
#

@onyx hinge its an option. i haven't gotten to the hardware/GPIO interaction part yet, so have been focused on software approach.

modern wing
#

Loud and clear

ionic elk
#

Imma put this question in general again - does anyone have recommendations for a good editor or editor setup to create and modify rst documentation?

ivory yew
#

@ionic elk I've been writing RST for a decade an honestly I just use VSCode

ionic elk
#

I find using Sublime makes maintaining the column limit really annoying, and it feels like there's got to be some tool that does that for you

#

Does VSCode handle line breaks in paragraphs in an automatic way?

ivory yew
#

The column limit is a project-specific configuration. A lot of mine just did away with it. Nearly every modern editor has word wrap.

onyx hinge
#

I've been disappointed with vim's support for editing things within the //| comment areas too

ivory yew
#

There's a VSCode plugin that can do hard wraps

ionic elk
#

do you use it?

ivory yew
#

occasionally?

ionic elk
#

ok, I'll give it a try. See how it compares to my sublime setup

ivory yew
#

tbh I really dislike hard wraps as a requirement. It makes diffs silly.

ionic elk
#

I'd tend to agree but it seems to make reading things or posting things on Github really inconsistent

#

If you don't put in line breaks Github doesn't wrap it at all and just adds a huge scroll bar

tulip sleet
#

i have seen styles where each new sentence of doc stars on a new line, and you rely on the word wrapper to make nice paragraphs

#

so you can still use a line break to make shorter lines, but the diffs are a little easier to read

ionic elk
#

That's sort of my question, what kind of word wrapper does that? It's automatic, I guess?

ionic elk
#

I dunno this also goes for documentation written for super-strict projects like Zephyr which don't accept anything outside a very specific set of style rules.

tulip sleet
#

when i saw it, it wasn't automatic. if there was any existing automation, I'd guess someone wrote some emacs code to do it

thorny jay
#

It's a guide.

#

Where the basic documentation is function per function, what does it.

#

What about taking the static version of the dynamically generated code result?

manic glacierBOT
#

Yes, siddacious caught my intent. I wanted to create a device to check the frequency response of my vision in different parts of my visual field (straight ahead, quarter, and fully on the side periphery). And in doing so, I thought it might be interesting to have not just one LED blinking on and off, but to have up to five LEDs "walking" in sequence. But the intended use is irrelevant, the point of the Issue is that the timers are not released after doing "deinit".
And by the way, this ap...

old smelt
#

Have to host another a call at 2:30. Thanks and have a great week all!

onyx hinge
#

mp_printf(&mp_plat_print, ...) ?

#

(result, extra_info) = function(...., extra_info=True) vs result = function(...) # extra_info defaulted False

#

@lapis hemlock nice to see you!

raven canopy
#

could you raise an exception at the tail, and supply the result in the exception message?

onyx hinge
#

@raven canopy no, because then you don't get a return value

serene warren
#

Thanks for experience.

modern wing
#

That would work nicely

lapis hemlock
#

mp_printf(&mp_plat_print, ...) ?
@onyx hinge Thanks!

onyx hinge
#

It's amazing to have more than 2 dozen people interested in our weekly meeting.

raven canopy
#

well, you could:

try:
    foo = ulab.thing()
except ulab.ThatOneException as e:
    foo = e.args.find_results_stringy_type_stuff
    pass

not super clean...but doable. πŸ˜„

onyx hinge
#

@raven canopy you're in "worse than the disease" territory now

raven canopy
#

ouch. 🀣

modern wing
#

@slender iron One minor I noticed during the meeting -- your video was stuttering while everyone else was fairly smooth.

onyx hinge
#

I am signing off now

idle owl
#

@modern wing OBS probably. I'm convinced my machine is going to crash when I run the meeting next. like... hard.

modern wing
#

It easily could be that -- it wasn't a problem, just something I noticed.

#

I was doing a few test streams with multiple monitors, usb mic, and OBS recording + streaming -- and my machine got so hot it could fry an egg, then crashed hard.

idle owl
#

@modern wing But I did streaming and OBS and all of that on a 13" MBP with two 34" ultrawide Dell displays, and no issues. Could get that back up and running for streaming, but it's ridiculous that I even have to entertain that.

#

@tulip sleet Should I merge LED animations? I'm fine with that but didn't want to step on anything if you were going to.

slender iron
#

@inland tusk I disconnected you from the voice channel since you left your video on

modern wing
#

@idle owl I wish I could get that level of performance -- I have a late-2013 15" MBP (with nvidia graphics, i7, 16gb ram). And it's just...sigh...being an annoying thorn in my side when it comes to actually getting things done.

#

The performance I got out of it -- I could stream, not record. No external displays. And good luck if I recorded anything more than casual application use. A lightweight indie game? More than a few programs open? Video would get massively desynced.

tulip sleet
#

@idle owl go ahead; i didn't want to step on anything you were going to do

slender iron
#

@strong violet are you on here at all? the stub work I just did could be helpful in thonny

#

@low sentinel if you are around can you update your PR for new translations and then I'll merge it before anything else

#

@fiery silo meet, @onyx hinge and @ionic elk who are interested in CJK font stuff

#

(and scroll back for some recent discussion)

manic glacierBOT
ionic elk
#

Hi @fiery silo

#

We were discussing issues getting CJK unicode fonts to display in reasonable time periods, was wondering how that process was going on the open book. I was seeing 40s update times for just a handful of glyphs on an epaper featherwing, which seemed pretty off to me.

#

Was also discussing font compression with @lucid solar since a 16pt CJK font is larger than the nor flash that ships on most circuitpython devices

#

would love to hear your input.

solar whale
#

@crimson ferry I did not notice any difference due to rotation -- with the st7789 on the teensy4.1

low sentinel
#

@slender iron yeah. That button is still flapping back to denying maintainer edits. πŸ€·β€β™‚οΈ

manic glacierBOT
slender iron
#

@low sentinel sounds like a bug. ping me after you update and I'll merge asap

#

half the time it's been me merging stuff

#

I really appreciate your patience with it

manic glacierBOT
low sentinel
#

@slender iron it's fine - I might be feeling a little gaslit by github but all's well.
It’s updated. I've used --force few times in my career. I think this PR doubled it.

timber mango
#

@gilded cradle Did you see my post about pins on the UDOO Bolt?

slender iron
#

@low sentinel thanks! will merge as soon as CI is happy

#

Here is the notes document for Tuesday's CircuitPython Weekly meeting. Monday is a US holiday. 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/1YbprhPUrW1Tr1iMQszf3Hh231b5SAXxoHmjDRcRTRIM/edit?usp=sharing

onyx hinge
#

@fiery silo I have uninformed opinions about text rendering but you should pay more attention to the ones who have applications in mind

idle owl
#

I have this cool new feature where only one CIRCUITPY at a time shows up in Finder even with multiple boards connected, but resetting either makes it disappear and then the one I reset shows up.

warm pelican
#

I have a very interesting project that analyzes ultra sound signals 30 to 200 kHz running on a pyboard. Would would like to run on SAM51 board with Circuit Python for reduced power and size. The problem is the inline assembler doesn’t seem to be enabled for Circuit Python 5.3 Metro M4 Express. Used the fft written with inline assembly for MicroPython for my work. I know performance is not the main focus,but It would be nice if the performance tools were not locked out. I have seen in #1248 enabled for nRF Port.

tulip sleet
#

@warm pelican Currently we don't enable that by default. we have an FFT implemented in C code in the ulab module. Have you seen that?

#

it's similar to what's in numpy

#

that is enabled in M4 and nRF

#

it's only enabled by default on a few boards

#

but it's not too hard to do your own builds

manic glacierBOT
warm pelican
#

No I will. The other problem is high speed A/D input. Need min 400 K Sample per sec. I was going to implement in assembly since timed input not available in Circuit Python.

tulip sleet
#

yes, we have an issue for that but it's not an immediate priority

manic glacierBOT
warm pelican
#

Ya I asked for that more than a year or 2 ago.

tulip sleet
#

If you feel like rummaging around in CircuitPython, we would certainly welcome a PR. How do you do it in MPy?

manic glacierBOT
warm pelican
#

Mpy has a timed analog input, it blocks but work for me. It can be very complicated. A more sophisticated way would be use DMA control.

slender iron
#

@low sentinel merged!

tulip sleet
#

yes, we are thinking of DMA sort of like the PDM microphone input

tulip sleet
#

the SAMD51 ADC is unfortunately fairly flaky in certain ways: lots of errata, so it may be some work to get it working properly.

warm pelican
#

So I am more of an engineer than a programmer - making new builds are way out of my comfort zone - access to the assembler would be nice.

manic glacierBOT
#

Hmm, how would I access the pin members for that list? I don't really get the macro used when defining it, #define MP_ROM_PTR(p) {.u32 = {.lo = (p), .hi = NULL}}. Would it just be mcu_pin_global_dict_table[i][1] when iterating?

This is only for object representation D which is for 64bit architectures. On our embedded platforms its just #define MP_ROM_PTR(p) (p).

It should be [i].value because the table is an array of mp_rom_map_elem_t and has key and value fields.

warm pelican
#

That is a bit of bad new about the A/D. So maybe timed acquisition would be easier.

tulip sleet
#

it could work, it's just that it has various issues

#

we have a guide about doing builds:

#

you just have to add one line to enable the decorator

#

if you're willing to try this we can help you along and you can pick up the skill

warm pelican
#

Ok thanks for your help. I will check out the fft.

manic glacierBOT
#

Yesterday I read through the short ninja build manual and wonder if it's worth using the depfile feature that automatically discovers required header files by using gcc -MM -MF $out.d ... to write out all required headers for a given C file. Using depfile could help in several ways:

Besides eliminating the need to specify the implicit header dependencies for an given C file using | foo.h, it also makes the process more robust by ensuring no header files fall through. For exam...

fiery silo
#

Hi @slender iron, @onyx hinge, @ionic elk, I’m just seeing this ping, reading back now

fiery silo
#

@ionic elk so for the Open Book I had been dedicating a whole 2MB Flash chip to just the font support; to keep text rendering times fast, there’s no compression and a bit of wasted space, basically each block in each plane has a lookup table, so the code point is an index into the lookup table, and the value there is the address where the glyph data is stored

#

Lately I’ve realized it’s more cost effective to just have a larger main Flash chip and put the data that would be on the chip into a file on the file system and it seems just as performant

ionic elk
#

Is the code for your lookup table and such public?

fiery silo
ionic elk
#

@fiery silo nice. How small were you able to get your unicode font?

fiery silo
ionic elk
#

I never quite squeezed it onto 2MB which is why I was puzzled

#

Do you see any potential for doing all of this off an SD card, eventually? Or would that incur unacceptable latency issues?

fiery silo
#

It’s just under 2 megabytes

ionic elk
#

So does your incarnation of Circuitpython have 2 flash chips, or an internal filesystem + dedicated font flash?

fiery silo
#

I’ve tested it both ways, there are two subclasses for it (FileBabel and FlashBabel) and I found the performance to be just about the same

#

I don’t know about an SD card but reading from a file on the QSPI flash was honestly maybe a little faster than from the secondary SPI chip I had been using

ionic elk
#

Will the software need a re-write to support SD? Or is it just using the existing circuitpython filesystem implementation?

fiery silo
#

It’s just using the standard python open syntax, so I think it would just work

ionic elk
#

Nice. This all sounds great

fiery silo
#

OH but also, I should add, the 2 MB was only the basic multilingual plane, adding the supplemental multilingual plane made it more like 3 MB, and I know a lot of CJK glyphs are outside of plane 0

ionic elk
#

I'm not super concerned with that - I imagine most Kanji will be in the main section, right?

#

I'm not an expert on what lies in the main and supplemental planes

fiery silo
#

That’s my understanding, the most needed glyphs were put in plane 0 but also not an expert

manic glacierBOT
ionic elk
#

I'm trying to do a proof of concept for a Japanese language app - I'd like to support everything eventually, but I can always just bump up to an SD card or a bigger nor flash if I need to

fiery silo
#

Also the script in babelconvert supports adding in the supplemental planes if you want to try that

ionic elk
#

Great, sounds like you covered just about everything

fiery silo
#

(And conlangs for Klingon support πŸ™‚)

ionic elk
#

You have any more of your PCBs left in stock? I'd like to pick one up

fiery silo
#

I do have the e-book wing PCB in stock, I am planning to do a run of the Open Book PCB as well but don’t have those yet

ionic elk
#

Cool, well, I'll pick up an ebook wing and work with that for now.

ionic elk
#

Cheers man, thanks for answering all my questions

fiery silo
#

For sure! Let me know if you run into any issues πŸ™‚

ionic elk
#

Hopefully should be able to tackle most of it myself, I had missed your Babel reps

fiery silo
#

There’s also some bitmask stuff in the Babel lookup tables (right to left support, whether a glyph is 8 or 16 wide, nonspacing marks), think it’s reasonably well documented but feel free to open issues if you find anything that needs more work

ivory yew
#

nice to see you here, @fiery silo. Love the e-book project. πŸ™‚

fiery silo
#

@ivory yew good to see you here too, and thanks!! πŸ˜ƒ

gilded cradle
#

@timber mango No, I missed it (but just saw it when I looked back). This part that you are dealing with is the most complicated part and often involves research, cross-referencing, and some guess-work.

lone axle
#

Is there a correct way to handle when black formats an if statement but it makes pylint complain about bad continuation?

onyx hinge
#

@lone axle add a pylint ignore

manic glacierBOT
#

No, because right now we don't actually power off -- we need to keep Bluetooth running.

The plan is to check to see if it's the year 2000, and if so set the current time to the time of code.py (under the theory that the file was just [re]-created), then that should persist across reboots and crashes for months:

import os
import rtc
import time
system_rtc = rtc.RTC()
if system_rtc.datetime.tm_year == 2000:
    system_rtc.datetime = time.localtime(os.stat("/code.py")[8])...
half geyser
#

So @slender iron I'll change the _bleio I'll convert the anonymous option to an int that defaults to None, and if set it will only advertise for that number of seconds.

slender iron
#

@half geyser would that make it possible to advertise across mac update?

half geyser
#

@slender iron No, because if it's nonzero I'd set adv_params.duration to something other than BLE_GAP_ADV_TIMEOUT_GENERAL_UNLIMITED

slender iron
#

ah, and the mac is fixed for the duration of the advertisement?

half geyser
#

That would cause it to be fixed for the duration, yes.

#

The MAC is fixed to a duration that is specified, but Nordic defaults to 15 minutes if it's unspecified.

#

By making it an int rather than a bool, we can specify both the advertising duration and the MAC rotation duration to be the same.

#

Or we could add another parameter duration that takes the amount of time to advertise, and keep anonymous a bool.

slender iron
#

this indicates that the private address can change with the same advert

#

I'd suggest making it a bool that sets the duration to the remaining MAC lifetime

manic glacierBOT
#

When working with the latest beta (5.4.0 Beta 0), it seems like CP is running a little slower than it was in 5.3.0.

Code to test:

import time
start = time.monotonic()
for _ in range(1000000):
    pass
print("Time: {}".format(time.monotonic()-start))

Output (ran on an itsybitsy m4 express):
Version 5.3.0: 4.784 seconds
Version 5.4.0 Beta 0: 9.219 seconds

Can anyone else reproduce this?

slender iron
#

@half geyser I guess you set the duration of the mac rollover and then the advertising duration to less than that

#

I don't see a soft device event to tell us when the mac changes

half geyser
#

No, I don't think there is one. I think it's more a set-and-forget type deal. We could set the rollover time to be equal to the duration + 1, and then add a parameter to set the advertising duration.

slender iron
#

that's fine with me

#

we want to prevent advertising the same payload with the new address

half geyser
#

Yeah.

#

I didn't pay so much attention to that because I'll be rotating keys much more often than once every fifteen minutes, and I was going to stop/start advertising. But I could definitely see the appeal to codifying it in the API calls.

#

I'll go refactor now.

slender iron
#

it's something people may forget and I don't want them to screw it up

manic glacierBOT
slender iron
#

ok, I'm off. night all

manic glacierBOT
#

I see. I stumbled across this while trying to loop through setting NeoPixel code that was working better on the older version.

Is this newer way better? Or just improves background task handling while losing some of the overall speed? (I don't know much (if any) about the background tasks in CP, so to me it just seems like a net negative, but that is probably just due to my ignorance)

timber mango
#

@slender iron I know you are off now, but you will get this later. You can not protect people from themselves. Unfortunately, they are very often their own worst enemies. So, let us make the best Circuitpython that can be made!!

half geyser
#

I'm protecting me from me. I always forget these sorts of things.

orchid basinBOT
manic glacierBOT
manic glacierBOT
#

This sounds like it's related to low power features mentioned in https://github.com/adafruit/circuitpython/releases/tag/5.4.0-beta.0 ? If that's the case, is there an argument and possibility of having the programmer explicitly choose and enable that feature in code.py or boot.py to reduce the overhead on the majority of full power applications? Or is #2879 effectively an automatic version of this?

manic glacierBOT
#

tested this PR on a grand_central_m4_express
It works!

Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.3.0-187-g82024d078 on 2020-05-19; Adafruit Grand Central M4 Express with samd51p20
>>> import sdcardio_test
['hello.py', 'images']
>>> 

I had to make a few changes to the example since the Grand Central M4 does not use the statndar SPI bus for the SD Card. here is the example I ran

import adafruit_sdcard
import busio
import sdcardio
...
manic glacierBOT
manic glacierBOT
topaz quest
tulip sleet
#

@topaz quest It looks good! I had been awaiting an answer from Limor on the general idea, and she responded positively.

One minor q: you are leaving a blank line between the two SPDX lines. Is that just a style thing you are doing, or is it required by the spec? I'm just thinking about minimizing the size of small examples, etc.

topaz quest
#

It's not a requirement by the spec β€” it's just what reuse addheader generates by default β€” it keeps all the copyright tags together without spaces, then the license
so it can be removed after the fact and reuse lint won't complain at all

#

updating the pullrequest for testrepo now

manic glacierBOT
#

Here is another example of using text in a tileGrid: https://github.com/kmatch98/simpleTerminal

In modifying a text editor for use with CircuitPython (see the modules branch of the MicroPython editor pye), I developed a simpleTerminal class that creates a tileGrid of text with some additions for cursor control. It has a wrapper class editorTerminal that handles some VT100 styl...

#

Sorry, I misunderstood the common_hal routine. I thought it was ignoring the anonymous if there as no timeout, but that was just because I was missing some code due to the way the diff displayed. It's fine to not specify the timeout if anonymous is True, as long as the constructor's documentation says that, and says what the timeout will be. So I believe your old logic is OK, if it's as stated above; just add more doc to the timeout arg description.

#

Yeah, I did a bit of research it is advisable prat to disable the interrupt before WFI() to avoid race condition. WFI() doesn't require interrupt enabled to wake CPU. It is best practice to also all DSB() before WFI() as well according to ARM docs. Here is the implementation of zephyr

https://github.com/zephyrproject-rtos/zephyr/blob/master/arch/arm/core/aarch32/cpu_idle.S#L75

There is a other useful doc from mbed as well.
https://os.mbed.com/media/uploads/pateshian/wfi_wake_up_from_sl...

manic glacierBOT
manic glacierBOT
manic glacierBOT
timber mango
#

@gilded cradle I added the board detection that uses the check_board_asset_tag_value() function. It works and everything has passed PyLint. I think that completes the work on the adafruit_platformdetect library.

manic glacierBOT
gilded cradle
#

Thanks @timber mango. I'll review it today.

slender iron
#

@onyx hinge how does weblate merge changes back from git commits?

timber mango
#

Cool!

onyx hinge
#

@slender iron weblate gets notified on push to master and rebases its local changes

orchid basinBOT
#

Hi, thanks for submitting. Could you limit the features to those in this guide?
https://learn.adafruit.com/how-to-add-a-new-board-to-the-circuitpython-org-website/adding-to-downloads

The features list is used to automatically generate search options. Spelling is important so we don't end up with a list that is out of control (it has happened before) by having lots of variations. You can always put anything cool that isn't on the features list down in the description.

manic glacierBOT
slender iron
#

@onyx hinge it looks like CI is unhappy that the new ids are not in the language files

#

maybe we should remove that constraint

#

and assume translators will use weblate

timber mango
#

@gilded cradle I am having great difficulty finding pin information for the UDOO Bolt. I found something that looks like it might be what I need but am not sure. The left side is the Bolt pinout. Is this what I am looking for?

manic glacierBOT
onyx hinge
#

@slender iron I'll look

#

I added a language via the weblate ui

slender iron
#

that is why I brought it up

manic glacierBOT
onyx hinge
#

@slender iron I enabled an addon called "Update PO files to match POT (msgmerge)" and it looks like that has added the messages to nl.po in that pull request. I'll keep an eye open.

slender iron
#

k, perfect

#

I think that's what make translate uses

onyx hinge
#

I bet this affects only the case where weblate added a language and master added new strings at about the same time

slender iron
#

no fuzzy

onyx hinge
#

updated, thanks

slender iron
#

np

#

who wants to do the esp32s2 port review? @onyx hinge , @tulip sleet or @ionic elk

manic glacierBOT
#

hmmmm I thought this was functionally the same as what I was already doing in my own local makefile mods, but it actually breaks DEBUG=1 builds, at least for samd. Will revisit .. sometime.

../../py/vm.c: In function 'mp_execute_bytecode':
../../supervisor/shared/translate.c:98:66: error: inlining failed in call to always_inline 'translate': optimization level attribute mismatch
   98 | inline __attribute__((always_inline)) const compressed_string_t* translate(const char* original)...
onyx hinge
#

@slender iron I can look

#

port_fixed_stack returns some block of memory if that's the only stack the port can use, otherwise it returns NULL?

slender iron
#

πŸ‘ thanks!

#

yup

onyx hinge
#

how in the weeds do you want me to get about the build process?

slender iron
#

not very. I want to clean it up over time

#

this is "it's all hacked together as a foundation for refinement"

tulip sleet
#

i can take an uninformed look too

slender iron
#

you'll see why I want to switch to ninja

#

I call ninja from make for the idf

onyx hinge
#

Why mess with MICROPY_PY_REVERSE_SPECIAL_METHODS right now?

slender iron
#

because its a ULAB dependency

onyx hinge
#

I really wonder at why DWORD get_fattime(void) is in some port-specific file but .. that's not a new-ism

#

You needed to turn off REVERSE for this port?

slender iron
#

I need it on when ulab is

onyx hinge
#

I'm still not getting the connection to the esp32s2 port

#

or is it just cleanup-level stuff?

slender iron
#

ya, I probably just ran across it when turning things on and off

#

I can't remember now how I hit it

#

ulab has some constants that are missing without the reverse stuff

onyx hinge
#

okay

tulip sleet
#

could you set it on in circuitpy_mpconfig instead, depending on CIRCUITPY_ULAB?

onyx hinge
#

everything outside the port itself seems sensible

slender iron
#

@tulip sleet we should be able to enable it without ulab too

tulip sleet
#

yes, i just mean that you shouldn't need to add it to the individual board files, it can be forced on for ulab and otherwise is user choice

onyx hinge
#

shakes his fist at gitk why are you showing me renames that are nonsense? It's really not making it easy to review this PR

slender iron
#

Β―_(ツ)_/Β―

manic glacierBOT
onyx hinge
#

there, you now have a review

slender iron
#

thanks!

onyx hinge
#

sure thing

#

next in the weeds maybe you can outline your plans for the build system cleanup so I can better hold your feet to the fire about it down the road

slender iron
#

general idea is to extract all build logic into python files that generate ninja

onyx hinge
#

GNU Make is a devil I know, so I'll shed a tear when it's gone

tulip sleet
#

i would suggest adding lots of // TODO whatever in various places to make it easy to find what still needs to be done, but maybe that's too much for this review.

#

like in digitalio, etc.

slender iron
#

@onyx hinge make's logic is very confusing and we'd be better off with one system for all of circuitpython

#

ninja facilitates separating logic from the build dependency system

onyx hinge
#

sure, I'm not arguing against anything.

slender iron
tulip sleet
#

that's ok too, but if you start removing stuff when you start with an existing impl, adding even just // TODO will mark it, to know what to look at when working on an issue. I'm just saying how I would keep track of things I forced (like output-only digitalio, etc.)

onyx hinge
#

(if you find me making some kind of sunk-cost fallacy argument about build systems, though, please call me on it.
I've done that before in other projects)

slender iron
#

np πŸ™‚

#

@tulip sleet I can add TODOs if you like

tulip sleet
#

i think that would be good. It's just I had missed some stuff when doing the nrf port and didn't discover it until later.

ionic elk
#

@slender iron sorry didn't see your message I've been working on i.MX stuffs. Still want me to review?

slender iron
#

Nope, all good

lapis hemlock
#

@onyx hinge I have just merged a fix for your mysterious bugπŸ˜‰ Thanks for taking the time for testing and reporting!

onyx hinge
#

@lapis hemlock you're welcome. I ran across it by accident -- I'm curious what the fix was, so I'll check it out

lapis hemlock
#

Oh, no! You shouldn't see it😳

onyx hinge
#

oh, because "32000" could convert to type int16_t, ...

#

well at least it explains it! thanks again

manic glacierBOT
lapis hemlock
onyx hinge
#

ok, cool!

lapis hemlock
manic glacierBOT
#

I was reading https://developer.apple.com/accessories/Accessory-Design-Guidelines.pdf and page 126, section 35.5 recommends "an initial 30s of 20ms intervals" for advertising if I'm understanding this correctly.

I tried it on CircuitPython and it didn't behave. I've just run it again against 5.3.0 with 20200519 libs.

Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit Circuit Playground Bluefruit with nRF52840
>>>
>>> from adafruit_ble import BLERadio
>>> from adafruit_ble.adve...
solar whale
#

@slender iron Congratulations on the esp32s2 !

slender iron
#

πŸŽ‰

solar whale
#

are any available?

slender iron
#

what do you mean?

solar whale
#

do you know of any sources for a dev-kit

#

digi-key is still out

slender iron
#

looks like mouser has some

slender iron
#

digikey has both too

solar whale
#

what is the difference between the 1RI and the 1MI

slender iron
#

one has PSRAM and the other doesn't

#

the I is whether it has the antenna connector

lucid solar
#

R has

solar whale
#

odd -- I could have sworn they were out of stock a minute ago -- thanks!

slender iron
#

ya, me too

lucid solar
#

They were in stock 3 hours ago πŸ˜‰ I was checking for the modules...that's what I need.

lapis hemlock
#

@onyx hinge I forgot to ask yesterday: what is a JEplayer?

#

Is it something to do with owls?

manic glacierBOT
onyx hinge
#

@lapis hemlock it's an mp3 player app that runs on pygamer

lapis hemlock
#

Cool!

blissful pollen
#

@idle owl Thanks for your help getting my library into the community bundle last week. You mentioned about submitting it for the newsletter (which I realized I missed for this week - holiday in Canada through me off!). Is there somewhere I should submit the info about it and the how-to tutorial I wrote up?

manic glacierBOT
#

Not 100% related to this issue, but I think the issue related to busio in general is closed now so just wanted to make a note. I spent a few hours yesterday testing and verifying SPI, and I spent a few hours today verifying I2C. I'm fairly confident now that those two peripherals are stable and ready to be used by the general public. Good to see you're on UART, @hierophect :)

manic glacierBOT
manic glacierBOT
#

I'm sorry, I misunderstood the wording there.

eTaskConfirmSleepModeStatus() is called from vPortSuppressTicksAndSleep() when interrupts are disabled to determine if it's safe to perform the sleep. You could do something similar here, where you disable interrupts and then go through each subsystem to determine if there are any pending buffers to flush.

The approach taken in this patch is to just go ahead and flush the buffers.

#

@tannewt @xobs we shouldn't run background task with interrupt disabled. This particular issue is mentioned by TockOS (note 3) a few months ago https://github.com/hathach/tinyusb/issues/279 . And I overlooked it. The correct implementation should be an function to check if there is anything to run with the event queue of tud_task(), if yes, don't enter WFI(), re-enable interrupt, and loop over again.

#

@xobs I just reference to freeRTOS to just point out that interrupt disabled is needed before entering WFI() as your PR does. The freeRTOS only enter sleep mode in idle task which guarantee there is no active event queue that is not processed. So yes, draining the event queue is a must, or we can just check the event queue, and skip the WFI until next time as suggested below which I think is a good approach as well.

#

There are two approaches that we can take, and I think @tannewt should decide which approach they think is best:

  1. Allow background tasks to be run with interrupts disabled. This is the approach that's started by this patch, but there may be many other minefields in other code that requires interrupts to be enabled in order to function properly
  2. Add a new SHOULD_RUN_BACKGROUND_TASKS macro that polls each subsystem, similar to how RUN_BACKGROUND_TASKS runs each subsystem. This `SHOU...
half geyser
#

Can anyone tell me what time.time() is supposed to do? I've had several HardFaults when using it, and I'm mystified as to what its purpose is.

#

I've tried passing it rtc.RTC(), but it says it takes 0 arguments. If I give it no arguments, it says AttributeError: '' object has no attribute 'datetime'

#

Ah, I see. It takes the time from the default RTC, which is set by rtc_reset(), except that function isn't called in the nrf port for some reason so it never gets initialized. I'll submit a PR to fix that.

#

The worrisome bit is that it caused a hardfault, which means there's memory corruption going on somewhere else...

manic glacierBOT
#

On NRF, the rtc_reset() function is never called. As a result,
calls to time.time() return a cryptic error>

>>> import time
>>> time.time()
'' object has no attribute 'datetime'
>>>

This is because MP_STATE_VM(rtc_time_source) is not initialized
due to rtc_reset() never being called.

If CIRCUITPY_RTC is enabled, call rtc_reset() as part of the
reset_port() call. This ensures that time.time() works as expected.

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
#

To sum up current state:

Should I wait for both to be merged before preparing the equivalent change for https://github.com/adafruit/cookiecutter-adafruit-circuitpython/, so we know what the final form of it ...

manic glacierBOT
#

I guess it depends where the corruption occurs, the way I see it there are 3 areas, best to worst:

  • the fatfs gets corrupted - you can erase it from CPY and you're good
  • the CPY FW gets corrupted - you can reflash using tinyuf2
  • the tinyuf2 bootloader gets corrupted - you have to reflash using the NXP USB ROM loader

I think the chance that the chip itself is bricked is quite low, never seen that happen.

manic glacierBOT
tulip sleet
#

@half geyser something weird is going on with GitHub Actions. One of the subjobs was cancelled. I'm trying a re-run.

slender iron
#

@tulip sleet if it's an unrelated subjob I'd just merge it

timber mango
#

I love OPEN Source! If I need to figure out what is happening, I can just grab the source and look! There are no unknowns with OPEN Source. πŸ™‚ πŸ™‚

lucid solar
#

@timber mango I love that also...yesterday JonnyB found a bug in Mu, this morning I download the source, fixed it and did a PR.

tulip sleet
#

@slender iron there are random cancellations happening. The first try, the "test" job got cancelled (!).

#

i'll rerun after this batch finishes

idle owl
#

So if you have a library, and that library has a folder with files in it, and the files in it get imported individually, do you call those things "modules"?

lone axle
manic glacierBOT
idle owl
#

@lone axle Thanks, I didn't think to try to google it since I figured someone here would know. Wasn't certain if we had CircuitPython specifics or not.

slender iron
#

ok, @tulip sleet we'd need the test job to be ok

idle owl
#

@blissful pollen Yes! Please email links to anneb (at) adafruit.com with "Python for Microcontrollers newsletter content" or some other indicator of what it is you're sending. That's probably the easiest way to do it.

lone axle
#

I decided to take a look because reading your question it dawned on me that I tend to use "module" and "library" pretty much interchangeably but there was likely to be specific meanings for each that I should figure out and use so I don't potentially confuse anyone.

ivory yew
#

@idle owl yes. Roughly files = modules, folders = import packages

idle owl
#

@lone axle Yeah I understood it to be module is part of a library. But then there's the "driver" and "library" interchange in my mind at times, so...

#

Β―_(ツ)_/Β―

#

@ivory yew cheers

ivory yew
#

Things you upload to pypi are distribution packages.

manic glacierBOT
blissful pollen
#

@idle owl Thanks will do that

idle owl
#

@blissful pollen Thank you!

timber mango
#

@gilded cradle There is something wrong here. I keep getting File "./udoo_board_ids_test.py", line 8 UDOO_BOLT: ( ^ SyntaxError: invalid syntaxWhat is wrong?python 3 UDOO_BOLT = "UDOO_BOLT" 4 _UDOO_BOLT_BOARD_ASSET_TAG = "SC40-2000-0000-C0|C" 5 6 # UDOO 7 _UDOO_BOARD_IDS = ( 8 UDOO_BOLT: ( 9 _UDOO_BOLT_BOARD_ASSET_TAG, 10 ), 11 )

lone axle
#

@timber mango I'm not sure the larger context this code is from so maybe it's not the issue. But from that piece it looks like a dictionary definition is missing the quotes around they key.

#

I find myself making that mistake when I am switching back and forth between javascript python a lot.

gilded cradle
#

@timber mango , sorry. I updated my snippet. I should have used braces.

lone axle
#

Ah I see. UDOO_BOLT is declared as a string variable further up which is why it doesn't need the quotes inside the dictionary definition.

timber mango
#

@gilded cradle OK, it is done, works, passed CI!

#

I think I got all the changes you asked for. πŸ˜‰

#

@gilded cradle Now, I have to do the tough part of adding a board to Blinka. I am having a lot of trouble finding the pin information though. Did you see the image of that I posted here?

unkempt pulsar
#

I posted about this here https://forums.adafruit.com/viewtopic.php?f=60&t=165589&p=812615#p812615 and dastals suggested that discord would be a more effective forum.

Warning - before anyone tries this please make sure that you have a backup of your CIRCUITPY drive, and you know how to run a flash eraser specific to your CircuitPython board. e.g. https://learn.adafruit.com/adafruit-feather-m4-express-atsamd51/troubleshooting

I am using a Mac running 10.14.6 connected to an ItsyBitsy M4 Express running "Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit ItsyBitsy M4 Express with samd51g19"

I found that it I put this simple program into code.py, then my ItsyBitsy will not mount as a drive. To recover I had to enter bootloader mode, and erase the drive. Maybe there's a better way to recover, or there's something unique about my setup which causes this. I'm suspicious that the bignum code is not giving time to other code involved in handling the USB subsystem.

print("The waiting game")
i = 0
while True:
    print("Looping {}".format(i))
    i = i + 1
    a = 2**(65536*2)
timber mango
#

@unkempt pulsar I just tried your code on my ItsyBitsy M4 and it froze the board up. I can not connect to the REPL.

gilded cradle
timber mango
#

@unkempt pulsar I suspect there is an overflow of some kind since you are running the loop forever.

#

@gilded cradle The information I refer to is the left part of the top image.

unkempt pulsar
#

@timber mango note that this loop will execute very slowly due to the large exponent.

gilded cradle
#

Ok @timber mango. See if you can use libgpiod. As a fallback, I made a sysfs pin class recently that should work.

#

Also check if udoo has their own gpio library

manic glacierBOT
#

This PR enables one-directional UART to Busio, allowing for the definition of a UART line that has only the TX or RX pin.

Throws an error if you try to do this while also defining pins for flow control, since the two are basically incompatible as far as I'm aware. Also adds the reserved_uart table so the same peripheral instance can't be used twice, and fixes some bugs I found in the stm32 UART implementation while using it for reference (whoops).

resolves #2484

raven canopy
timber mango
#

@gilded cradle None of those are working for me to find gpios.

raven canopy
manic glacierBOT
raven canopy
#

not seeing a python library though for PICMG EAPI. 😦

timber mango
#

Binaries! UGH! 😦

#

Neither am I.

#

Oh, there are .lib files. That must be the libs.

ionic elk
#

CI whyyyyy

#

is git actions mucked up again today?

raven canopy
#

@timber mango i stumbled onto this, though it looks specific to the older UDOO Neo (and is quite stale): https://github.com/smerkousdavid/Neo.GPIO
it may provide some insight, but there are some scary messages in there (may brick the device, etc).

timber mango
#

@raven canopy Yes, UDOO support is somewhat less than what I wish it were. I overcame that and still got an UDOO Bolt though, because it was the least expensive way for me to get a fully packed x86 box (32GB RAM and 1TB storage).

old smelt
#

Hi @slender iron - I think I'm ready to do start the process for adding Evo M51 to CircuitPython. I'd like to get some guidance, first. Not so much on the mechanics - that's covered well in the learn guide. More philosophically...

#

When you have some time?

timber mango
#

@old smelt Are you adding a new board to Blinka?

old smelt
#

No. It's a Feather board

#

SAMD51

timber mango
#

Ahhh, OK. The more the merrier! πŸ™‚

#

Does it do different tricks than the Adafruit board?

slender iron
#

@old smelt I've got time now

timber mango
#

I would like to see boards that have more SPI flash.

#

Besides devices like PyGamer, PyPortal, etc.

manic glacierBOT
#

Note that this patch doesn't actually work, because you cannot run tud_task() with interrupts disabled, as it will possibly deadlock:

How often do you encounter the deadblock, I switch to your PR branch to try reproducing it. I know it is totally possible, but it is bit hard to encounter. I may just simulate it with other modified example, the goal is to check the corresponding registers to find a simpler alternative fix to https://github.com/hathach/tinyusb/pull/396 than invoking the ...

lucid solar
#

@timber mango I've just finished (this minute) routing a new board, that has SPI flash πŸ™‚

#

Up to 128mbit. The MCU is a STM32L433 with 256k/64k

ivory yew
#

@lucid solar nice! which flash chip?

lucid solar
#

@ivory yew W25Q128JVPIM TR

#

I think there's even larger than 128mbit, but the cost is crazy

ivory yew
#

that's cheaper than I expected.

#

What do you need all that flash for?

lucid solar
#

I don't specifically...it's just I want to have the option.

ivory yew
#

hehe

lucid solar
#

https://github.com/k0d/plink if you want to check out the board. I've not pushed the latest changes though with the external flash. Only just finished routing it.

ivory yew
#

cute, what's it do?

#

usb b mini is an unusual choice for a new design.

lucid solar
#

@ivory yew answering these in PCB-design channell

manic glacierBOT
#

One other thing I'm puzzling over is why the flags (0x01) appear if I run dir() on an Advertisement object.

Adafruit CircuitPython 5.3.0 on 2020-04-29; Adafruit Circuit Playground Bluefruit with nRF52840
>>> from adafruit_ble.advertising.adafruit import AdafruitColor
>>> ca = AdafruitColor()
>>> ca.color = 0x112233
>>> ca
Advertisement(data=b"\x0a\xff\x22\x08\x06\x00\x00\x33\x22\x11\x00")
>>> dir(ca)
['__bytes__', '__class__', '__dict__', '__init__', '__len__', '__module__', ...
timber mango
#

Discord set my last read pointer clear back to the 15th! I properly shut Cromium down.

timber mango
#

I've just finished (this minute) routing a new board, that has SPI flash πŸ™‚
@lucid solar Wow! I would be happy with 8MB SPI flash on regular or new boards like the Feathers. 2MB is just too small now! πŸ™‚

crimson ferry
#

2MB does get challenging for asset-intensive applications, but luckily so far I've usually been able to load only what's needed without moving to an 8MB board. It's RAM where I really need more than the 192k of most of the SAMD51 boards. 256k is good, but I know it's just a matter of time before that's not enough. Really digging the Teensy's 1MB.

manic glacierBOT
timber mango
#

@crimson ferry It is not just assets such as images that will require more flash. Some scripts will require more libraries too, which use storage, even if you do load just the ones you need.

crimson ferry
#

Good point, I do have to keep tuning my library loads too, though more for <2MB boards so I can use the same library load script for all devices (Teensy 4.0 only has 1MB of usable flash)

stiff pewter
#

@slender iron What's a good development board to get for generally testing with CircuitPython? I'm not too sensitive to cost. I know having a board isn't necessary for overhauling the build system, but it's nice to see the thing one is building actually work. During the hackathon your build target was feather_m0_express. On Read The Docs, the suggested ports for SAMD21 link to using the Adafruit METRO M0 which supports GDB debugging (of the firmware?) which seems useful for CircuitPython development.

idle owl
#

@stiff pewter I would suggest getting at least a SAMD51 (M4) board. Less memory constraints depending on what you might be interested in doing. The Feather nRF52840 comes with an SWD connector for debugging as well. The Metro M4 is also a good option if you want the debug option.

onyx hinge
#

Seconding what Kattni says, the Metro M4 and Feather nRF52840 both have the debug header from the factory. I would not choose an M0 board, they have limited capacity and "debug builds" (optimizer disabled) don't even fit on them. Most of us use J-Link debuggers, they have an "edu" model (hobbyist/non-commercial) model that is quite inexpensive.

stiff pewter
raven canopy
#

@stiff pewter same firmware for both. the airlift just has the library to use the ESP32 co-processor frozen into the firmware builds.

#

as he looks that up after the fact to verify. πŸ˜„

#

huh. i guess it doesn't have the library frozen in after all. but, still, same firmware.

manic glacierBOT
solar whale
#

@slender iron Thanks for the tip to recheck Digikey stock on the esp32s2- -- will have one this weekend to try out. I was able to get the esp-idf installed and complete the builds. Looking forward to some new toys πŸ˜‰

slender iron
#

great!

#

do you have a usb breakout cable? you could make one too

solar whale
#

I can make one -- I thought it had a micro USB on it, no?

slender iron
#

it's not connected to the native usb

#

so you'll be able to load firmware and see debug output but not see CIRCUITPY

solar whale
#

oh -- now i remember seeing that - thanks for the reminder.

#

so esptool uses the onboard microUSB but need a breakout to see CIRCUITPY after install.... which one is REPL on?

slender iron
#

REPL is on breakout as well

#

you'll be able to see that it's running but not use it

solar whale
#

good to know -- saved some head scratching.

slender iron
#

I've been meaning to make an adapter board for it

solar whale
#

in your spare time πŸ˜‰

slender iron
#

yup πŸ™‚

#

I find pcb layout enjoyable

solar whale
#

someday, I'll get inspired to give it a try.

slender iron
#

I recommend it πŸ™‚

manic glacierBOT
simple pulsar
manic glacierBOT
lucid solar
#

I've been meaning to make an adapter board for it
@slender iron I literallly have just finished designing one! Will upload to github in the morning.

manic glacierBOT
slender iron
#

thanks @lucid solar !

old smelt
#

Should I do the PR for our board as "me" or my Alorium Technology GitHub account? I actually have CircuitPython forked in both places. I was thinking from our Alorium account. Or does it even really matter?

slender iron
#

either way

old smelt
#

ok

#

I'll use my account then

topaz quest
#

hey folks, I'll send the cookiecutter PR tomorrow β€” I ended up finishing my sony remote build tonight, to put away the rest of the tools πŸ™‚

timber mango
#

@gilded cradle Is the information on the left side of that image enough to create a pin file for Blinka?

manic glacierBOT
old smelt
#

I get a truckload of files in frozen/ that have changed when I do a git status. I assume I do not add those for commit, right?

half geyser
#

@old smelt try doing git submodule update. Those changed upstream, but they're not automatically synchronized when you do a git pull.

old smelt
#

ok - will do

#

Still show up:

    modified:   frozen/Adafruit_CircuitPython_BLE_Apple_Notification_Center (modified content)
    modified:   frozen/Adafruit_CircuitPython_BusDevice (modified content)
    modified:   frozen/Adafruit_CircuitPython_Crickit (modified content)
    modified:   frozen/Adafruit_CircuitPython_DRV2605 (modified content)
    modified:   frozen/Adafruit_CircuitPython_DS3231 (modified content)
    modified:   frozen/Adafruit_CircuitPython_DotStar (modified content)
    modified:   frozen/Adafruit_CircuitPython_ESP32SPI (modified content)
    modified:   frozen/Adafruit_CircuitPython_FocalTouch (modified content)
    modified:   frozen/Adafruit_CircuitPython_HID (modified content)
    modified:   frozen/Adafruit_CircuitPython_IRRemote (modified content)
    modified:   frozen/Adafruit_CircuitPython_LIS3DH (modified content)
    modified:   frozen/Adafruit_CircuitPython_LSM6DS (modified content)
    modified:   frozen/Adafruit_CircuitPython_Motor (modified content)
    modified:   frozen/Adafruit_CircuitPython_NeoPixel (modified content)
    modified:   frozen/Adafruit_CircuitPython_Register (modified content)
    modified:   frozen/Adafruit_CircuitPython_Requests (modified content)
    modified:   frozen/Adafruit_CircuitPython_SD (modified content)
    modified:   frozen/Adafruit_CircuitPython_Thermistor (modified content)
    modified:   frozen/Adafruit_CircuitPython_seesaw (modified content)
    modified:   frozen/circuitpython-stage (modified content)
    modified:   frozen/pew-pewpew-standalone-10.x (modified content)```
half geyser
#

Are you on Windows by any chance?

old smelt
#

macOS

#

A bunch of those frozen submodules were copied over when i did the submodule update --init

half geyser
#

You can always do git checkout --recurse-submodules frozen to reset those. My initial thought was that it could be reporting the line endings. But you can just reset them, since you haven't modified them at all.

old smelt
#

Yeah, I haven't touched anything there.

manic glacierBOT
old smelt
#

thanks @half geyser - that was the ticket!

manic glacierBOT
#

extab is the exception table, which is used in unwinding support on ARM. I thought maybe the exception system of circuit python used this table, which is overflowing enough that it is no longer fitting inline. I noticed that atmel-samd stores the extab in a similar location, so I simply emulated it here.

If circuit python isn't using this data at all, it's safe to discard this section. We could also try building with -fno-unwind-tables which should also prevent the generation of this sec...

half geyser
#

@slender iron I'm looking to refactor watchdog as per your recommendations, but I'm not sure which approach to take.

#

Should I place it under microcontroller.watchdog, where it's a microcontroller-level singleton, or should I continue to create a watchdog top-level module?

#

Soft watchdogs that can be used to raise an exception with long-running code seem like they should go under a watchdog module, but I'm mostly focusing on hardware WDT blocks. Should there be two different ones then?

slender iron
#

@half geyser I think microcontroller and you can add an action attribute to switch between reset and exception

manic glacierBOT
half geyser
#

Alright. I'm basing it off NVM, since that's the other approach I see that's similar.

#

I'll convert everything over to be called watchdog and/or WatchDogTimer, and move it under microcontroller.watchdog.

manic glacierBOT
#

I encountered it maybe 20% of the time.

The problem always seemed to occur on the last packet as part of an MSC SCSI transaction (the same packet that causes adafruit/Adafruit_nRF52_Bootloader#120 interestingly enough) that gets stuck in the queue between calling tud_task() and WFI. If tud_task() is called with data in the buffer, then it will deadlock.

Thanks for the reply, I hardly got into it, I guess it ...

#

Sure.

I still need to rework my USB Beagle -- an inductor has decided it doesn't like its house on the PCB, and has started trying to separate from the PCB -- but I can test it.

This seems like a discussion for https://github.com/hathach/tinyusb/pull/396 though.

For this issue, I'm confused about what @tannewt means -- with the background_callback work, does that mean I should create a SHOULD_RUN_BACKGROUND_TASKS that includes a call to tud_task_is_queue_empty()? Or does the ad...

slender iron
#

@half geyser sorry I’m not at my computer. The module can be separate from microcontroller and be none of it’s not included in the build

#

Bedtime now

half geyser
#

@slender iron I just got done refactoring it to be under microcontroller 😦

slender iron
#

Oh no! Sorry! Will it fit on samd?

eternal meteor
#

Hello πŸ™‚

#

is METRO M4 EXPRESS AIRLIFT WIFI still a good board to order ?

#

or there is a newer

manic glacierBOT
onyx hinge
#

@eternal meteor that board runs the current circuitpython. if your project calls for wifi, it's an excellent choice.

manic glacierBOT
#

I put together a messy patch that implements what you requested. Documentation is unclear, but I wanted to make sure you were okay with the API before documenting everything again.

Example usage:

Simple usage:

wdt = microcontroller.watchdog.WatchDogTimer(5.0)
print("Sleeping for 3 seconds (shouldn't exit)")
time.sleep(3)
wdt.feed()
print("Sleeping for 3 seconds (also shouldn't exit)")
time.sleep(3)
print("Sleeping for 3 seconds without feeding WDT (should exit)")
time.sleep...
old smelt
#

Thanks @tulip sleet! Looks like the next step is adding to circuitpython.org? I'll check out the README

manic glacierBOT
#

I've updated the PR to use tud_task_event_ready() instead of running all background tasks. It does this because we don't have a SHOULD_RUN_BACKGROUND_TASKS routine yet.

Note that it keeps the bulk of the previous patches, because it uses common_hal_mcu_disable_interrupts() and common_hal_mcu_enable_interrupts() which don't handle recursion properly when the bluetooth radio is enabled. However, this version of the patch simply checks the tinyusb queue rather than running all backgro...

manic glacierBOT
tulip sleet
#

@simple pulsar I looked at your forum post about advertising, but I'm not sure what your question is. Note there may be scan responses going on between the advertiser and scanner, if they are set up: scanner asks advertiser for a second packet with more information, and it responds.

I don't know which scanning app you are using, but nRFConnect on Android is very good. Turn it to get landscape mode instead of portrait orientation: you see more info at once that way,

manic glacierBOT
bright aspen
#

@tulip sleet I want to replicate the kind testing you are doing @simple pulsar , maybe with two CLUEs. However, I am spread thin and reportedly lazy, so I'm not sure when I will do that.

onyx hinge
#

@slender iron I wish that we could switch to "#pragma once" for our header guards. The #ifdef-guard is standard but error-prone. #pragma is not standard, but it is supported in gcc, clang, and msvc. At $OLD_JOB we eventually concluded that -- aside from slavish adherence to standards -- there was no reason not to switch, and it reduced problems when people copied headers and didn't change the guards. Which ... I was just stumbling over this morning.

#

(the other reason is NIH, since #pragma once came from windows/dos first)

topaz quest
#

I didn't know GCC supported it… 🀯

onyx hinge
#

If I had to guess, I'd say we were on GCC6 at the newest when we made the decision to switch

topaz quest
#

there goes me and spending too much time in a bubble…

manic glacierBOT
onyx hinge
#

In the C and C++ programming languages, #pragma once is a non-standard but widely supported preprocessor directive designed to cause the current source file to be included only once in a single compilation. Thus, #pragma once serves the same purpose as include guards, but with...

#

since 3.4 wow

topaz quest
#

3.4! who on Earth stopped me from using that for the past 15 years?!

slender iron
#

@onyx hinge fine with me

onyx hinge
#

I'll confess, I spent many years on the "But it's not portable (waaaahh)" side of the argument. I was wrong.

slender iron
#

I’m ok with us being gcc and clang only

onyx hinge
#

@ionic elk I've run into something that's got me stuck. The ST HAL has some code for SDIO interfacing to MMC (SD) cards. I'm trying to use it. It's stuck in initialization, because it calls HAL_Delay(2U) but Hal_GetTick() never increases. @slender iron what's the over/under for this being related to lower power?

ionic elk
#

Sounds like an issue with whatever we have overriding Hal_GetTick, which relies on Systick which I assume is off or altered by low power

#

Actually no the override should be for Hal_Delay

onyx hinge
#
    at st_driver/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c:390
``` that's not what gdb is seeing
ionic elk
#

I had one, but maybe it got removed? Anyway it's weak linked so it should be replaced by something low power friendly.

#

There's a lot of stuff in STM32 land that uses HalDelay so I'm surprised that it hasn't broken other stuff already

onyx hinge
#

I can "return" from HAL_Delay and it gets stuck soon after, but not related to HAL_Delay

#
    at st_driver/STM32F4xx_HAL_Driver/Src/stm32f4xx_ll_sdmmc.c:1146
1146      }while(!__SDIO_GET_FLAG(SDIOx, SDIO_FLAG_CMDSENT));
ionic elk
#

That one I'd have to look at the reference manual for

onyx hinge
#

sort of suspect there's something about clocks that's missing, compared to the code I was being inspired by

ionic elk
#

You have the clock turned on for the SDIO, right?

onyx hinge
#

no, that may be exactly what's missing

ionic elk
#

One thing that STM32 does is that in the Init for most functions, they call a function called "MSP Init" which is a weak linked function that typically contains whatever setup stuff exists for your particular board

#

Just one of many parts of the HAL that want you to have stuff set up for only one devboard

#

We completely removed the MSPInit stuff, so the function does nothing, but you have to do all the stuff it normally does manually - turn on the clock, set up the GPIOs with the right altfunction, etc

manic glacierBOT
ionic elk
#

Check out Busio for some examples - I usually look at SPI, I think of it as my most "standard" module

onyx hinge
#

I was looking but missed the clock call

ionic elk
#

If you're using CubeMX as a reference, there's some file called HALmsp_init.c or something like that. It has the MSP functions for whatever board you selected in the Cube GUI, and it's a good reference of what various peripherals need set up beforehand

onyx hinge
#

yay now it can return from the constructor, but it doesn't successfully get the capacity (boo)

ionic elk
#

I tend to break out the clock calls into subfunctions since there's one for every peripheral instance

#

so you call them with a mask rather than a big if/else or case

#

@onyx hinge well it's a start

#

A good step for STM32 is to set up a catch for every HAL function that sees whether it's returning "HAL_OK"

#

A lot of the most common issues are ones where a HAL function is returning busy or is getting stuck inside the call somewhere at a flag check or something

#

ST debugging in a nutshell is basically stepping through the HAL functions trying to figure out what it's stumbling on

simple pulsar
#

@tulip sleet @bright aspen I'm not sure if I know what my quesiton is either πŸ™‚ Fundamanetally I'm not sure what the radio is up to. I've seen descriptions of advertising which sound like in a few microseconds it sends the same Advertisement over ch 37, 38, 39. My android tablet running the ble scanner shows distinct jumps every 5s which suggests what it receives is via a different channel so that suggest the nRF52840 is actually sending on ch37, then 5 seconds later ch38, etc. Is that the case? Perhaps this is all buried in the nordic docs? I've not yet delved into them.

#

@tulip sleet @bright aspen My current aim is just to optimise my settings having 2 or more adafruit nrf52840 devices do a 1:N broadbcast to each other. I'm trying to write a connection-less game. It works but the number of packets received for an N-second advertising period is very variable. I am scanning at the same time as advertising, btw. Another question for communication like this is is whether it's worth finding one channel that works well and sticking to it for a period of time / "session". I've seen some mention of a channel_mask for advertising that can be set. This might be a bit advanced for what I'm doing.

onyx hinge
#

oooh it's alive. I read the capacity of this SD card. It's 64GB which is also nuts. I have the HAL_Delay problem still remaining to solve (workaround of typing "return" in debugger is not good) though

simple pulsar
#

@onyx hinge Have you mounted a ~64GB filesystem on a CircuitPython device?

onyx hinge
#

@simple pulsar yes, but only after reformatting it as FAT32. It came from the factory as exFAT.

onyx hinge
#

hmmm slight addendum to that .. the current adafruit_sdcard code reads it as 29GB capacity

#

my work in progress code reads it as 64GB capacity

#

the numbers of blocks returned on each system are different by a high bit: ```>>> hex(57933824)
'0x3740000'

hex(125042688)
'0x7740000'

#

I can't describe how to format cards as FAT because I use Linux and that's of no use to anyone who wouldn't figure it out on their own

#

"run mkfs.vfat with appropriate arguments (don't delete your whole computer)"

manic glacierBOT
#

For instance, the following makes the audio output be 1V p-p at the output pins:

import samd
samd.reference_voltage_set(samd.ReferenceVoltage.V1_0)
samd.dac_reference_set(samd.DacReference.INTREF)
audio = AudioOut(...)

If this functionality is desired, I can continue to work on this PR.

This PR also includes the start of a (not properly divided out) API for enumerated types in Python that could reduce code size. A "cp_enum_obj_t" with convenience routines for finding a P...

lunar crown
#

@onyx hinge I think they are both sort of right. It sounds like the card is 64GB, but the maximum size of a FAT32 file sustem is 32 GB.

onyx hinge
#

both lines "should be" the card capacity, neither is about the formatted filesystem capacity

#

I'm not sure about the maximum size of FAT32, linux shows a filesystem capacity well above 64GB. ```/dev/sdg1: DOS/MBR boot sector, code offset 0x58+2, OEM-ID "mkfs.fat", sectors/cluster 64, reserved sectors 64, Media descriptor 0xf8, sectors/track 32, heads 64, hidden sectors 32768, sectors 125009920 (volumes > 32 MB), FAT (32 bit), sectors/FAT 15296, reserved 0x1, serial number 0xb4bd503c, unlabeled

Filesystem 1K-blocks Used Available Use% Mounted on
/dev/sdg1 62489632 89600 62400032 1% /media/jepler/B4BD-503C

lunar crown
#

Yes, but ... On Windows, the maximum size of FAT32 is 32 GB. Buyer beware.

onyx hinge
#

I don't use Windows so I can't verify that.

lunar crown
#

Who are you or Adafruit's customers going to believe? Bill Gates or Linus Torvalds?

#

πŸ˜‹

manic glacierBOT
tulip sleet
#

@simple pulsar you might simply have multiple devices that are intermittently transmitting in channels 37/38/39 and swamping them. 37/38/39 are not adjacent in frequency. Remember the 2.4GHz band is also used by WiFi and other things, and the channels for the different modes overlap. The Wifi channels are much wider (20MHz, spaced at overlapping 5 MHz intervals) than than the 1 MHz Bluetooth channels. Bluetooth hops around to avoid interference from other devices.

#

if there is a lot of local wifi usage, nad you can get the wifi usage locally to use 5 GHz, then you might see differences

manic glacierBOT
#

+1 to unifying enums internally.

-1 to reference_voltage_set method names. Instead, make an object to represent the DAC and statically create an instance so you can do samd.dac.reference_voltage = 1.0. I'd use floats for the voltage value for consistency. If the provided value is unsupported you could either raise an exception or pick the closest value below it and expect it to be read back. (We use this approach for bus frequency.)

#

-1 to reference_voltage_set method names. Instead, make an object to represent the DAC and statically create an instance so you can do samd.dac.reference_voltage = 1.0. I'd use floats for the voltage value for consistency. If the provided value is unsupported you could either raise an exception or pick the closest value below it and expect it to be read back. (We use this approach for bus frequency.)

Many of the reference voltage values cannot be represented exactly in floating point...

simple pulsar
#

@tulip sleet I'm lacking some of the gizmos to look at this all directly. Is there any plans to expose the channel_mask feature for advertisement in CP? I'd imagine it's a bit niche and for most cases isn't a good ida.

manic glacierBOT
tulip sleet
#

someone building a covid tracker was interested in that, but there aren't a lot of use cases

onyx hinge
#

afk for lunch and maybe for the day

tulip sleet
#

@simple pulsar it would not be hard to add the channel mask, but i'm not sure how available it is on other underlying BLE implementations

manic glacierBOT
solar whale
#

@slender iron for the esp32S2 USB breakout - it looks like D+ is GPIO20, D- is GPIO19, then GND and do you connect 5V or leave it off since the microUSB provides 5V already or is it OK for both to be present?

slender iron
#

I have white to 19 and green to 20

#

and yes I plugged both power in

solar whale
#

ok - thanks

slender iron
#

@lucid solar did you push your saola breakout design yet?

topaz quest
#

Yes, but ... On Windows, the maximum size of FAT32 is 32 GB. Buyer beware.
@lunar crown that's just what you can format. Windows read bigger FAT32 just fine. Indeed most devices can take 64GB FAT32 SDXC cards despite only supporting SDHC.
Though I think more modern SDXC dropped SDHC compatibility (which might be what Jeff is experiencing)

solar whale
#

@slender iron are you sure about white on 19? just checking since the breakout cable labels that as D+ but the board shows it as D-

manic glacierBOT
slender iron
solar whale
#

hmm -- I'm confused -- as usual

solar whale
#

it looks like white is normally D- so that makes sense -- just the product description https://www.adafruit.com/product/4448 appears to have it reversed. I Posted a question to the forum...

manic glacierBOT
#

Hi Scott,
The issue is that in common_hal_pulseio_pwmout_deinit() we have:
...
tcc_refcount[t->index]--;
tcc_channels[t->index] &= ~(1 << tcc_channel(t));
if (tcc_refcount[t->index] == 0) {
...
What I saw in a debugger was that refcount was going to 255; i.e. being
decremented
even though it was already at 0 (due to not being incremented properly).
Since it was
not then == 0, the code in the if statement would not be run, and the timer
not properly
released. Hope th...

manic glacierBOT
#

I put together a messy patch that implements what you requested. Documentation is unclear, but I wanted to make sure you were okay with the API before documenting everything again.

Totally ok. Feel free to ping me on Discord when you get to your computer in the morning and we can video chat to sync up.

Example usage:

Simple usage:

I'd do:

# By default the watchdog has infinite timeout and raises an exception on timeout.
wdt = microcontroller.watchdog 
# N...
lucid solar
#

@slender iron I didn't realise it was a public holiday today...ended up going out. Just back to the computer now. Am fixing something on the board, but will push in the next hour or so.

slender iron
#

great! sorry to disturb your holiday. I was just excited for it

lucid solar
#

πŸ˜› I guess you'll order from OSH Park rather than waiting for me to send one when I order them from China. There are a few parts to solder...I'll give you a digi-key list.

slender iron
#

ya, totally. I might tweak the design too to fit parts I have

lucid solar
#

I did Mini-USB-B as that's what I had...but have changed it to USB-C now.

slender iron
#

I'll probably use micro because it's easier to solder

#

I'll probably do my own because I want a feather header and to have it only as large as the saola. osh park has trained me to keep it small

#

time for a run now πŸƒ

lucid solar
#

Aha...ok...I wanted something that can lay flat and be easy to plug in things.

slender iron
#

ya makes sense πŸ™‚

timber mango
#

@gilded cradle Why do I not see a lot of pin.py files in Adafruit_Blinka/src/microcontroller??

bright aspen
#

@simple pulsar I suspect you might be seeing a beating of the scan interval against the broadcast interval. Try tweaking some interval and duration numbers. (I'm still negotiating with alligators elsewhere.)

topaz quest
#

@slender iron should I update the cookiecutter code of conduct file from the code of conduct repository? they seem to be slightly different revisions right now

#

ah even a bit more complicated β€” the two copies in cookiecutter are different even πŸ™‚

#

I assume realigning them is a positive outcome so let me do that πŸ˜‰

manic glacierBOT
gilded cradle
#

@timber mango because they live under Adafruit_Blinka/src/adafruit_blinka/microcontroller.

timber mango
#

That is where I am looking, and there are no other boards in there.

gilded cradle
timber mango
#

I forked Adafruit_Blinka and then cloned my fork. No, I am looking in Adafruit_Blink/src/microcontroller.

gilded cradle
#

Ok, that's the wrong folder. That's where Micropython loads stuff from.

#

Ok, go up one folder from there and then into adafruit_blinka (all lower case) and then into the microcontroller folder under there.

#

It's kind of confusing, but once you realize there's 2 microcontroller folders it's a little easier.