#circuitpython-dev

1 messages Β· Page 271 of 1

ionic elk
#
import board
import digitalio
import time
import microcontroller
print(microcontroller.cpu.frequency)
pin = digitalio.DigitalInOut(board.D12)
pin.direction = digitalio.Direction.OUTPUT
while True:
    pin.value = True
    #time.sleep(0.1)
    microcontroller.disable_interrupts()
    microcontroller.delay_us(1000)
    microcontroller.enable_interrupts()
    pin.value = False
    time.sleep(0.01)
    pin.value = True
    microcontroller.delay_us(1000)
    pin.value = False
    time.sleep(0.1)
#

this will obviously add a bunch of execution time for short intervals, which is why I'm not worried about those. but for big ones like 1000us I'd expect it to be more on target

#
  • 1us -> 14.7us
  • 10 -> 30.4
  • 100 -> 188
  • 1000 -> 1769
tulip sleet
#

well, when you enable interrupts, if there's a pending interrupt (like a USB tick), then a lot can happen then, and also, the background tasks are running, and they use up a lot of time (which we need to fix)

ionic elk
#

oh that's true.

tulip sleet
#

I'm suggesting you test this at the C level, by setting some volatiles that store systick or cyccnt and then just setting some breakpoints or something, or adding print statements temporarily

ionic elk
#
microcontroller.disable_interrupts()
pin.value = True
microcontroller.delay_us(1000)
pin.value = False
microcontroller.enable_interrupts() 
#

still evaluates to 1765

#

but I'll test it in c

tulip sleet
#

it's still going to call the background task checker RUN_BACKGROUND_TASKS between statements

ionic elk
#

oh between all micropython instructions you mean

simple pulsar
#

@tulip sleet FYI, wrt serial blocking on bluefruit in arduino world, CircuitPython doesn't seem to suffer based on some testing with print: https://github.com/adafruit/Adafruit_nRF52_Arduino/issues/375#issuecomment-551166774

tulip sleet
#

right

ionic elk
#

Still, why would 100 -> 188 in that case? if it's additive, that doesn't really make sense as an output

tulip sleet
#

RUN_BACKGROUND_TASKS gets called at various times

#

it might take 88us to actually get to flipping the pin value

#

the systick timer interrupt runs at 1ms intervals and also runs background tasks, I think

#

i'm just saying test it in a way that cuts out all other potential overhead

ionic elk
#

The systick one makes the most sense to me. I don't think it can be additive pin flip execution delay if the numbers are 10 -> 30.4, 100 -> 188, 1000 -> 1769, that doesn't imply a consistent delay. But that means I'll have to disable systick

#

even if I do it in c

#

In any case this is all on my Atmel control, maybe I'll run it on stm32 and not get it

tulip sleet
#

@simple pulsar hmm, that's interesting

#

I'm just saying add stores of systick into before and after voltatiles at the beginning and end of the delay routine. That and turning off interrupts should get you an accurate idea of the delay

#

it may well be not that accurate, but I think Scott did test it. I thought we were using a similar technique in neopixel_write, which requires accurate timing

manic glacierBOT
manic glacierBOT
#

Satisfied for now. I did some more exploration and I think it'd be easier
to just do a full merge than graft the newer compiler code into our tree.
This is good to go.

Btw, I do actually have an nRF board so once I find some free time I'll
test it out on nRF boards, but this should be good to go for SAMD51 boards.

On Thu, Nov 7, 2019, 9:04 AM Dan Halbert notifications@github.com wrote:

@theacodes https://github.com/theacodes So are you satisfied with the
PR now, or are you still ex...

manic glacierBOT
obsidian compass
#

I've a question for core circuitpython codebase. When creating a file on filesystem what API to use to write data into that file?

#

f_write() ?

simple pulsar
#

@obsidian compass I don't know if it's the best example but I know the PyPortal code writes a file to either the (previously write enabled) flash or the SD card: https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/blob/master/adafruit_pyportal.py#L843 - there seem to be some precautions on write size which don't feel like they belong in application code, though

obsidian compass
#

@simple pulsar Thanks alot for pointers, I will look into it πŸ™‚

#

For now when using f_write to write ASCII strings the result shows HEX in file, any idea?

meager fog
#

you can write to a file just like the normal python api

obsidian compass
#

@meager fog I am actually looking for making files in core code like when building circuitpython file system and that filesystem has a file with some strings

#

so when we build and flash the .uf2 it has that file

meager fog
#

ooh

#

that...i dunno

#

@tulip sleet may be able to answer

obsidian compass
#

So far able to create an empty code.py file

meager fog
#

are you the last person who commented on that issue?

obsidian compass
#

Yes I am πŸ™‚

meager fog
#

ok great - a lot of people are on break this week

#

you may want to wait till next week

#

to get a faster response

obsidian compass
#

No worries, I'll explore more by then

#

Thanks πŸ˜„

meager fog
#

πŸ‘

#

i also know micropython creates files with stuff in them

#

you can look upstream

#

but thats my limit

obsidian compass
#

Good idea, lemme see

tulip sleet
#

@obsidian compass a good example is how we write to boot_out.txt in main.c. You could create code.py in a similar way

manic glacierBOT
ionic elk
#

@meager fog speaking of breaks I'll be in NYC the week of thanksgiving, so I'll be hacking turkeys rather than drivers that week. I'd love to say hi if anybody is around though.

ivory yew
simple pulsar
#

I've forgotten what needs to happen to make a new library build and go into the bundle. https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/pull/39 went in on 30-Sep-2019 but the latest library (https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/tree/3.1.3) does not include that.

tidal kiln
main meteor
#

@ivory yew That's a good-looking build! I like the patterned trace, that's a nifty touch.

ivory yew
#

Thanks! An actual artist is working on the panel for the full run but I needed something for the beta so that's what I came up with.

manic glacierBOT
#

Tested on nRF (Circuit Playground Bluefruit alpha)

Build size without CIRCUITPY_ENABLE_MPY_NATIVE:

766616 bytes free in flash out of 1048576 bytes ( 1024.0 kb ).
232344 bytes free in ram for stack out of 245760 bytes ( 240.0 kb ).

Build size with it:

766596 bytes free in flash out of 1048576 bytes ( 1024.0 kb ).
232344 bytes free in ram for stack out of 245760 bytes ( 240.0 kb ).

So 20 more bytes?

Test code:

import time
import micropyth...
ivory yew
#

Oh rad, that got merged. πŸ™‚

manic glacierBOT
#

Thanks for this! I've been manually tweaking my repos when I wanted these for the past year or two.

Oddities if you're used to CPython: @micropython.asm_thumb et. al. aren't actual callable decorators. On builds without these enabled, the file fails to parse. Minor bummer, but that's micro-life. Not a big deal. What I did in this scenario is just keep different implementations in different files, only loading one of them:

try:
    # Optimized version - requires a custom Ci...
manic glacierBOT
#

Hot on the heels of https://github.com/adafruit/circuitpython/pull/2271, enable floating point instruction support when @micropython.asm_thumb is enabled.

This blindly assumes CIRCUITPY_ENABLE_MPY_NATIVE is only likely to be specified on boards with more ram which to me implies m4 which implies hardware floating point.

If native is desired on lesser boards (will it reasonably fit there?), we'd need to plumb through a conditional about that to && into the define. I didn't see an obv...

#

I think upstream implemented it but we'd have to do a full merge to get
that feature.

I definitely agree that supporting both boards with and without this
feature is a bit tedious.

On Fri, Nov 8, 2019 at 11:36 AM Gregory P. Smith notifications@github.com
wrote:

Thanks for this! I've been manually tweaking my repos when I wanted these
for the past year or two.

Oddities if you're used to CPython: @micropython.asm_thumb et. al. aren't
actual callable decorators. On builds withou...

manic glacierBOT
manic glacierBOT
#

I've been testing building CP on various platforms -- the current master builds fine for all BSPs on Ubuntu Linux and on MacOS. On my Raspberry Pi 4 all of the boards build OK except for the spresense - it fails with:

pi@gjnpi4desk:~/projects/circuitpython/ports/cxd56 $ make BOARD=spresense
Use make V=1, make V=2 or set BUILD_VERBOSE similarly in your environment to increase build verbosity.
GEN build-spresense/genhdr/moduledefs.h
QSTR updated
AR build-spresense/libmpy.a
LD buil...
manic glacierBOT
marble hornet
#

how did we get qtouch working outside of atmel studios?

wind trellis
#

@marble hornet The "we" here is none other than @meager fog and you can watch it as it happened: https://www.youtube.com/watch?v=3vTUzvljQiU https://www.youtube.com/watch?v=01xG74COYEY

HI THERE - WE ARE DOING THIS THING! ----------------------------------------- Visit the Adafruit shop online - http://www.adafruit.com Subscribe to Adafruit ...

β–Ά Play video
marble hornet
#

Thank you

wind trellis
#

I don't know why I got a blow-up viewer box for the first video link but not for the second, and now that will bother me all night. 😧

manic glacierBOT
#

Based on the information available, this is an issue to pursue upstream with https://github.com/sonydevworld/spresense-exported-sdk -- a binary executable program included in spresense-exported-sdk is only for "x86_64" linux systems, so it won't work on ARM based system such as rpi:

$ file ./sdk/tools/linux/mkspk
./sdk/tools/linux/mkspk: ELF 64-bit LSB executable, x86-64, version 1 (SYSV),
 dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32,
 BuildID[...
solar whale
#

@gilded cradle Is the new gizmo library supposed to be in the bundle? -- I don't see it

#

@raven canopy I noticed that the bundle releases don't list the updated/new modules anymore -- is that intentional?

gilded cradle
#

Yeah, it’s supposed to be. I’ll take a look when I get back to my computer tonight.

solar whale
#

OK --thanks -- no rush -- just want to make sure you were aware.

raven canopy
#

intentional? not that i know of... i probably broke something. i'll check into it when i can.

solar whale
#

Thanks!

#

Possibly none listed because none got added....but the last 2 releases have not listed anything

manic glacierBOT
tidal kiln
#

oh yah, it's just brand new. still getting things all setup.

solar whale
#

@tulip sleet got my "ble_rover" to work with the new UARTService, very minor changes needed. just copied from the uart_echo_test example

tulip sleet
#

great!, that was my hope, htat it would be easy to update the code examples in the guides. I'll stash it away it if you post it here. thanks!

solar whale
#

Mine is a bit - modified from the original guide -- I'll go back to the original and implement the changes - I was just going to try the new CPB rover @split ocean put in the learning guides -- it will need similar changes.

tulip sleet
#

oh, i thought you meant JP's guide, but yes, the other will be good too

solar whale
#

the one I am using is on a feather nrf52840 and I have added some neopixels

split ocean
#

I had done this one: https://learn.adafruit.com/circuitpython-ble-crickit-rover and the new one with Circuit Playground Bluefruit is in moderation, using this code: https://github.com/adafruit/Adafruit_Learning_System_Guides/tree/master/Turtle_BLE_CPB_Crickit_Rover

Adafruit Learning System

Purple Robot with Feather nRF52840 and Crickit plus NeoPixel underlighting!

solar whale
#

@split ocean yes -- Those were the ones I was working with and now adapting to the new bleio/BLE library. they no longer will work with the current master and BLE library.

#

I think the only change I made to the original ble_cricket rover was in the number of neopixels -- If you want to see -- here is the new version .

#

I'll try the same with your CPB version -- just need to swap boards around to try it!

solar whale
solar whale
#

@split ocean FYI -- for the motors I am using I had to increase the speed settings .25 just caused then to whine -- I used 1.0 for FWD -.7 for REV ....

split ocean
#

this is for the CPB version? I was running them at 0.25 on the lastest version. This is heavily battery dependent, BTW.

#

big current draw at the lower speeds.

solar whale
#

yes for the CPB, running on 5V supply for now -- not sure where I got these motors either -- I'll experiment with other motors. Just want to let you know incase it comes up.

split ocean
#

thanks, great point, I'll add a note in the guide that tweaking motor speeds in the code may be required.

solar whale
#

these are fun to play with πŸ™‚

#

now I can drag race my feather_nrf52840 and my CPB 🏎

split ocean
#

ah nice! I think the CPB version of the code may win for precision control, but the Feather one on raw, reckless speed!

onyx hinge
#

hum I wonder why the "unix" port doesn't work right with -flto specified...

slender iron
#

Hi all, we're having our CircuitPython Weekly meeting at the normal time tomorrow here on Discord. It is at 11am Pacific / 2pm Eastern and everyone is welcome to attend. More details are available here in the notes doc: https://docs.google.com/document/d/1ox1-zzFvd-Os3TnWtmhD1RZQnfMb1Q3rkN_jHTZ3v48/edit?usp=sharing <@&356864093652516868>

simple pulsar
#

Has anyone looked at the performance of bluetooth data transfers on the Circuit Playground Bluefruit with CircuitPython? I thought I'd check the latency and it appears to be around 43ms RTT for an "echoed" ColorPacket() from one CPB to another. I don't need a lower number I was just measuring it. That number does include one packet parse operation at the moment.

gilded cradle
#

@solar whale, fyi, it looks like I had added it to the bundle incorrectly and just submitted a PR to fix that and a couple other libraries I added incorrectly.

pulsar python
#

Hi all,
need your help or advice please: the Pygamer seems to be dead, it's not showing up as drive in Win or Mac, Display not working, only CHG Led is flashing quickly (10x/sec if ON, permanenet yollow if OFF, but both with low brightness) when plugging in USB Cable. With battery only, completely dead, no LED. It was working before. No observations with regard to damage or bad treatment. USB cable is fine as well.
I have 2nd PyGamer at home so I can compare/ check if battery loaded etc.
Any thoughts or help please? Thank you:)

#

CircuitPython is installed on the respective pygamer, the version is also correct.

solar whale
#

@pulsar python Did it work previously with this battery -- verify that the battery polarity is correct.

pulsar python
#

@solar whale Thank you for your quick reply! Yes, battery and polarity is fine. It worked before. Also I checked the battery with my second Pygamer.

slender iron
manic glacierBOT
#

Hi Guys,

I've got a board based on the Feather M4 Express that uses a 16 MBit IS25LP128F flash chip. Although it seems to be recognized in the JEDEC ID check, it hangs right in the spot shown in the following code and I am not quite sure why. It would be good to figure this out so that others don't assume that this chip will work in their design (I actually also couldn't get the W25Q128JV_SQ to work either, and that was even harder, where it looked like the wrong size was reported etc (see...

manic glacierBOT
broken hedge
#

OK - I "think" I've found an issue. Double-click "reset" on CPB. Drag over fresh "adafruit-circuitpython-circuitplayground_bluefruit-en_US-5.0.0-alpha.5.uf2" onto "CPLAYBTBOOT". copies, reboots. When I run this code w/"drum_cowbell.wav", no sound comes out. https://gist.github.com/gallaugher/afc0bd8213f9f1f6e5e3b0967904c0e4 BUT if I reinstall the old .uf2 (adafruit-circuitpython-circuitplayground_bluefruit-en_US-20191012-a146ce5.uf2) by double-clicking "reset", wait for green, drag "adafruit-circuitpython-circuitplayground_bluefruit-en_US-20191012-a146ce5.uf2" over on to CPLAYBTBOOT, wait for CPB to reboot, then run the code, it works fine. Is this a problem with alpha 5 on the CPB or am I doing something boneheaded? Thanks!

Gist

Reproduce audio bug with buzz on 5th play in CPB using CircuitPython Alpha 5.0.0 - code.py

stuck elbow
#

@broken hedge you have to unmute the speaker now

#

it's muted by default

#

that was changed in 5.x to be consistent with other ports

broken hedge
#

Oh - thanks so much! Is this the accepted way to do this:

#

speaker_enable = digitalio.DigitalInOut(board.SPEAKER_ENABLE)

#

speaker_enable.direction = digitalio.Direction.OUTPUT

#

speaker_enable.value = True

#

Thanks!

onyx hinge
#

phew I'm glad @stuck elbow knew the answer!

manic glacierBOT
#

I can't post the entire schematic, but it is connected exaclty the same as on the Feather M4 in both cases (W25Q128JV_SQ and IS25LP128F).

grafik

I don't have a logic analzer, but the fact that the flash_info.ino recognizes a chip shows that they are extremely likley connected correctly. In fact, another board with the exact same design and a different chip works perfectly (same chip...

manic glacierBOT
manic glacierBOT
manic glacierBOT
solar whale
#

@tulip sleet for CTS, in the older BLE lib and the new one (in standard/standard.py) there is a property struct_time. Did it ever get tested? It looks like it is missing the "year" argument and time.struct_time() wants a (9-tuple) input -- I think here should be two "-1" at the end for Day of Year and DST. I was getting errors about the 9 arguments until I changed it (added year and an additional -1 . I modified standard.py with these changes and fixed the imports (I think)... still having other issues but just wanted to check if I was missing something regarding this property since it came from the older code but I'm not sure it ever got used.

tulip sleet
#

@solar whale I only tested it in the REPL, and it's possible I wasn't very thorough

solar whale
#

was "year" intentionally omitted?

#

@tulip sleet don't spend any time on this -- I'm sure you have other priorities -- I was just curious -- happy to keep hacking....

slender iron
#

@solar whale I didn't actually test it because I didn't have pairing working when I tried it

solar whale
#

I don't have pairing working properly either, but I can connect with the Bluefruit LE app ... that's when I ran into some issues with it.

slender iron
#

I didn't think CTS worked without pairing

solar whale
#

it's not actually working .... all 0's for the time

slender iron
#

I did see it returning zeros to me and I "fixed" it to throw a permissions exception I thought

#

ah, ya. I think the old version just returned zeroes

#

I thought I made it throw an exception now

solar whale
#

I had to make mods to standard.py -- it did not like the imports using core did you fix that in yours?

slender iron
#

ah, I thought I had fixed all of those

solar whale
#

not in the current master

slender iron
#

maybe not. I haven't retested recently

#

I mainly tested advertising and uart service

solar whale
slender iron
#

ya, I got rid of the .cores in favor of putting them in __init__.py

#

I thought the lint and sphinx would catch them all

#

I bet sphinx isn't documenting that folder at all

solar whale
#

yes, I think I fixed them ok -- but still something wrong.... mostly with my understanding πŸ˜‰ Do you understand my concern with time_struct not using "year" and "9-tuple"

raven canopy
#

yeah, you'll have to force sphinx/automodule to include __init__.py.

solar whale
#

There is no going back ..... πŸ˜‰

river quest
#

i'm here will be text only (on a train) blinka πŸš‹ to get that out of the way

raven canopy
#

πŸŽ‰

solar whale
#

Come to New Hampshire...

ruby atlas
#

@river quest yay to snektrain

ivory yew
#

I am lurking for a bit then offline. 😢

swift arrow
#

lurking

fierce girder
#

Hi Scott

#

In Portland today πŸ˜€

tidal kiln
#

lurking

river quest
#

does a sommersoft make a noise in the forest if the mic is on but sommersoft does not say anything?

raven canopy
#

tis a mystery... πŸ‘»

river quest
#

amtrack train wifi is not workin great, so i'm all text it seems

#

we have some hotspots but it's goin' in and out

onyx hinge
#

@river quest oh no, we depend on you and your mellow voice

river quest
#

next week!

onyx hinge
#

you know it

inland tusk
#

@odd flax you should be alright. I have done it before coming up from florida

idle owl
#

Python powered badges at Hackaday Supercon. Bryan, JP, Melissa, and Scott will be there - if you are attending see the team to get the ML demos on your device!
https://hackaday.io/project/167255-2019-hackaday-superconference-badge

The 2019 Hackaday Superconference badge is based on an ECP5 FPGA with 45k LUTs. It adopts a Game Boy form factor, with eight buttons for user input and a color LCD screen. Apps can be written in C and copied to the badge via a USB mass storage arrangement. There is also a 40-...

#

Winterbloom Sol by Alethea Flowers
https://circuitpython.org/board/winterbloom_sol/
Winterbloom Sol is a modular synthesizer (Eurorack) module, and CircuitPython powered! It is a multi-purpose, scriptable USB MIDI to CV/gate converter. Its code can be modified while in use to change how it processes MIDI data into CV and gate outputs. Sol is not yet available for purchase, however, you may contact the creator for more details.
https://thea.codes/

onyx hinge
#
Adafruit Industries - Makers, hackers, artists, designers and engineers!

Here are some of the details about the BrainCraft EDGE BADGE that is at Supercon this year brought to you by Digi-Key and Adafruit! This is IN ADDITION to the 2019 Hackaday Superconference Badge &#…

idle owl
old smelt
#

Lurking

idle owl
#

Special thanks to Matt for adding a bunch of MicroPython news and links.

river quest
#

thanks scott!

#

(train wifi stopped workin for audio, so i just guessing it all worked out πŸ™‚

onyx hinge
#

πŸ’― + πŸ’―

errant grail
#

late and lurking...

onyx hinge
#

tinyusb is hugely enabling for microcontrollers, can't imagine being without it

swift arrow
#

yea!! congrats @onyx hinge

timber mango
#

oops wrong channel.

#

no microphone
Hug Report: @tulip sleet Was a big help to me, in getting ARM STM32F405 Arduino IDE-based programming working.
Dan steered me to dfu-util which proved instrumental in understanding the programming of this new Adafruit target board.
Similarly, @solar whale linked to the unpublished STM32F405 Guide, in the channel, which made SPI flashROM access possible for me. Thanks so much!

slender iron
#

πŸ‘ will read off after siddacious

onyx hinge
#

oh yeah I forgot to hug report everybody who will be repping circuitpython at supercon!

swift arrow
#

yea! that will be an awesome episode of JP-workshop

raven canopy
#

3 minute build time is nice. best i've gotten on 3B+ is 6 minutes using -j2.

#

surprisingly, booting from an SSD didn't speed it at all

gilded cradle
#

That's a Catalina thing @solar whale

timber mango
#

ouch!

solar whale
#

Ouch! Feel better soon!

idle owl
#

Yep!

timber mango
#

I was able complete an Arduino project for STM32F405, using ST's Cube (programmer) or, alternatively, (Debian's distributed) dfu-util (both from a Debian Linux host PC; both via the USB interface).
Needed to erase all (in Cube, only) to upload to the F405 target, properly.
(Cube-based) upload was done only outside of the Arduino IDE.
Used the (formerly) unpublished (now published!) F405 Guide to access SPI flashROM on the F405 board (thanks, @solar whale !)
Guide:
https://learn.adafruit.com/adafruit-stm32f405-feather-express
Cube, script stuff:
https://termbin.com/je13
dfu-util CLI syntax:
dfu-util -a 0 --dfuse-address 0x08000000 -D ./this.bin

pastel panther
timber mango
#

I get some good ideas after reasonable TEXTING hours, so I email them to myself.
I'd have to then transfer them to SMS media at a decent hour, to send them at all.

raven canopy
#

tummy rumbles. must find honey. 🍯

timber mango
#

Could you just send them periodically in the MIDI stream, scheduled rather than on demand?

dense pike
#

@tulip sleet Hi Dan, I'm trying to use the color picker on the nrf524804 using CircuitPython v5.00 and v5 library and getting the following erorr, looks like a module ( adafruit_ble.uart_server)maybe missing is the adafruit_ble library

#

Thanks tim

tulip sleet
dense pike
#

@tulip sleet OK, that cleared up the error

tulip sleet
#

versions will change again on the next alpha (or it might be beta.0)

dense pike
#

@tulip sleet THanks for the help, took a while but I now have the nrf52840 talking to the iphone!!!!πŸ™‚ now on to motor contorl

tulip sleet
#

yay!

dense pike
#

@tulip sleet One more question, where you able to confirm if the white box in the control pad could be used for messaging?

tulip sleet
#

I started looking at the source code for the app in Xcode to find out what that box was connected to, but I didn't get very far. If I can't figure it out I'll ask someone who would know.

dense pike
#

@tulip sleet Thanks, Adafruit and it's staff ROCK

tulip sleet
#

@dense pike OK, the answer is that if you just write any old text back from the uart_server, it will appear in the text box on that page. All that box is doing is showing characters sent back from the BLE peripheral

dense pike
#

@tulip sleet what would be the command to do that?

tulip sleet
#

@dense pike like

uart_server.write("Thank you for pressing that button\n")
#

actually maybe need

#
uart_server.write(b"Thank you for pressing that button\n")
#

since you need to send bytes, not a string, but a regular string might work. Don't have time to try it at the moment

dense pike
#

@tulip sleet, Thanks IT WORKED! Ok i will experiment and let you get back to your life. Thanks for all the info and time blinka

slender iron
#

@tulip sleet when do you want to chat? I'm free the rest of the day

tulip sleet
#

i was just going to ping you. now is fine

slender iron
#

kk

tidal kiln
#

timely comment by dan ⬆
looks like one needs to work with a very specific adafruit_ble release?

#

or, not release, tag

manic glacierBOT
manic glacierBOT
manic glacierBOT
simple pulsar
#

@tulip sleet Why does the build get bigger when long int is provided?

tulip sleet
#

because there is extra code to manage and compute with longints that is omitted without them

simple pulsar
#

oh, I thought there might be more to it

tulip sleet
#

it's just like any other feature addition: it takes code

#

it's several kB of code

dense pike
#

Hi All, Can CircuitPython function definitions be put at the end of a program or do they have to declared before they are called? Thanks in advace tim

slender iron
#

@dense pike Python functions need to be defined before they are used within the same scope

manic glacierBOT
#

Please double check that this PR doesn't change the version of TinyUSB. The Spresense build is failing because tinyusb is an older version that what is checked in.

I don't know why it's crashing after soft reset. The backtrace of the crash should provide info to help hunt it down. The busio_uart_obj_t data will be left alone until the next vm run where it may be allocated for something else and cleared. I'd suggest clearing the pointer array in uart_reset as well to make sure other memory ...

manic glacierBOT
manic glacierBOT
#

That's in interesting option as well.

On Mon, Nov 11, 2019, 6:00 PM ladyada notifications@github.com wrote:

note there's webserial nowadays. could be interesting to try that - it may
'just work' (?)

β€”
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=AAB5I4YCNIQVKWXECDQZKDDQTIE2PA5CNFSM4EP2ZRJKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5W...

tulip sleet
#

@dense pike Python code is executed as the .py file is read. But definitions can refer forward (there are no forward declarations)

#

Examples: this works:

def f():
    g()
    print("f")

def g():
    print("g")

f()
#

but this does not:

f()

def f():
    print("f")
dense pike
#

any suggestions? thanks Tim

#

uf2 file adafruit-circuitpython-feather_nrf52840_express-en_US-5.0.0-alpha.5.uf2

tulip sleet
#

could you copy the libraries again? that error might be from a truncated file

#

or you may need to download again

dense pike
#

Ok, downloaded file again and reloaded lib files. All is working! blinka πŸ™‚ thanks

tulip sleet
#

it's unusual to have truncated files when copying on MacOS. It's pretty good about writing files to the device as soon as possible (Windows and Linux can not actually write the data for 10's of seconds, on those boxes it's recommended to do sync or the equivalent). But the nRF52840 flash is pretty slow. If you happened to start a copy and then unplugged or reset a little too quickly, you might have interrupted the copying. On the other hand, this is extremely unusual, so nothing really to wrory about

dim peak
dim peak
#

Thanks @indigo wedge

manic glacierBOT
manic glacierBOT
#

I have a Particle Argon coming in the mail because this idea is just too appealing and seems quite doable (given my experience with the nRF24L01). I found some examples in the NRF5 SDK, and it also contains a components\proprietary_rf\esb folder for implementing the Enhanced ShockBurst (ESB) protocol. I'm still pouring through the CircuitPython ports/nrf source, so I'll likely have questions about how to use the ESB files as their licensing disclaimer seems to allow it for nrf ICs. I'm st...

manic glacierBOT
manic glacierBOT
#

Thought I'd try something new and it was the right price. About 2 clicks after the purchase I found out the esp32 as a co-processor is limited by AT command transports on the Argon... I do plan on exploring the esp32 as a co-processor, but maybe I'll just get the breakout board. I'm currently stopping the order, and going to try changing it to the xenon (kinda regret not settling for that in the first place). The NFC feature on the Particle Xenon/Argon could be fun. Correct me if I'm wrong, b...

manic glacierBOT
#

That makes total sense, but now I'm not really sure what to name these. I was reluctant to redo the original functions so I wouldn't risk breaking functionality in other sections of the ports and shared bindings, so I mimicked what was done with common_hal_mcu_pin_is_free, which is a common-hal alias on top of a port-level function.

I think there's a distinction between functions and structures that ONLY exist at the port level, which are essentially helpers, and stuff that's actually e...

tulip sleet
#

@slender iron while doing adafruit_ble cleanup: do you think we should just have service coders use _bleio.Attribute.NO_ACCESS and other constants, etc, or should we duplicate those into the library to hide their _bleio origin.

#

going out for a couple of hours or less, but hope to have a PR later today

manic glacierBOT
#

Because ST often skips peripherals (IE including UARTS 1, 2, and 6, but not 3, 4 or 5), I always have the reserved_periph[] array be the maximum possible size and assume elements of it will not be used (always false). It does require the periph file to be set up correctly (all pins map to existing elements on mcu_uart_banks[] which also uses NULL elements) so I'll add a check for that, even if it shouldn't ever get hit.

orchid basinBOT
tulip sleet
#

@slender iron also have some q's re possibly making ComplexCharacteristic a subclass of Characteristic (it is not now).

slender iron
#

@tulip sleet eating cereal and then around until noon my time

tulip sleet
#

@slender iron sure, ping me when ready

slender iron
#

kk

slender iron
#

ok @tulip sleet

idle owl
#

@tulip sleet Wrong channel. Oops.

#

I added the if not data: check, currently it's a RuntimeError - not sure if that's the best choice. The issue was that it was failing with TypeError: object of type 'NoneType' has no len() for obvious reasons when there was no data sent, but that's super cryptic if you're not looking at the driver. The wiring is the issue when that error is thrown.

    @property
    def temperature(self):
        """Return the on-chip temperature, in Celsius"""
        self._uart.write(bytes([0x50]))
        data = self._uart.read(1)  # 1 byte return for temp
        if not data:
            raise RuntimeError("Sensor not found. Check your wiring!")
        if len(data) != 1:
            raise RuntimeError("Did not receive temperature response")
        temp = data[0] - 45
        return temp
#

also now wondering if that should be an elif on the second one now.

tulip sleet
#

@idle owl if the q is whether RuntimeError is a good choice, yes, I think so: indicates some problem beyond the program's control

idle owl
#

That was the q, yes.

#

Thank you.

tulip sleet
#

don't need elif really because the raise exits the routine

idle owl
#

Ok

tulip sleet
#

like, it would make sense to add a blank line after the raise, because that is a self-contained "paragraph" that validates data. So you can see elif is not part of that

idle owl
#

Ok that's a good idea thanks

ivory yew
#

I have a weird personal style preference that all control statements should have a newline above them, except for continuations like elif,except, and finally

tulip sleet
#

yeah, i use blank lines fairly liberally to indicate logical grouping, like: would this bunch of lines deserve a comment on its own, or does it do "one thing"

ivory yew
#

Gotta have that w h i t e s p a c e

idle owl
#

@tulip sleet Thanks for your help.

#

:shakes fist at Pylint:

#

Naturally it didn't fail locally. Using either version of Pylint.

#

Ugh. Unhappy with my fix, but it worked, so eh.

main meteor
#

I think pep wants 2 blank lines before and after function/method definitions

ivory yew
#

I (personally) find PyLint infuriating. I ended up removing it from my projects about 2ish years ago?

idle owl
#

@ivory yew It can be infuriating, but it means we have a standards check without it all being subjective during reviews. It's important to us to keep it. But I understand where you're coming from.

ivory yew
#

It's not that.

#

I don't disagree with the principle.

idle owl
#

Didn't think you did πŸ™‚

ivory yew
#

All of my projects use black, flake8, and some have adopted mypy.

idle owl
#

Fair enough.

ivory yew
#

I'm all about static analysis and eliminating the bikeshed.

#

It's just pylint haas continuously proven to me that it's the most contributor-hostile way to accomplish those goals.

idle owl
#

Also fair enough.

ivory yew
#

(that isn't an indictment of circuitpython's use of it, by any means, I'm always happy to conform to another project's standards)

tulip sleet
#

we did look at flake8 a bit, but pylint seemed more comprehensive. but if you have a better auto-review workflow, that would be great to know

ivory yew
#

flake8 is style check, pylint is borderline static analysis.

#

so you do give up some of that.

#

In projects past, we've made up for that by enforcing really high testing standards (100% coverage, etc.)

tulip sleet
#

the typo checking is helpfful

idle owl
#

I know Black was intriguing.

tulip sleet
#

our testing story is not good, because testing physical stuff is hard; we had a Linux box with boards connected via USB to do some testing ("rosie"), but it was not a reliable setup

ivory yew
#

yeah testing is hard.

#

So I'm writing the software library for Sol

#

and I want it to be 100% tested

#

So mostly a lot of mocks.

#

I don't love that.

#

It'd be cool to have proper stubs (Blinka but for testing) but that isn't perfect, either.

#

but even those things improve your confidence interval.

#

But I missed the buffer overflow thing by not having real hardware to test with.

tulip sleet
#

@raven canopy is working on a testing framework which I don't understand yet

ivory yew
#

or rather, I would have missed the buffer overflow if I wasn't testing with real hardware.

#

all this is to say

#

A project's health is determined by a lot of factors. Style, static analysis, various forms of testing, etc.

#

Using pylint to help hold the health up to makeup for testing is a good idea.

#

I'd love to see us use mypy or pytype. but that'd require a lot of work for us to create type files for the native types.

raven canopy
#

@tulip sleet once I can understand my creation, I'll be able to explain it better. 🀣

manic glacierBOT
manic glacierBOT
manic glacierBOT
ivory yew
#

spicy pr incoming

idle owl
#

@ivory yew Best kind of PR

manic glacierBOT
#

When adding the ability for boards to turn on the @micropython.native, viper, and asm_thumb decorators it was pointed out that it's somewhat awkward to write libraries and drivers that can take advantage of this since the decorators raise SyntaxErrors if they aren't enabled. In the case of viper and asm_thumb this behavior makes sense as they require writing non-normative code. Drivers could have a normal and viper/thumb implementation and implement them as such:

try...
ivory yew
#

🌢

#

I love PRs where the description is significantly longer than the diff.

manic glacierBOT
ivory yew
#

Turns out I'm feeling extra spicy today

manic glacierBOT
#

In cases where more than one board is connected to a single computer it can become pretty hard to figure out which board you're actually talking to. For example, if you have several MIDI-compatible boards they all show up as "CircuitPython MIDI". This change allows boards to replace the "CircuitPython" part of their USB descriptors with more specific text, for example, "CircuitPython Feather" or just "Feather". This will let folks more easily tell boards apart.

The new option is named `USB...

manic glacierBOT
#

@dhalbert atmels mphalport.c assumes a set system clock per processor which is not currently guaranteed among the STM32 boards we support. But it's essentially the same thing as my implementation for when interrupts are disabled.

The approach overall is based on micropython, stm32duino, and the recommendations I saw on ST forums - I didn't personally find anyone recommending the DWT for this purpose off google. It also has the advantage of never overflowing, which the DWT will eventually ...

ionic elk
#

@tulip sleet you still online? Got a sec to talk about a merge thing?

tulip sleet
#

hi

#

sure go ahead

ionic elk
#

want to hop in amelia?

manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
tulip sleet
#

@slender iron still testing and debugging my edits to the library, and I am out today on and off. So a library PR will be later.

manic glacierBOT
old smelt
#

Does CP for the Particle Argon support WiFi functionality?

solar whale
old smelt
#

Ok, great. Thanks @solar whale!

manic glacierBOT
#

I would consider this a part of a planned clock settings rework, which should ideally calculate this and other values from settings in mpconfigboard. It also needs to take into account that oscillators for the ST F405 boards vary from 8MHz to 12MHz. I can up the processor speed in the short term without doing the full rework, but I'll want to make sure it doesn't functionality of SPI and other peripherals, and it'll raise their minimum speeds, which may prohibit use with certain off chip mo...

slender iron
#

sounds good @tulip sleet

manic glacierBOT
#

Sounds like a plan. Note that if I upload micropython on to Adafruit STM32F405, it runs at 168mhz, and if I use the Arduino IDE, sketches run @168mhz on the STM32F405. micropython can change the CPU and bus speeds from python with pyb.freq()

I may try changing the divisor in circuitpython and see what breaks. I haven't tried building a circuitpython .bin, but back in 2015 I was building micropython for pyboard.

slender iron
prime flower
#

@slender iron thanks, that's a double-post. helping them in the original post on the AIO support forum

slender iron
manic glacierBOT
meager fog
#

@ionic elk hihi whats next for stm32 for uuu

ionic elk
#

@meager fog Re-forking to fix a weird merge issue, then Neopixel, then new board support, then probably clock revamps?

#

anything you want to push up?

meager fog
#

nope thats good, id fix the clock before new board support

#

just cause like, thats a core bug

#

and people will appreciate 2x speed up

manic glacierBOT
meager fog
#

@ionic elk ill test neopixel when you are ready for me to

ionic elk
#

@meager fog well, it isn't hurting anything atm, and could impact other boards

tulip sleet
ionic elk
#

because of min speed increases

meager fog
#

@ionic elk yeah but if fixing the clock breaks something, we need to find out what pretty fast

ionic elk
#

I'll bump up the speed and see what happens then

meager fog
#

@ionic elk you should be able to see the i2c clock speed

#

and SPI clock speed and UART speed

#

e.g. 100khz for i2c is defaulkt

ionic elk
#

I don't expect it to actually break modules in terms of functionality. My primary concern is that the divisor on SPI doesn't go high enough to guarantee really low clock speeds when the system clock is really high, so it might make some external boards unusable.

#

But I can see how having fast speeds and simply fixing the problems is a better approach. I'll switch it over and test things out before moving to neopixel.

meager fog
#

@ionic elk im not too worried about that

#

SPI is like, 1MHz + in general

#

and like ya said, lets break and fix now - cause there's only going to be more protocols/confusion later πŸ™‚

#

might even want to do it before neopixel since thats is very timining specific

tidal kiln
#

@idle owl @slender iron i'm wiring up a TMP006 and will try a scan and report back on that thread

meager fog
#

@tidal kiln ok i have the next Blinka Quest if you're up for it

tidal kiln
#

sure. shoot.

meager fog
#

FT232h is great but a little $

#

MCP2221 is a usb to i2c/gpio/pwm/adc for $1.50

#

there's a devboard on DK for a few bucks

#

and a python library by some person in japan

idle owl
#

@tidal kiln Thanks for looking into that.

meager fog
#

wanna look at adding it to blinka?

tidal kiln
#

yah. totes. looks fun.

meager fog
#

ok i also grabbed some of these

#

i was thinking it would be cute to have a USBC-MCP2221A-STEMMA adapter for like $5

#

so you can quickly chain connect various i2c device

#

i noticed that this one does not do SPI at any reasonable speed so FYI!

#

however it does do DAC/ADC/PWM so it would require more shimming for Blinka support on those

#

another fun-fact - this chip comes in DIP!

tidal kiln
#

DAC/ADC/PWM would be great

#

def looks interesting enough to play with

#

is that dev breakout good enough for testing?

meager fog
#

yes totally

#

if you say it works somewhat, ill design our own breakout

#

that is nicer/more useful

#

like with a STEMMA/Qwiic connector on the end

tidal kiln
#

yep. and a better price point FTW.

#

i'll order a few and check em out

manic glacierBOT
tidal kiln
manic glacierBOT
tidal kiln
idle owl
#

@tidal kiln Thank you!

manic glacierBOT
#

This PR raises the clock speed of the F405 used in the feather_stm32f405_express and the pyboard to 168MHz. Tested on a feather across a variety of modules. Resolves #2284.

Thanks @manitou48 for bringing up and testing.

Note to @dhalbert: us_delay dynamically calculates loop intervals for the no-interrupt case based on system frequency, so it's unaffected by this change. Double checked on the feather and we're still at ~1-2us accuracy.

manic glacierBOT
manic glacierBOT
bleak tiger
#

Got my new E-ink working with fonts and bitmaps today, trying the new CP alpha for the first time too! Thanks to the learning guides and example code I also have Airlift connected to my wifi, very excited about what I can do with this! Thanks to everyone at Adafruit but especially to those who write the guides.πŸ˜ƒ

manic glacierBOT
ivory yew
#

I liked your test text, @onyx hinge. πŸ™‚

onyx hinge
#

I worried I was being too immodest

ivory yew
#

hah

#

Me: "Feather"
@onyx hinge "Handsome Devil"

#

Immodest? Confident.

#

πŸ’―

manic glacierBOT
manic glacierBOT
#

I'm up for that but I didn't want to deviate from MicroPython's behavior
with something that uses the same name.

On Wed, Nov 13, 2019, 4:58 PM Scott Shawcroft notifications@github.com
wrote:

What if we just make @micropython.native work this way? We could add a
separate way python code could test to see if it is supported.

β€”
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<https://github.com/adafruit/circuitpython/pull/...

manic glacierBOT
manic glacierBOT
marble hornet
#

@slender iron thoughts on displayio on nrf840 w/ parallel st7789s

marble hornet
#

possible?

slender iron
#

@marble hornet you mean 8-bit parallel buses or multiple displays?

marble hornet
#

8-bit busses

manic glacierBOT
marble hornet
#

the docs say that parallel displays have to have the pins in order. just to be sure i am reading it correctly that means they all need to be in the same port and there have to be at least 7 more bits in the msb direction? or is it lsb?

slender iron
#

right. the cpu needs to be able to write a byte directly to the pins

#

arm is little endian so I believe its pin 0 is bit 0

marble hornet
#

cool! does it have to divided along one of the bytes along a port word? or could it start at bit 3?

#

and an aside: (writing some atmel c for my 231 class has been so cool and really given a respect for the c work all of you do (and I still probably don't see the full picture)). awesome work!

manic glacierBOT
manic glacierBOT
indigo wedge
manic glacierBOT
#

I'm working on a project using a Feather M4. I'm collecting data from sensors (moisture, lux, temp) and sending to Adafruit IO. When I'm doing short tests in code is does a soft restart on save without issue. Once I start connecting to the internet and sending to IO soft restart does not happen on save. The file saves appropriately when I check it in another editor, but still no restart. I'm using Mu 1.0.2 on mac. code.py attached.

[code.txt](https://github.com/adafruit/circuitpython/files...

meager fog
#

@onyx hinge hihi

#

please let me know when you start spinning up workin part time on circuitpy core

#

and we will come up with Ideas and Plans

manic glacierBOT
onyx hinge
#

@meager fog Hi! I'm taking this in between week off to regain a little sanity. Can we have a conversation early next week? (I'm pretty open on hours if we schedule a chat in advance, say 9AM to 9PM Monday or 9AM to 6PM Tuesday, Eastern time) If you don't have other specifics, I planned to look into one or two nRF audio bugs that have been filed, which is likely to be 1-2 hours if the bugs are obvious and 1-2 days if the bugs are subtle.

#

hum while looking at thta PR I merged where you can customize the string "CircuitPython" for the USB "interface" reports, I noticed that on my Linux I see no overall name for the CP boards I tested: ```Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 007: ID 239a:8021
Bus 001 Device 002: ID 0781:5571 SanDisk Corp. Cruzer Fit

#

taking this week off he says

manic glacierBOT
solar whale
#

@tulip sleet I just tried to hack the old cts demo code to use the new BLE library-- I'm probably missing something fundamental

#

since it does not "pair" I assume there is a missing step.

tulip sleet
#

@onyx hinge, it's true, could be fixed, I think

#

@solar whale yes, that may not be done yet, I haven't tried it. we're pushing on getting a new phone app to talk to CPB, not working on pairing stuff right now

#

pushed ... fix

solar whale
#

@tulip sleet not a problem. No rush on the rest.

tulip sleet
#

but useful to know; you try a lot of these we forget to try; tnx!

manic glacierBOT
onyx hinge
#

besides pearing, what other kinds of fruit can a bluefruit emulate?

#

maybe a grape UART or apricot neopixel

ivory yew
#

πŸπŸ‡πŸ‘

onyx hinge
#

in terms of the connection to the wifi, is a pyportal the same as a metro m4 with airlift? Or are they different?

solar whale
#

They are the same.

onyx hinge
#

thanks @solar whale

solar whale
#

Just different names for the pins

#

@onyx hinge are you having any problems with a it?

onyx hinge
#

@solar whale no, deciding whether to put an express airlift in my basket or not (I have a pyportal)

solar whale
#

Ah. So many toys. So little timeπŸ˜‰

#

@onyx hinge there is a difference in the MCU on the airlift M4 Vs pyportal. J19 vs J20

onyx hinge
#

I have a non-airlift metro m4 too

manic glacierBOT
#

@iayanpahwa yes something that can be controlled from a mpconfigboard.mk file would be the ideal result. Ideally you would make the default be $(CIRCUITPY_FULL_BUILD) so that it is automatically excluded on chips with less program space available.

You may find it useful to study how e.g., CIRCUITPY_DISPLAYIO works. Files involved include individual mpconfigboard.mk files, py/circuitpy_mpconfig.mk to set a default value, and supervisor/shared/display.c to make a decision based o...

onyx hinge
#

(it would be super useful to see on the issue page whether the commenter is already a contributor to circuitpython, it would help calibrate how much assistance to give "up front" vs waiting for a question..)

#

(but .. concentrating too much on a person's apparent bona fides is not always for the best either)

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

This PR separates the additions of common_hal_reset_pin and common_hal_never_reset_pin from DisplayIO, so they aren't held up by the tft issue in closed PR #2265.

These functions avoid exposing the internal structure of the pin object, which varies between ports. They do not replace the port level versions and should not affect other parts of circuitpython other than DisplayIO and rgb_led_status for now.

I personally feel the common_hal prefix is the most appropriate for these...

river quest
manic glacierBOT
#

We are not shipping hardware with any VID. The CircuitPython configuration was loaded with the wrong VID/PID pair which is the reason for the PR withdrawal. The VID/PID pair is only going to be available in the CircuitPython .uf2 file.
We haven’t allocated a VID/PID pair, but might use:
VID: 0x04D8
PID: 0xED5E
Once again, our hardware is not shipped with a VID/PID pair, it’s only allocated in the software and we will only do a PR once a proper pair has been allocated.
I apologize for th...

tulip sleet
#

@slender iron after consulting with mgmt, will make new releases for CPy and adafruit_ble. Could be beta.0, though stm32f4 is still adding features (but close)

meager fog
#

@onyx hinge yep lets chat when you return

onyx hinge
#

@meager fog hi

meager fog
#

hihi

onyx hinge
#

I can chat now if you like

meager fog
#

oh kk

#

yeah so i think if you want/can continue on squishing audio bugs

#

and fixing whatever supports needed

#

that would be rad

onyx hinge
#

okie

meager fog
#

the m4 dac is a bit of a lost cause it hink

#

i mean, if you get a flash of insight..

onyx hinge
#

I was sure not making any headway on it at the end

meager fog
#

but otherwise we'll lve with it

onyx hinge
#

I have one of those redboards with m4, I should just make sure the same problems occur there

manic glacierBOT
onyx hinge
#

there's also a reported bug with i2sout iirc

#

yeah that'un!

meager fog
#

i pinged to see if they wanted to add it, maybe they're close

onyx hinge
#

so you prefer if I put items into basecamp when I'm working on an issue? helps you track things?

meager fog
#

yes please please

#

discord is not good at threading

#

email is a pit

onyx hinge
#

ikr

meager fog
#

basecamp keeps things organized

#

github issues are hard to manage chronologically

onyx hinge
#

I'll try to remember that just relying on having the issue/pr on github is not best practice

meager fog
#

its ok to have issue/pr but then they are scattered

#

and they get easily forgotten

#

also with stm32 we could add audioio soon perhaps

onyx hinge
#

I can look for "easy to do" stuff there, tannewt seemed to want something more involved -- I think he made it a 6.x or a long term milestone in github terms

#

I missed the first set of stm32 feather boards for order 😦 so I'd need a different dev board or a second batch

#

is there more adafruit process you will want me to engage in? meetings & such?

slender iron
#

@tulip sleet sounds good!

tulip sleet
#

beta.0 sound OK? It's a breakpoint in visibility, which I think is good for BLE, etc.

onyx hinge
#

oh I'm wrong, that first PR is labeled 5.0. Will move it up my stack!

meager fog
#

@onyx hinge pardon which PR?

onyx hinge
meager fog
#

@onyx hinge oh yeah that can go into 5.x if you feel its ready. we're still in alpha

#

or at least, poke at it, see how you feel

onyx hinge
#

yup will do

meager fog
#

comin' by the monday meetings here is a good place to stay on top of things

onyx hinge
#

Attending the monday discord meeting is a priority for me too

meager fog
#

kool

#

@onyx hinge πŸ‘

onyx hinge
#

@meager fog btw I would love it if adafruit can cover the costs of sending me to pycon at least partially

#

would help out with whatever, especially at sprints

meager fog
#

please send an email to pt/me/stella with details

onyx hinge
#

can do

meager fog
#

please include dates &cost breakdown/total

onyx hinge
#

okay, it'll be speculative on airfare especially

tulip sleet
#

@onyx hinge we can send you our prev budgets

onyx hinge
#

@tulip sleet that would be helpful

tulip sleet
#

lodging costs depend on hotel vs AirBnB-type-stuff, most other things are fixed

onyx hinge
#

@meager fog thanks for the time to chat. I'll get to work on some of these audio bugs on monday, and then shift over to the background tasks thing when I need a change of pace.

meager fog
#

sure

#

i am yuor resource

onyx hinge
#

it should keep me furnished with stuff to do for a bit

#

πŸ™‚

#

I will be sure to make noise if I run low on stuff to do, feel stuck, or I'm not sure what is a priority.

meager fog
#

yes thank u

manic glacierBOT
#

I'm up for that but I didn't want to deviate from MicroPython's behavior with something that uses the same name.

I'm not sure we have to be completely consistent with MicroPython here, since any code that uses this is not too likely to be shared without change between MicroPython and CircuitPython.

We could also add circuitpython.viper that is a no-op if viper is off, but that might be a more radical step :) .

manic glacierBOT
manic glacierBOT
#

Cool, if everyone is cool with deviating from MicroPython I'll just change this to make native behave as described here.

We could also make it circuitpython.native instead of micropython.native (same for viper and asm_thumb, even though we're not yet changing their behavior).

Making viper no-op isn't an option as far as I can tell, as viper code isn't standard python core and can't be processed by the normal bytecode emitter.

manic glacierBOT
#

Also, just wanted to check on the expected behavior of the on-board neopixel. On my Atmel control, it is green during runtime and flashes yellow when reset, but on my ST board, it only flashes yellow when reset and is otherwise dark. Is this a bug or a version difference?

The Atmel behavior is the expected behavior. The yellow is a 700ms window when you can click again and get into safe mode. So sounds like the RGB status setup on the STM Feather is not correct.

manic glacierBOT
manic glacierBOT
#

I have attempted to read data from the Adafruit Edge Badge mic in CircuitPython. I do not see any templates in the provided example code on how to accomplish this.

After some digging, I believe I need "audiobusio.PDMIn"
https://circuitpython.readthedocs.io/en/4.x/shared-bindings/audiobusio/PDMIn.html
I tried the clk_pin as board.D5 and dat_pin as board.D6 per the silkscreen, but this generates an error. The only viable combination of clk and data are D1 and D12. All other combinations...

raven canopy
solar whale
#

It's alive! ```Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-alpha.5-84-g4c55431bb on 2019-11-15; Feather STM32F405 Express with STM32F405RG

help('modules')
main busio math storage
_os collections microcontroller struct
_time digitalio micropython supervisor
analogio errno os sys
array gc pulseio time
board io random usb_hid
builtins json re usb_midi
Plus any modules on the filesystem
import board
dir(board)
['class', 'A0', 'A1', 'A2', 'A3', 'A4', 'A5', 'D10', 'D11', 'D12', 'D13', 'D5', 'D6', 'D9', 'I2C', 'MISO', 'MOSI', 'RX', 'SCK', 'SCL', 'SDA', 'SPI', 'TX', 'UART']

manic glacierBOT
#

As a work-around I'm using a hardware hack leveraging the information from:
https://learn.adafruit.com/adafruit-pdm-microphone-breakout/circuitpython
Namely, I've set D5 and D6 to digital inputs, set D1 as CLK and D12 as DATA in the code, then routed jumpers from D1 --> D5 and D12 -->D6. Using the PDMIn code in this configuration shows clear response to audio input (covering the mic significantly diminishes the RMS of the measurements).

meager fog
#

@solar whale yay. btw i tried esp32spi on it, works ifine

solar whale
#

Nice, I’ll try that tomorrow! Hooked up an I2C gps, worked fine!

manic glacierBOT
manic glacierBOT
zinc maple
idle owl
#

@tidal kiln Did you happen to test the I2C GPS code on RPi with Blinka?

tidal kiln
#

nope. sry. guess i assumed hw had been tested. 😦

#

was just looking at code.

idle owl
#

Limor may have tested it, she said it was tested in a comment.

#

I wasn't sure how involved with it you were.

tidal kiln
#

she just merged it

idle owl
#

The way I read it made me think you had tested it, so that was simply me misreading the comment. No worries. πŸ™‚

#

I'm writing the guide for it, I'll ask her if she tested it and do it myself if she hasn't.

tidal kiln
#

cool. i'd guess any issues that come up will be fairly simple code tweak PRs.

#

if you need help with testing. let me know. i snagged one in last order. so have hw now.

idle owl
#

@tidal kiln Will do, thanks.

lone sandalBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
manic glacierBOT
onyx hinge
#

hmmm the arm toolchain doesn't know how to do an atomic 64 bit operation. I guess it's probably just not directly supported by these chips.

#

(trying to do something about a low-probability, low-impact timekeeping bug when the milliseconds counter's 32 low bits roll over from 0xffffffff to 0x00000000, which is a total distraction from The Real Thing)

manic glacierBOT
meager fog
#

@onyx hinge hey Q

onyx hinge
#

@meager fog go ahead

meager fog
#

@onyx hinge did i already ask you if you've done CANbus before?

onyx hinge
#

I have not

#

Always happy to learn

meager fog
#

yah maybe

#

do you have a car with CAN connection?

#

not needed

#

but i dont so like, i def cant try CAN thing

onyx hinge
#

I have used one of those obd readers so I think so. 2013 Prius

meager fog
#

yeah same thing

#

uses CAN

#

(i think?)

onyx hinge
#

Not sure about how I would rig a connection though

meager fog
#

is it wireless?

onyx hinge
#

Yes if I can find it the one I have is a Bluetooth uart

meager fog
#

ooh ok

onyx hinge
#

BRB 6 minutes

ruby atlas
#

I have a bluetooth one around someplace that I never opened. I definitely have canbus in my 2014 santa fe. so many thingies that talk to or monitor the car. I was just wondering the other day if there was a way to monitor something about the car in realtime.

#

Oh I remember. I wanted to read the status of the auto headlights and warn me if they're not in automatic!

#

Because every time I take the car to be serviced they set them to manual/off and I forget to reset it to auto.

#

I wonder which box I put the ELM327 into

main meteor
#

Hmm, I have wired and wireless OBD-II readers, if you want me to try something out, I'm willing. I should have at least one vehicle with CAN bus.

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/1MDbbC35odld_VaqHhBtGVwKkKMIYb89iIbqGFENKcJc/edit

manic glacierBOT
manic glacierBOT
manic glacierBOT
#

USB VID and PID are something you cannot borrow from another board. So don't copy and paste these values! If you don't have a VID/PID pair, open up an issue in CircuitPython repository and request one, we will assist in the process of assigning a PID for use with CircuitPython.

https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython/customizing-the-board-files#mpconfigboard-dot-mk-5-25

onyx hinge
#

huh this is weird.

#
Missing message id. Please run `make translate`
{'incorrect padding',...```
#

locally, my circuitpython.pot doesn't get 'incorrect padding' as a msgid. It is in the source!

#

and of course when it's not in circuitpython.pot, it doesn't get added to ko.po as untranslated

#

oookaay, on my system, this invokes "xgettext" twice, so strings from filenames listed in the first invocation can be lost

#
xgettext -L C -s --add-location=file --keyword=translate -o circuitpython.pot -p locale lib/tinyusb/hw/mcu/st/st_driver/STM32L4x...
#

TFW when you write a page-long commit message for a 1-line change

main meteor
#

Heh, reminds me of @ivory yew 's comment a few days ago "I love PRs where the description is significantly longer than the diff."

manic glacierBOT
#

On a Debian 10 system, the number of arguments to xargs was such that it would not fit in a single invocation (xargs --show-limits prints "bytes: Size of command buffer we are actually using: 131072").

In this situation, the output from the second invocation of xgettext would replace the output of the first one, so messages that appeared only in files early in the list would be lost. Strings in "extmod" were most frequently the victim, including "incorrect padding" from modubinascii.c.

...

onyx hinge
#

@main meteor a-yup

#

something's still weird, I don't see where in the "checks" it built the individual board FWs. Isn't that done for PRs?

#

@slender iron can you glance at it if you have the chance?

tulip sleet
#

@onyx hinge it is just getting started

onyx hinge
#

or ... it's just really slow to start the jobs?

#

okay, face, meet egg...

#

I was extremely tricked by having a green step and no other steps visible

tulip sleet
#

it's been getting worse; parts of the system don't register that sets of actions have finished

#

yes, it should point out everything that's queued

#

this is a v1 thing, not quite ready for prime time

#

lotsa things spinning: most have already finished. I complained about this and they have an internal issue for it, but not fixed yet

#

also your korean pr is blocking the new one, probably

onyx hinge
#

okay thanks for the deets @tulip sleet

manic glacierBOT
#

.. which we can tell by whether the environment variable is non-empty.

This fixes a problem where, when I push to my own circuitpython fork, which has actions enabled, I eventually get a failure at the upload step. See e.g., https://github.com/jepler/circuitpython/commit/8e9ac593963537f2504efdfeefe28782de68a53f/checks?check_suite_id=315428254 where all board builds fail at the upload step.

This may only affect users who have deliberately enabled actions within their fork, or maybe acti...

onyx hinge
#

well that was a bit of a rabbit hole 🐰 goodnight

lone sandalBOT
plucky flint
#

πŸ‘‹

plucky flint
mystic shell
#

hey all!

#

i'd like to ask about creating modules with c for micropython

#

ideally i'd love to mix between arduino code and micropython code, but i know that's theoretically not possible (they have different backends) but might actually be possible (most arduino implementations are wrappers for platform-specific function sets)

#

but mostly, i'd like to know if there are examples on how to access things like i2c from the c side

stuck elbow
#

well, just look at the micropython code to see how it does it

onyx hinge
#

A side effect of the non-finishing actions runs seems to be that the artifacts don't become available either. 😦

manic glacierBOT
main meteor
#

@mystic shell I think what you describe is fairly straightforward. You should be able to find C I2C code easily enough (it's not a difficult protocol, you can bit-bang it fairly easily if need be). However, I don't have any examples to hand.

onyx hinge
#

In CircuitPython, the builtin displayio module is an example of using circuitpython's I2C from C code. However, that'll be different than in Micropython.

tulip sleet
#

@onyx hinge A side effect of the non-finishing actions runs seems to be that the artifacts don't become available either. 😦 Yes, we've been relying on this, and now have to pass .uf2's around for testing.

#

@onyx hinge re new gccthey are early! usually they don't release until December. Thanks for noticing

plucky flint
#

Hey... so I'm sooooo close to getting this radio module working (as in "make it work, make it work correctly, make it work correctly with tests and docs").

#

I'm still at the "make it work" stage. I can broadcast messages. That all works fine. I can also see incoming entries when I don't specify the AdafruitRadio subclass of Advertisement -- I can see the messages broadcast from the other device to the receiving device. However, when I pass in the AdafruitRadio advertising class into the start_scan method on BLERadio it doesn't work. It appears the start_scan method on the instance's _bleio.adapter doesn't like it when there are prefixes from my new AdafruitRadio class.

#

I get the feeling I'm missing something here... πŸ˜‰

#

Any hints...?

#

Both the sending and receiving devices report that the message is: b'\x1e\xff"\x08\x1a\x01\x00Hello0\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00'

plucky flint
#

NOTE the channel setting/feature isn't yet implemented.

manic glacierBOT
#

xgettext has a mode where it reads files from stdin ('-f-'), but this does not have a zero-delimited variant documented. Still, we will assume that files with adversarial names are not committed to circuitpython or created by the build process, and print newline-delimited filenames from find to be processed by xgettext -f-.

I think this should be OK (I think you are saying this) because we are primarily worried about non-linebreak-whitespace, and xgettext -f is going consider only ...

manic glacierBOT
plucky flint
#

@idle owl @slender iron when it comes to this morning's (damn timezones) ;-) meeting, I've a piano lesson pick-up and then I'm myself playing in a rehearsal. I'll be there but would really appreciate it if I can go first. Quite understand if not, I've put all the details in the doc for the meeting. Also, I'll email over a progress report before I finish for the day. TL;DR AFAICT progress = good and the code is v.simple. Standing on shoulders of giants etc... πŸ‘

idle owl
#

@plucky flint Of course you can go first! Remind me right before the meeting please.

plucky flint
#

πŸ‘ Thank you!

onyx hinge
#

huh for some reason I thought the bluefruit would be faster than the metro m4 express but it's not in my test

idle owl
#

@onyx hinge I wouldn't think so, I think the Metro is a beefier version of the M4 chip because there's room for it on the board. But I'm also guessing here.

onyx hinge
#

OK, now that I check it's 120MHz for the Metro and 64MHz for the CPB

idle owl
#

Hey I knew a thing!

onyx hinge
#

that puts these results roughly in line

#

(( if it's newer it must be faster? not so! ))

#

I think in my mind I was comparing it to the CPX which is of course not an M4 at all

idle owl
#

Indeed.

onyx hinge
#

@idle owl I'll have to leave the meeting promptly at 2 but I don't think that should pose a problem.

#

that's 3PM eastern to you

idle owl
#

Might miss out on some In the Weeds action, but nah, it's not a problem. Turns out as long as my laptop doesn't crash, it's recorded πŸ˜‰

#

I imagine you shouting "That's 3pm eastern to you!" like "That's MISTER JEPLER to you!"

onyx hinge
#

hah

manic glacierBOT
#

run_background_tasks: Do nothing unless there has been a tick

To do this, we need the refactored tick (moved to supervisor), so that we can add the atomic flag setting in just one site instead of in all ports.

This improves performance of running python code on a samd51 34%, based on the "pystone" benchmark on metro m4 express at 5000 passes (1127.65 -> 1521.6 passes/second).

In addition, by instrumenting the tick function and monitoring on an oscilloscope, the time actually spent in...

manic glacierBOT
idle owl
#

<@&356864093652516868> Weekly meeting in a little over an hour. Please add your hug reports and status updates to the notes doc even if you'll be attending the meeting - it's incredibly helpful. Thanks! https://docs.google.com/document/d/1MDbbC35odld_VaqHhBtGVwKkKMIYb89iIbqGFENKcJc/edit

manic glacierBOT
ionic elk
#

@tulip sleet can I bother you with a C question or are you setting up for the meeting

onyx hinge
#

@ionic elk is it worth just asking the whole channel?

idle owl
#

@ionic elk Currently in a meeting.

ionic elk
#

@onyx hinge if you're down! I'm trying to figure out the following snippet of code:

    #ifdef MICROPY_HW_NEOPIXEL
    const mcu_pin_obj_t* neopix = MICROPY_HW_NEOPIXEL;
    //if (pin_port == MICROPY_HW_NEOPIXEL->port && pin_number == MICROPY_HW_NEOPIXEL->number) {
    if (pin_port == neopix->port && pin_number == neopix->number) {
        neopixel_in_use = false;
        rgb_led_status_init();
        return;
    }
    #endif  
#

the commented line throws a compiler error: invalid type argument of '->'

#

which is weird because a) this works in every other port and b) even the debugger and print messages show that the neopix variable and the macro are identical

onyx hinge
#

@ionic elk this is in stm32 I assume, with code shuffled over from samd?

#

can you show the line which #defines MICROPY_HW_NEOPIXEL?

ionic elk
#

I'm running into it in the stm32 port, it's not strictly based off either other implementation, it's just trying to use a macro like they do

#

#define MICROPY_HW_NEOPIXEL &pin_PC00, which is the same as other ports

onyx hinge
#

ports/atmel-samd/boards/winterbloom_sol/mpconfigboard.h:#define MICROPY_HW_NEOPIXEL (&pin_PB03)

#

can you try adding the parens as in this random case?

ionic elk
#

is it the parenthesis?

onyx hinge
#

I am betting that &a->b is &(a->b), not (&a)->b due to operator precedence

ionic elk
#

yep that was it, thanks!

onyx hinge
#

you're welcome

ionic elk
#

yeah I should have spotted that. Good to remember for preprocessor use

onyx hinge
#

so I'd say general C advice is that a #define should be parenthesized unless there's a specific reason it shouldn't

#

It's easier to see when it's #define FOUR 2+2

#

as 2*FOUR is now 6, not 8

ionic elk
#

yeah it's a good point, I was probably thrown off by how many stm32 functions take &a->b as an input, but they actually want the &(a->b).

manic glacierBOT
onyx hinge
#

@idle owl we can hear each other, you aren't hearing anybody?

idle owl
#

Yeah I can't hear anything. Troubleshooting now.

onyx hinge
#

everybody with a clicky keyboard: unmute now and type

plucky flint
#

@idle owl we can hear you tap dancing... πŸ˜‰

manic glacierBOT
cunning crypt
#

New work schedule means I can actually join in! Just listening today, though, so no hug report/status update

onyx hinge
#

is the state of CJK support in CP such that "double wide" glyphs aren't supported? and that's part of why the Chinese translation chose Pinyin?

sterile bronze
#

lurking

tulip sleet
#

i am not sure we need utf16 support, which we'd probably want to have, or if it's just lack of glyphs

#

new joiners: still debugging audio

turbid radish
#

We can hear you Kattni

onyx hinge
#

foley work continues

river quest
#

oh, while we're hangin out, hug report to @onyx hinge for startin to do more work with adafruit!

onyx hinge
#

@river quest right back at you

solar whale
#

we can skip recording and just request it from the NSA afterwards πŸ˜‰

wraith tiger
#

Just lurking

onyx hinge
#

@tulip sleet "double width" refers to how things are rendered in fixed-width terminals, not to in memory representation

turbid radish
#

It'll be a few minutes folks

onyx hinge
pearl notch
tulip sleet
#

@onyx hinge I didn't mean to connect double-width with utf16, but I have a vague memory that we didn't have utf16 support which we needed for the CJK support, (or it would be very helpful for space reasons). But I think the main thing was lack of Korean glyphs even for the syllabic alphabet

#

we don't need that many glyphs for Korean, but we didn't have the Korean glyphs merged into the terminal font

idle owl
#

Rebooting.

onyx hinge
turbid radish
#

I have Cherry Blues I think

plucky flint
#

The keyboards I most prefer have 88 keys and come in black and white... πŸ™‚ 🎹

turbid radish
#

I have an IBM Model M but it has the IBM original PC keyboard plug

tidal kiln
#

oops. was heads down in the forums. here now but lurking.

#

ohh. looks like maybe i'm just in time πŸ™‚

cunning crypt
onyx hinge
turbid radish
#

@onyx hinge omg!

#

Sorry, @cunning crypt that is wild!

plucky flint
#

I worked at The Guardian when the Snowden revelations were in full swing. When MI5 came to the offices to destroy the hardware (laptops) containing the data, they made especially sure to destroy the chips related to the keyboard (buffers?).

turbid radish
#

Does that combo even work??

onyx hinge
#

@turbid radish my Model M has a PS/2 keyboard connector which still works on my newest desktop, happily

cunning crypt
#

@turbid radish Highly doubt it

plucky flint
#

Dvorak is a pretty awesome composer. Hated tuba players tho... I only get 14 notes in the whole of Symphony No.9 πŸ˜‰

turbid radish
#

@plucky flint - interesting......

plucky flint
#

The journalists took videos of the MI5 folks destroying things, and there was a LOT of speculation about why they destroyed such-and-such a bit and not some other bit.

turbid radish
#

I've destroyed computers for security in the distant past

onyx hinge
#

no, kattni, we were all replaced by robots. it is beautiful and serene. join us.

river quest
#

ok @idle owl we are now recording

#

so you're all set

plucky flint
#

@idle owl I'm afraid I have to step away... youngest needs picking up in 10 minutes... 😦

river quest
#

that was exactly 10 mins too

wraith tiger
plucky flint
#

@idle owl πŸ‘

river quest
#

i was able to set that up, hah

cunning crypt
#

@river quest You know your stuff

plucky flint
#

ciao ciao folks... perhaps next time... πŸ‘‹

cunning crypt
#

"It'll take 10 minutes" ten minutes later "It's done!"

river quest
#

i just need 1 more min to get back to other computer, etc

idle owl
#

@river quest If you're actually talking, I can't hear you

turbid radish
#

I cannot hear Phil either

idle owl
#

ok

pearl notch
onyx hinge
#

@river quest knows how long it takes to install software, but not how long it takes to walk to the other computer

pearl notch
#

I’m using it with my students.

idle owl
#

@river quest Let me know when you're ready.

river quest
#

will do, need 1 more min

#

hah it disconnected, but it's back now, recording!

pearl notch
#

Pointer to example of reading serial input with CircuitPython? On CPX.

meager fog
#

On Nov 14 @pimoroni tweeted: "Hand placed by @GregDavill Hand-placed.." - read what others are saying and join the conversation.

Here's a clip of @MLE_Online and myself presenting our badge hacks at #supercon. Full video available from @hackaday at https://t.co/qaz8O7jL4u.
#loudbadges https://t.co/LhSzOOEoLt

β–Ά Play video
turbid radish
meager fog
#

Here's a new @adafruit "radio" module, built on top of @tannewt 's amazing BLE work. It has a very simple, beginner-friendly API for sending arbitrary bytes and strings over BLE:

https://t.co/M0cSDz6Nd6

All feedback most welcome. Thank you..!

#

Arm AIoT Dev Summit December 2 – 3, 2019! Python badges (and more will be there)...
http://arm.com/AIoT-Dev-Summit

turbid radish
#

I am posting 2 entries per day on the Adafruit blog

meager fog
#

Makerspace survey: they’re looking for members and leaders of makerspaces (whether they be makerspaces, biospaces, hackerspaces, art spaces, you name it, wherever they are at) to fill out the annual survey so they can continue their work of creating a longitudinal dataset that tells them about the impacts that these spaces are having across the country and around the world:
https://makethedata.org/take-the-survey/

#

GitHub Archive Program - Preserving open source software for future generations. Get your code into the GitHub Arctic Code Vault by 02/02/2020
https://archiveprogram.github.com/

GitHub Archive Program

The GitHub Archive Program will safely store every public GitHub repo for 1,000 years in the Arctic World Archive in Svalbard, Norway.

onyx hinge
#

someone in 3020: we finally found that last bug in circuitpython 5!

solar whale
cunning crypt
#

(Lurking)

sterile bronze
#

lurking

trim elm
#

Lurking

tidal kiln
#

yep

swift arrow
#

lurking

old smelt
#

I just lost audio...

pearl notch
#

Nice, Jeff!

turbid radish
#

Yay Jeff!

manic glacierBOT
old smelt
#

Ugh, sorry all. I heard kattni hand the baton to Hierophect and then lost all audio.

Have to head to a 2:00 meeting. Have a great week!

wraith tiger
#

lurking

ionic elk
#

if I drop out before or during my update it's cuz internet

turbid radish
#

If you're a CircuitPython fan and are not a subscriber to the Adafruit Python on Hardware newsletter, please consider joining. No spam, your email is never sold, just one newsletter post a week with all the CircuitPython/MicroPython/Python news, projects, and events.
Subscrive at https://www.adafruitdaily.com/ and click the Python on Microcontrollers Newsletter.

pearl notch
#

Louder, please

#

Yes

swift arrow
#

yes

pearl notch
#

Too close to mic now

turbid radish
pearl notch
#

We need Goldilocks

onyx hinge
#

πŸ‘‹ gotta πŸ’¨

turbid radish
#

Or are you a Twitter fan? Follow @river quest and @CircuitPython for CircuitPython goodness.

pearl notch
tulip sleet
#

@inland tusk, is it "sunbox" synth? not sure of spelling

pearl notch
#

I’d love ideas on make the physical β€œbars” of the bar chart.

swift arrow
#

@tulip sleet were you saying there is going to be a CP 5.0.0 alpha 0? That will have the BLE api changes coming soon?

tulip sleet
#

beta.0

swift arrow
#

ahhhhhhhhhhh

#

I was trying to figure out how we were going from Alpha 5 to 0 πŸ™‚

#

makes sense.

#

really looking forward to that and helping to beat on it once it drops

tulip sleet
#

@ionic elk Limor requests: Could you do urandom first, and then add all those boards?

manic glacierBOT
meager fog
#

@onyx hinge hihi ok scott/dan will review your ticks PR

#

whats next?

manic glacierBOT
onyx hinge
#

@meager fog nrf i2s bug report

#

Maybe a gcc upgrade

tulip sleet
#

@onyx hinge You could do some quick sample builds and see if gcc9 update gives any significant space improvement on M0 builds. Otherwise we can hold off for a while.

onyx hinge
#

@danh ok I'll look at size and performance

solar whale
#

@plucky flint fired up the ble radio example on a pair of CPB -- works great!!

meager fog
#

@onyx hinge ok sounds good, once those two are PR'd (or abandoned :), ping me if you have more time for the week and we'll figure out whats next!

onyx hinge
#

Will do!

meager fog
#

@ionic elk ok your next todo after you're happy with neopixel is urandom

#

the rest are more structural, you'll want to wait till scott is back around

solar whale
#

@plucky flint even got a "3-way" going with 2 CPBs and an nrf52840_express -- no problems with multiple senders/receivers -- posted example to your repo

manic glacierBOT
meager fog
#

@solar whale nice!

#

what range do you get?

#

im curious πŸ™‚

solar whale
#

hmm -- haven't tried moving about much -- I'll try now

#

several meters works fine -- at about 10m - the receive rate seems to drop off -- but still receives.

#

can't get much farther -- my house is not that big

#

that was transmitting from nrf52840 express -- receiving on CPB

#

over 10 m -- get nothing

#

very rough estimates - and walls

#

I can try to be more systematic later - or tomorrow,

manic glacierBOT
tulip sleet
#

@ionic elk I can send you a movie. I'm having trouble getting the board into DFU mode. It worked once, and I loaded it, but now it's flaking out again

ionic elk
#

I'm not super up to date on DFU stuff! I've been meaning to spend some time on it and I'm ready to do that whenever, but I've always simply been a heavy STLink user

tulip sleet
#

@ionic elk top movie is when ready to enter REPL. You can see the brief flash on each cycle of the pulse. Bottom is in REPL, just very bright

ionic elk
#

Yeah that's visibly not the behavior I ahve

tulip sleet
#

i'm reloading my .bin, will try yours in a minute

ionic elk
#

Is it possible that it's a different edition of the neopixel, and I haven't hit the sweet spot of compatibility? I noticed there were mentions of timing differences between the WS2812 and WS2812B in the nrf port

tulip sleet
#

well, I think our boards were made around the same time

#

have to Saleae the output and check what the clock rates are

ionic elk
#

if you figure out a way to get a saleae hook on the neopixel please send pics of that tooπŸ˜†

tulip sleet
#

i can try external neopixels in a bit; still trying to get it into DFU mode

ionic elk
#

do you not have a stlink available?

tulip sleet
#

what I have done in the past is to redirect the neopixel pin to another external pin so I can monitor it there.

#

sure, I do, but I haven't soldered the SWD header on the board yet

ionic elk
#

not to imply we shouldn't get dfu working properly

#

yeah you need to use it with extension headers too since it won't fit in a breadboard after you do

tulip sleet
#

i have to go out in about half an hour and will try again tomw

ionic elk
#

k

solar whale
#

@tulip sleet I have had trouble getting to DFU mode. So far it has worked after a few failures. Not sure why.

tulip sleet
#

it's mysterious. I solder a header on (had to trim one end to make it fit, and am now seeing if my header soldering is any good

solar whale
#

I’ll try more systematic testing of DFU tomorrow and report.

tulip sleet
#

ok, GDBServer success

#

@ionic elk could you pass me a firmware.elf?

#

from your own build?

ionic elk
#

lemme get my urandom PR up real quick here

tulip sleet
#

np, i have to leave imminently, just drop it here when you have a chance

manic glacierBOT
ionic elk
#

ok, thanks dan

tulip sleet
#

reloading via j-link gives the same neopixel effect, so it's not a load problem

ionic elk
#

hmmm

onyx hinge
#

@ionic elk for scoping you could redefine the neopixel to be on an exposed pin that is easy to probe

manic glacierBOT
ionic elk
#

@onyx hinge oh yeah I did that when I was testing. But I'm not seeing any of what Dan is encountering locally.

#

The behavior of my Feather F405 pretty much identical to my M4 express