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)
#circuitpython-dev
1 messages Β· Page 271 of 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
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)
oh that's true.
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
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
it's still going to call the background task checker RUN_BACKGROUND_TASKS between statements
oh between all micropython instructions you mean
@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
right
Still, why would 100 -> 188 in that case? if it's additive, that doesn't really make sense as an output
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
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
@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
@theacodes So are you satisfied with the PR now, or are you still exploring?
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...
Sounds good. I'll wait for you to test on nRF and then merge if that goes fine.
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() ?
@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 It's also described in a guide with a dedicated page on it: https://learn.adafruit.com/circuitpython-essentials/circuitpython-storage
@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?
you can write to a file just like the normal python api
@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
Trying to work on this issue here --> https://github.com/adafruit/circuitpython/issues/2149
So far able to create an empty code.py file
are you the last person who commented on that issue?
Yes I am π
ok great - a lot of people are on break this week
you may want to wait till next week
to get a faster response
π
i also know micropython creates files with stuff in them
you can look upstream
but thats my limit
Good idea, lemme see
@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
I also would like to use the SAMD51 (Adafruit feather M4) as a SPI slave. Please let us know once progress has been made.
@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.
I'm glad these boards could arrive just in time for me to not be able to assemble them because of Supercon: https://twitter.com/theavalkyrie/status/1192593723776831488
But now I have pictures so I can add the board to circuitpython.org π
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.
GitHub
This is an implementation of json_transform (was json_transforms) described in #38.
Developed for and tested with nasa.py a new version of NASA image viewer from Adafruit Learn: PyPortal NASA Image...
@simple pulsar just needs a release done. that will trigger the bundle to grab the latest. looks like latest release was done just one commit before that merge:
https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/releases/tag/3.1.3
@ivory yew That's a good-looking build! I like the patterned trace, that's a nifty touch.
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.
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...
Some q's and a few things to fix.
I would say "in use", because "busy" might imply it's actually transmitting.
Remove "You must ". Saves a few bytes.
OK, great! On to real-world testing and use!
Oh rad, that got merged. π
This is done in #2271. Boards can now enable the decorator by adding CIRCUITPY_ENABLE_MPY_NATIVE to mkboardconfig.mk.
@dhalbert could we close this?
@theacodes I'll revise the title, since the other decorators are still not turned on.
I think asm_thumb should work, too, but I didn't test it.
ah, ok - could you do a quick test that it's on?
perhaps tonight. I'll report back.
For my own reference (and others, if you're curious):
CIRCUITPY_ENABLE_MPY_NATIVE turns on MICROPY_EMIT_THUMB and MICROPY_EMIT_INLINE_THUMB.
micropython.native needs MICROPY_EMIT_NATIVE.
micropython.viper needs MICROPY_EMIT_NATIVE.
micropython.asm_thumb needs MICROPY_EMIT_INLINE_ASM.
// Convenience definition for whether any inline assembler emitter is enabled
#define MICROPY_EMIT_INLINE_ASM (MICROPY_EMIT_INLINE_THUMB || MICROPY_EMIT_INLINE_XTENSA)
OK, so it's on, so this can be closed! I thought these were more separated than they are.
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...
On the SSD1305 displays, it is unable to find the display.
After looking at the code for common_hal_displayio_i2cdisplay_construct() inside of shared-module/displayio/I2CDisplay.c, I see that it does a probe prior to doing a reset and so it never finds the display. Manually resetting before initializing fixes the issue.
[adafruit/circuitpython] Pull request opened: #2276 Enable float instructions support for asm\_thumb
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...
LOL... examining things, this doesn't look needed anymore.
py/mpconfig.h now auto-defines this one. (ISTR that wasn't the case a year or two back).
closing. :)
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...
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...
ah -- this may be the problem:
pi@gjnpi4desk:~/projects/circuitpython/ports/cxd56/spresense-exported-sdk/sdk/tools/linux $ ./mkspk
-bash: ./mkspk: cannot execute binary file: Exec format error
how did we get qtouch working outside of atmel studios?
@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 ...
Enjoy the videos and music you love, upload original content, and share it all with friends, family, and the world on YouTube.
Thank you
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. π§
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[...
@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?
Yeah, itβs supposed to be. Iβll take a look when I get back to my computer tonight.
OK --thanks -- no rush -- just want to make sure you were aware.
intentional? not that i know of... i probably broke something. i'll check into it when i can.
Thanks!
Possibly none listed because none got added....but the last 2 releases have not listed anything
oh yah, it's just brand new. still getting things all setup.
@tulip sleet got my "ble_rover" to work with the new UARTService, very minor changes needed. just copied from the uart_echo_test example
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!
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.
oh, i thought you meant JP's guide, but yes, the other will be good too
the one I am using is on a feather nrf52840 and I have added some neopixels
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
@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!
@split ocean here is a modified version of the turtle_ble rover that seems to work
@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 ....
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.
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.
thanks, great point, I'll add a note in the guide that tweaking motor speeds in the code may be required.
these are fun to play with π
now I can drag race my feather_nrf52840 and my CPB π
ah nice! I think the CPB version of the code may win for precision control, but the Feather one on raw, reckless speed!
hum I wonder why the "unix" port doesn't work right with -flto specified...
@gpshead We should add noop decorators to the micropython module in Blinka: https://github.com/adafruit/Adafruit_Blinka/blob/master/src/micropython.py
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>
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.
@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.
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.
@pulsar python Did it work previously with this battery -- verify that the battery polarity is correct.
@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.
@pastel panther this person is waiting for a reply from you, when you have a chance: https://forums.adafruit.com/viewtopic.php?f=60&t=157748
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...
Do you have a schematic of how the flash chip is connected?
Do you happen to have a logic analyzer and can look at the signals?
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
@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
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!
phew I'm glad @stuck elbow knew the answer!
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).

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...
@kamtom480 Any suggestion?
Did you try it in a regular SPI mode, not QSPI maybe?
@Casey10110 are you using CircuitPython or Arduino to test this?
Unfortunately, currently mkspk on ARM is not supported. In the next Spresense SDK release, it will be possible to support this. When it is released, I will prepare PR.
@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.
@solar whale I only tested it in the REPL, and it's possible I wasn't very thorough
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....
@solar whale I didn't actually test it because I didn't have pairing working when I tried it
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.
I didn't think CTS worked without pairing
it's not actually working .... all 0's for the time
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
I had to make mods to standard.py -- it did not like the imports using core did you fix that in yours?
ah, I thought I had fixed all of those
not in the current master
maybe not. I haven't retested recently
I mainly tested advertising and uart service
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
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"
yeah, you'll have to force sphinx/automodule to include __init__.py.
There is no going back ..... π
i'm here will be text only (on a train)
π to get that out of the way
π
Come to New Hampshire...
@river quest yay to snektrain
I am lurking for a bit then offline. πΆ
lurking
lurking
does a sommersoft make a noise in the forest if the mic is on but sommersoft does not say anything?
tis a mystery... π»
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
@river quest oh no, we depend on you and your mellow voice
next week!
you know it
@odd flax you should be alright. I have done it before coming up from florida
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
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/
Winterbloom Sol is a modular synthesizer (Eurorack) module. It is a multi-purpose, scriptable USB MIDI to CV/gate converter. Its code can be modified while i...
Python #2 language on GitHub, read all about it:
https://octoverse.github.com/
Sponsoring Bunnie on GitHub, we did, and if you want to support bunnie's work, please do so!
https://github.com/bunnie
Lurking
There are now 13 entires for the Take Flight with Feather contests! Design a board to fit in the Feather ecosystem and weβll manufacture it.
https://hackaday.io/contest/168107-take-flight-with-feather
As always, please open an issue, a PR, email, tweet, send an owl, whatever works, contribute to the newsletter:
https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2019-11-12-draft.md
Special thanks to Matt for adding a bunch of MicroPython news and links.
thanks scott!
(train wifi stopped workin for audio, so i just guessing it all worked out π
π― + π―
late and lurking...
tinyusb is hugely enabling for microcontrollers, can't imagine being without it
yea!! congrats @onyx hinge
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!
π will read off after siddacious
oh yeah I forgot to hug report everybody who will be repping circuitpython at supercon!
yea! that will be an awesome episode of JP-workshop
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
That's a Catalina thing @solar whale
ouch!
Ouch! Feel better soon!
Yep!
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
The solution Dan, Limor and I came up with for defining CVs (controlled vocabularies) for drivers for things like data rate, range, modes, etc.:
https://github.com/adafruit/Adafruit_CircuitPython_LSM6DSOX/blob/master/adafruit_lsm6dsox.py#L94
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.
tummy rumbles. must find honey. π―
Could you just send them periodically in the MIDI stream, scheduled rather than on demand?
@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
which version of the library are you using? Should be https://github.com/adafruit/Adafruit_CircuitPython_BLE/releases/tag/2.0.1-alpha.2 for CPy 5.0.0-alpha.5
@tulip sleet OK, that cleared up the error
versions will change again on the next alpha (or it might be beta.0)
@tulip sleet THanks for the help, took a while but I now have the nrf52840 talking to the iphone!!!!π now on to motor contorl
yay!
@tulip sleet One more question, where you able to confirm if the white box in the control pad could be used for messaging?
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.
@tulip sleet Thanks, Adafruit and it's staff ROCK
@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
@tulip sleet what would be the command to do that?
@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
@tulip sleet, Thanks IT WORKED! Ok i will experiment and let you get back to your life. Thanks for all the info and time 
@tulip sleet when do you want to chat? I'm free the rest of the day
i was just going to ping you. now is fine
kk
timely comment by dan β¬
looks like one needs to work with a very specific adafruit_ble release?
or, not release, tag
I would love to look into this. I'm adding it to my list of things to look into while I have free time over the holidays, but it should absolutely not discourage anyone else from taking this on - just please reach out if you want to collaborate. :)
i thiiiiiiiiiiiink we needed more USB endpoints? or were waiting till we could config the USB endp on/off states - e.g. disable MSD on demand
@dhalbert Why does it make the builds bigger, is this just because literal ints end up with a larger representation in mpy files? Would having yet another function to return (seconds, milliseconds) as an (int,int) tuple be another option to support all boards?
@kevinjwalters The builds are bigger because we need longints to support time.monotonic_ns() values, which are larger than regular ints.
We have talked about adding another function, but it would not be in time, because we don't want to add new functionality to a standard module.
@tulip sleet Why does the build get bigger when long int is provided?
because there is extra code to manage and compute with longints that is omitted without them
oh, I thought there might be more to it
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
@dense pike Python functions need to be defined before they are used within the same scope
My concern was that the HAL handler stops the reception before calling the RxComplete callback and leaves a gap before it is re-enabled by the next call to Receive_IT is called. If a byte is received in this gap then it will be missed. This probably isn't a problem for UART data because the gap is quite short. However, there is a gap that isn't needed.
I have one non-blocking comment. Will change review to comment so it can be merged after approval from @dhalbert
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 ...
Thanks for adding the shared pin level reset. Makes total sense to not expose the struct members outside of the port.
A couple small suggestions but good otherwise.
deinit should undo this. release_displays won't work otherwise.
I know this hasn't been said anywhere but I only use the common_hal_ prefix for shared API that maps to Python API. For cross-port functions, they should just be added here without a prefix like assert_pin and assert_pin_free already.
note there's webserial nowadays. could be interesting to try that - it may 'just work' (?)
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...
@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")
getting corrupt .mpy file using CPv5.0.0 Adafruit Feather nRF52840 Express
any suggestions? thanks Tim
uf2 file adafruit-circuitpython-feather_nrf52840_express-en_US-5.0.0-alpha.5.uf2
could you copy the libraries again? that error might be from a truncated file
or you may need to download again
Ok, downloaded file again and reloaded lib files. All is working!
π thanks
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
Hi all, what is the procedure to add a board to https://circuitpython.org/downloads. I want to add boards based on SAMD21 uController. Thanks
@dim peak see here for an example https://github.com/adafruit/circuitpython-org/pull/324
Thanks @indigo wedge
Should this be closed? The library requested is released and getting properly built. I even consolidated the example scripts to comply with getting built in the community bundle.
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...
@2bndy5 Just curious why you chose an Argon - Are you planning to use the ESP32 co-processor on the Argon as well? Would you be able to work just as well with the Feather nRF52840 express (out of stock) or the Particle Xenon?
CC03 is a ATSAMD21G18 Cortex-M0+ breakout in xChips format. CS11 is the same, but with a SD Card Interface.
https://xinabox.cc/products/cc03
https://xinabox.cc/products/cs11
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...
That was my concern -- the limits of the AT command set on the Argon -- I just verified that the Xenon works fine with an Airlift Featherwing and Airlift Breakout.
as to NFC -- there is some discussion of it on the guide for the feather nrf52840 express, I have not tried it. dee the Pin D2/NFC2 secition https://learn.adafruit.com/introducing-the-adafruit-nrf52840-feather/pinouts
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...
@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
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.
please change "CC03" and such to a more descriptive name, such as "XinaBox_CC03" etc
[adafruit/circuitpython] New review comment on pull request #2280: Support for XinaBox CC03 and CS11
delete unused pins, dont comment them out
[adafruit/circuitpython] New review comment on pull request #2280: Support for XinaBox CC03 and CS11
Do not use the same VID/PID
yep! library is here for future wanderers:
https://github.com/2bndy5/CircuitPython_nRF24L01
fix the circuitpython build naming first please
@slender iron also have some q's re possibly making ComplexCharacteristic a subclass of Characteristic (it is not now).
@dim peak there is a guide for adding a board here too: https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython
@tulip sleet eating cereal and then around until noon my time
@slender iron sure, ping me when ready
kk
ok @tulip sleet
@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.
@idle owl if the q is whether RuntimeError is a good choice, yes, I think so: indicates some problem beyond the program's control
don't need elif really because the raise exits the routine
Ok
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
Ok that's a good idea thanks
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
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"
Gotta have that w h i t e s p a c e
good example of me being extreme about this: https://github.com/theacodes/Winterbloom_SmolMIDI/blob/master/winterbloom_smolmidi.py#L106
@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.
I think pep wants 2 blank lines before and after function/method definitions
I (personally) find PyLint infuriating. I ended up removing it from my projects about 2ish years ago?
@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.
Didn't think you did π
All of my projects use black, flake8, and some have adopted mypy.
Fair enough.
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.
Also fair enough.
(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)
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
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.)
the typo checking is helpfful
I know Black was intriguing.
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
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.
SmolMIDI has 100% test coverage and just uses a small Stub for usbmidi.PortIn: https://github.com/theacodes/Winterbloom_SmolMIDI/blob/master/tests/test_winterbloom_smolmidi.py#L9-L26. That plus some testing to validate the behavior on real hardware gives me a fairly good amount of confidence.
But I missed the buffer overflow thing by not having real hardware to test with.
@raven canopy is working on a testing framework which I don't understand yet
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.
@tulip sleet once I can understand my creation, I'll be able to explain it better. π€£
@ladyada regarding TFT featherwing: logic analyzer comparison to reveals that there's no obvious pin level issues with the SPI connection, such as something being disabled or otherwise not communicating properly. The two feathers both have active SPI but send very different data on different intervals.
@ladyada I've confirmed SPI is still working fine with the NOR flash chips and my other screens and devices, so the issue with this may be coupled to the python component. I'll do my best to try and figure it out but anyone you can think of with more python experience would be a welcome testing addition.
please get all other issues/PRs for STM resolved, and we'll visit this after
please get all other issues/PRs for STM resolved, and we'll visit this after
Should this PR still get merged, for other displays? Or should it wait on the TFT issue?
it should wait becuse there is some underlying issue
OK, let's go with this now! I agree with @tannewt that there is a chance you may lose characters due to disabling/enabling, but we can revisit that after some user testing.
In atmel-samd/mphalport.c, there's a simpler way that just has a NOP loop. It looks like get_us() could be relatively expensive. What made you choose this way over the atmel-samd way, or over the CYCCNT way that seems to be typical in the STM32 examples I've seen in websearches?
spicy pr incoming
@ivory yew Best kind of PR
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...
This has not be tested yet on hardware, I'll update when I'd had a chance to test it out - just wanted to start the discussion.
Unless there's any objection, I'll likely start working on this in the next couple of weeks. I'll likely have to make changes in tinyusb, first.
Turns out I'm feeling extra spicy today
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...
@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 ...
@tulip sleet you still online? Got a sec to talk about a merge thing?
want to hop in amelia?
in ports/stm32f4/peripherals/stm32f4/stm32f405xx/clocks.c
increase CPU clock from 84mhz to 168mhz with this change
RCC_OscInitStruct.PLL.PLLP = RCC_PLLP_DIV2;
@hierophect I guess this would affect the mp_hal_delay_us calculation too.
@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.
Adafruit CircuitPython 5.0.0-alpha.5 on 2019-11-04; Adafruit Feather M0 Adalogger with samd21g18
OverflowError: long int not supported in this build
when using import adafruit_sdcard
Does CP for the Particle Argon support WiFi functionality?
@old smelt Not directly -- you can reprogram the ESP32 on hte argon to act as a wifi co-processor (but only with the limited AT command set -- not the preferred SPI firmware) see this guide https://learn.adafruit.com/adding-a-wifi-co-processor-to-circuitpython-esp8266-esp32/overview
Ok, great. Thanks @solar whale!
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...
sounds good @tulip sleet
Please see: https://forums.adafruit.com/viewtopic.php?f=60&t=158501
I'll move this to the SD card repo since the fix is to not use large numbers in the library.
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.
@prime flower https://forums.adafruit.com/viewtopic.php?f=60&t=158597
@slender iron thanks, that's a double-post. helping them in the original post on the AIO support forum
@idle owl @tidal kiln https://forums.adafruit.com/viewtopic.php?f=60&t=158336&p=781639
@dhalbert do we support CPU and bus speed adjustment from python? I imagine it's less relevant for the NRF and Atmel ports since they assume set frequencies, but it'd be handy for the STM32.
@ionic elk hihi whats next for stm32 for uuu
@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?
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
as an aside, i would like to have samd51 overclocking support - it overclocks nicely and you get quite a boost! so if y'all come up with a clock adjustment protocol, id want to have it available for other chips
@ionic elk ill test neopixel when you are ready for me to
@meager fog well, it isn't hurting anything atm, and could impact other boards
@meager fog we have the beginnings of this for SAMD, but not to actualy change the clock speed: https://circuitpython.readthedocs.io/en/latest/ports/atmel-samd/bindings/samd/Clock.html
because of min speed increases
@ionic elk yeah but if fixing the clock breaks something, we need to find out what pretty fast
I'll bump up the speed and see what happens then
@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
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.
@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
@idle owl @slender iron i'm wiring up a TMP006 and will try a scan and report back on that thread
@tidal kiln ok i have the next Blinka Quest if you're up for it
sure. shoot.
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
@tidal kiln Thanks for looking into that.
yah. totes. looks fun.
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!
DAC/ADC/PWM would be great
def looks interesting enough to play with
is that dev breakout good enough for testing?
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
i changed clocks.c to use DIV2 and ran some circuitpython tests with time.sleep(), time.monotonic() and with a scope. stm32f405 seems to be running at 168MHz. I didn't find any problems. But absence of proof is not proof of absence. :-)
I've also tested it with a variety of modules today. Submitting a PR momentarily
It's the same bus frequencies anyway due to the APB divisors - I thought there was a APB divisor quirk that would get in the way but it's only at certain low divisor values, and doesn't apply to SPI, etc. So minimum speeds will be unchanged.
@idle owl @slender iron responded:
https://forums.adafruit.com/viewtopic.php?f=60&t=158336&p=781653#p781653
@ladyada I've found some interesting articles about STM32 overclocking today too so that might be a future PR for fun and profit.
@idle owl @slender iron (oops, posted with diff account, fixed):
https://forums.adafruit.com/viewtopic.php?f=60&t=158336&p=781655#p781655
@tidal kiln Thank you!
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.
@tannewt @jepler should we do code.py have
- print ('Hello World!') or
- Blink BUILT_IN LED program
@iayanpahwa let's start with "Hello World". It can be changed to a more sophisticated example later on, if that's what's desired.
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.π
This makes sense and the checks pass.
Testing performed: Locally set for metro m4, built, and grepped through lsusb output:
iInterface 4 Handsome Devil CDC control
I liked your test text, @onyx hinge. π
I worried I was being too immodest
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.
For general clock changing we could just make microcontroller.cpu.frequency settable. We'd need to validate that all of the downstream clocks are ok when this is done though.
Note there is a guide about adding a board to CircuitPython here: https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython
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/...
This goes with https://github.com/adafruit/Adafruit_CircuitPython_BLE/pull/32.
-- Minor doc fixes
-- Allow None as default value for BLE start_scan timeout.
Why didn't this work? It should be mp_const_none so that None can be provided from Python to indicate that there should be no timeout.
I changed it from MP_OBJ_NULL to mp_const_none. Originally, if the argument wasn't supplied, it got the default, but if None was supplied as the argument it tried to convert None to a float.
@slender iron thoughts on displayio on nrf840 w/ parallel st7789s
possible?
@marble hornet you mean 8-bit parallel buses or multiple displays?
8-bit busses
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?
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
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!
I would also love to be able to disable this on per-board basis, to save space for the smaller boards.
We'd need to validate that all of the downstream clocks are ok when this is done though.
For the pyboard (STM32F405) and micropython's pyb.freq(), changing CPU and bus frequency is managed in stmhal/modmachine.c, machine_freq()
Could you please recommend some VID/PID pairs? We want to be able to use with mu editor. Thanks
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...
@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
Hi, have you been and are you currently shipping these two hardware designs with USB_VID = 0x239A? If not, which VID are you using?
@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
@deshipu I agree. @iayanpahwa after you have the basics working, let us know if you need guidance on how to make the code optional
@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.
@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
@tulip sleet not a problem. No rush on the rest.
but useful to know; you try a lot of these we forget to try; tnx!
Bit6 is still under development. It consists of one SAMD21E18. It has a user button and 19 LEDs to play with. It aims at the beginners with CircuitPython. It may need two PIDs for both bootloader and app. I will submit the pull request once it is tested. Thanks.
besides pearing, what other kinds of fruit can a bluefruit emulate?
maybe a grape UART or apricot neopixel
πππ
in terms of the connection to the wifi, is a pyportal the same as a metro m4 with airlift? Or are they different?
They are the same.
thanks @solar whale
Just different names for the pins
@onyx hinge are you having any problems with a it?
@solar whale no, deciding whether to put an express airlift in my basket or not (I have a pyportal)
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
I have a non-airlift metro m4 too
@deshipu sounds cool. @jepler thinking a makefile flag?
@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...
(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)
ndGarage Bit6 VID 0x239A PID 0x0065 # bootloader
PID 0x8065 # arduino
PID 0x8066 # circuitpython
OK @KalbeAbbas @gotfredsen
please reply to the question:
Hi, have you been and are you currently shipping these two hardware designs with USB_VID = 0x239A? If not, which VID are you using?
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...
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...
@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)
@onyx hinge yep lets chat when you return
@meager fog hi
hihi
I can chat now if you like
oh kk
yeah so i think if you want/can continue on squishing audio bugs
and fixing whatever supports needed
that would be rad
okie
the m4 dac is a bit of a lost cause it hink
i mean, if you get a flash of insight..
I was sure not making any headway on it at the end
but otherwise we'll lve with it
I have one of those redboards with m4, I should just make sure the same problems occur there
@santaimpersonator hihi is there any news on this issue? we'd love to add it!
i pinged to see if they wanted to add it, maybe they're close
so you prefer if I put items into basecamp when I'm working on an issue? helps you track things?
ikr
I'll try to remember that just relying on having the issue/pr on github is not best practice
its ok to have issue/pr but then they are scattered
and they get easily forgotten
how about this one? could be an easy win https://3.basecamp.com/3732686/buckets/4356693/todos/2049516543
also with stm32 we could add audioio soon perhaps
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?
@tulip sleet sounds good!
beta.0 sound OK? It's a breakpoint in visibility, which I think is good for BLE, etc.
oh I'm wrong, that first PR is labeled 5.0. Will move it up my stack!
@onyx hinge pardon which PR?
https://github.com/adafruit/circuitpython/issues/2142 from https://3.basecamp.com/3732686/buckets/4356693/todos/2049516543
@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
yup will do
comin' by the monday meetings here is a good place to stay on top of things
Attending the monday discord meeting is a priority for me too
@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
please send an email to pt/me/stella with details
can do
please include dates &cost breakdown/total
okay, it'll be speculative on airfare especially
@onyx hinge we can send you our prev budgets
@tulip sleet that would be helpful
lodging costs depend on hotel vs AirBnB-type-stuff, most other things are fixed
@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.
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.
yes thank u
This is straightforward and looks good to me. I don't think common_hal_... has to correspond exactly to a shared-binding API. If we want to make that so in the future, we can rename things.
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 :) .
just in time for the neopixel PR! thanks Dan
This PR adds Neopixel support to the STM32 port. Tested on a Feather F405 with success. This implementation uses the DWT->CYCCNT to avoid conflicts with Systick timing and allow use in a disabled interrupt context.
Timings are roughly borrowed from the Arduino implementation, but I found they did not work in practice with either external neopixels or the on-feather one, so adjusted magic values had to...
will test if you toss me a bin!
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?
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.
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.
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...
finally got RosiePi's github app completely talking through Azure. the check trigger is 100%; closing the check out is just a dev stub for now. now to work on the test node handling...
demo movie (caution: file is large [107mb])
https://drive.google.com/open?id=11IqbpNI9RncSAD04sdqauepkff9zLGMf
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']
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).
@solar whale yay. btw i tried esp32spi on it, works ifine
Nice, Iβll try that tomorrow! Hooked up an I2C gps, worked fine!
Here is the schematic: edge_badge.pdf
Looks like its attached to PA16 for clock and PA18 for data which are mapped correctly to D5 and D6.
Ok, I've found the Arduino implementation here and it's using the SERCOM in SPI mode to sample from the mic. CircuitPython's ...
Hey all! I've just setup a "Python in Education" server. Let's see how it goes! https://discord.gg/hbxP5ZC
@tidal kiln Did you happen to test the I2C GPS code on RPi with Blinka?
Limor may have tested it, she said it was tested in a comment.
I wasn't sure how involved with it you were.
she just merged it
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.
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.
@tidal kiln Will do, thanks.
tested with neopixel library and fancyled - works like a treat :)
tested hardware only, didn't do stylistic review
Thats good to hear, 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 this CircuitPython repository and request one, we will assist in the process of assigning a PID for use with CircuitPython.
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)
@onyx hinge hey Q
@meager fog go ahead
@onyx hinge did i already ask you if you've done CANbus before?
yah maybe
do you have a car with CAN connection?
not needed
but i dont so like, i def cant try CAN thing
I have used one of those obd readers so I think so. 2013 Prius
Not sure about how I would rig a connection though
is it wireless?
Yes if I can find it the one I have is a Bluetooth uart
ooh ok
BRB 6 minutes
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
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.
<@&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
This is the circuitpython board for the trinket-m0 based shirtty board - as seen at Hackaday supercon 2019.
Repo for the hardware and software: https://github.com/sarfata/shirtty-addon.
@tannewt opening this as promised. Let me know if you have a doc/process on adding new boards.
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.
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
Heh, reminds me of @ivory yew 's comment a few days ago "I love PRs where the description is significantly longer than the diff."
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.
...
@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?
@onyx hinge it is just getting started
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
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
like see here: https://github.com/adafruit/circuitpython/actions
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
okay thanks for the deets @tulip sleet
.. 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...
well that was a bit of a rabbit hole π° goodnight
π
For those following along at home: https://github.com/ntoll/adafruit_radio
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
well, just look at the micropython code to see how it does it
A side effect of the non-finishing actions runs seems to be that the artifacts don't become available either. π¦
@tulip sleet just noticed in the GNU Tools for Arm Embedded Processors 9-2019q4-major Release notes:
Testing performed: built locally for metro m4 express, connected from unicode-capable terminal program, provoked an error:

There are still unavailable characters in the on-board font. I don't know if this should be enough to prevent inclusion of this patch.
@tannewt can we get a fresh review from you? I think maybe this can go in, unless the missing font characters must be considered a blocker.
@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.
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.
@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
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'
Also, see module here: https://github.com/ntoll/adafruit_radio/blob/master/adafruit_radio.py (which is my attempt at just making something work in the simplest possible way).
NOTE the channel setting/feature isn't yet implemented.
π’ OK found the problem. Rubber ducking into this channel found it for me. π The culprit can be found here: https://github.com/adafruit/Adafruit_CircuitPython_BLE/pull/33/commits/7a73b104ce495c7342655547af221abbb32fe4b8
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
findto be processed byxgettext -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 ...
We did consider the lack of glyphs to be a blocker, and adding glyphs could easily overflow the small builds. So I think we will continue to hold this open.
Thank you for the detailed diagnosis!
8e9ac59 Makefile: Fix a problem where xargs invoked ... - jepler [9000c88`](https://github.com/adafruit/circuitpython/commit/9000c88965ea3994d653b25407ef0975e19d4373) Merge pull request #2295 from jepler/make-trans... - dhalbert
Looks like I missed some manual reset conditions in Microcontroller related to the rgb_status shared binding. I'm working on that now, should resolve how the Neopixel isn't consistently showing green during runtime properly.
@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... π
@plucky flint Of course you can go first! Remind me right before the meeting please.
π Thank you!
huh for some reason I thought the bluefruit would be faster than the metro m4 express but it's not in my test
@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.
OK, now that I check it's 120MHz for the Metro and 64MHz for the CPB
Hey I knew a thing!
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
Indeed.
@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
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!"
hah
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...
@tannewt will have comments about 1ms displayio frame rate resolution. He wants to achieve certain frame rates precisely which may not be possible at 1ms granularity
<@&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
Work in progress: https://www.youtube.com/watch?v=0tp9eBxQTyk
This may only affect users who have deliberately enabled actions within their fork, or maybe actions are still a beta/opt in thing at the user level?
I don't have this problem, but I don't have actions enabled on my fork.
@tulip sleet can I bother you with a C question or are you setting up for the meeting
@ionic elk is it worth just asking the whole channel?
@ionic elk Currently in a meeting.
@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
@ionic elk this is in stm32 I assume, with code shuffled over from samd?
can you show the line which #defines MICROPY_HW_NEOPIXEL?
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
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?
is it the parenthesis?
I am betting that &a->b is &(a->b), not (&a)->b due to operator precedence
yep that was it, thanks!
you're welcome
yeah I should have spotted that. Good to remember for preprocessor use
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
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).
tested hardware only, didn't do stylistic review
@dhalbert new commit should fix status LED issues.
@ladyada bin if you'd like to try it again with good status LED
firmware.bin.zip
@idle owl we can hear each other, you aren't hearing anybody?
Yeah I can't hear anything. Troubleshooting now.
everybody with a clicky keyboard: unmute now and type
@idle owl we can hear you tap dancing... π
yep neopixel status is now working as expected
New work schedule means I can actually join in! Just listening today, though, so no hug report/status update
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?
lurking
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
We can hear you Kattni
foley work continues
oh, while we're hangin out, hug report to @onyx hinge for startin to do more work with adafruit!
@river quest right back at you
we can skip recording and just request it from the NSA afterwards π
Just lurking
@tulip sleet "double width" refers to how things are rendered in fixed-width terminals, not to in memory representation
It'll be a few minutes folks
If weβre still using it, folks could add their info to: https://docs.google.com/spreadsheets/d/1NWwiUuQnam_abdv02ugLxz9uFrvhtMfy8U306HJ4_qU/edit#gid=0
@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
Rebooting.
oh is it time to talk about how I'm planning to build my own keyboard (cherry mx brown)? the enclosure is 3d printed.
I have Cherry Blues I think
The keyboards I most prefer have 88 keys and come in black and white... π πΉ
I have an IBM Model M but it has the IBM original PC keyboard plug
oops. was heads down in the forums. here now but lurking.
ohh. looks like maybe i'm just in time π
@turbid radish Just do something like this! https://www.geek.com/wp-content/uploads/2010/08/500x_chain-usb1-500x352.jpg
this is the THing: https://www.thingiverse.com/thing:3478494
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?).
Does that combo even work??
@turbid radish my Model M has a PS/2 keyboard connector which still works on my newest desktop, happily
@turbid radish Highly doubt it
Dvorak is a pretty awesome composer. Hated tuba players tho... I only get 14 notes in the whole of Symphony No.9 π
@plucky flint - interesting......
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.
I've destroyed computers for security in the distant past
no, kattni, we were all replaced by robots. it is beautiful and serene. join us.
@idle owl I'm afraid I have to step away... youngest needs picking up in 10 minutes... π¦
that was exactly 10 mins too
BTW, those of you who are into MIDI & music. There's a YouTube channel I discovered recently called Mitxela: https://www.youtube.com/channel/UCeEf90AEmmxaQs5BUkHqR3Q
@idle owl π
i was able to set that up, hah
@river quest You know your stuff
ciao ciao folks... perhaps next time... π
"It'll take 10 minutes" ten minutes later "It's done!"
i just need 1 more min to get back to other computer, etc
@river quest If you're actually talking, I can't hear you
I cannot hear Phil either
ok
This is a fun way to make electronic music with Ruby: https://sonic-pi.net/
Sonic Pi is a new kind of instrument for a new generation of musicians. It is simple to learn, powerful enough for live performances and free to download.
@river quest knows how long it takes to install software, but not how long it takes to walk to the other computer
Iβm using it with my students.
@river quest Let me know when you're ready.
Pointer to example of reading serial input with CircuitPython? On CPX.
SuperCon was over the weekend, will be posting up coverage and more soon!
https://twitter.com/hashtag/supercon?src=hashtag_click&f=live
https://twitter.com/makermelissa/status/1196456972620455937
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
Simple byte and string based inter-device communication via BLE
https://twitter.com/ntoll/status/1196493256164610049
https://youtu.be/0tp9eBxQTyk
https://github.com/ntoll/adafruit_radio
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:
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
Sophi Kravitz keynote speaker β 2020 Open Hardware Summit, Adafruit is a sponsor:
https://2020.oshwa.org/speakers
Explore Hardware (old and new) with CircuitPython with Scott:
https://youtu.be/NMKm5Zj31jU
Scott presented about CircuitPython on GameBoys at the University of Washington in Bothell. This is recorded from his laptop during the presentation. Slides ...
Take Flight with Feather - Hackaday and Digi-Key:
https://hackaday.io/contest/168107-take-flight-with-feather
Check out the 25 entries here!
https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2019-11-19-draft.md#take-flight-with-feather---hackaday-and-digi-key
I am posting 2 entries per day on the Adafruit blog
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/
All this and more - https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2019-11-19-draft.md
someone in 3020: we finally found that last bug in circuitpython 5!
@pearl notch are you looking for uart example? https://learn.adafruit.com/adafruit-circuit-playground-express/circuitpython-uart-serial or just read via REPL data=input()
Adafruit Learning System
Make faster and easier than ever with MakeCode, code.org CSD, CircuitPython or Arduino!
(Lurking)
lurking
Lurking
yep
lurking
I just lost audio...
Nice, Jeff!
Yay Jeff!
Can we break this down into additional issues? Maybe:
- Double-wide glyphs support (in memory format & rendering)
- Actual Hangul glyph availability
- Enabling only on larger devices, as the storage for the font will be large
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!
lurking
if I drop out before or during my update it's cuz internet
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.
yes
Too close to mic now
You can contribute to the Python on Microcontrollers newsletter by doing a PR for the latest version on GitHub at https://github.com/adafruit/circuitpython-weekly-newsletter/tree/gh-pages/_drafts
We need Goldilocks
π gotta π¨
Are you a fan of Reddit? We have a CircuitPython subreddit full of information updated daily.
Please join us at https://www.reddit.com/r/circuitpython/
Or are you a Twitter fan? Follow @river quest and @CircuitPython for CircuitPython goodness.
Iβve learned a little about Open Sound Control, and Kotlin, so Iβve combined those with Processing and Sonic Pi to create this bubble sort visualization and ...
@inland tusk, is it "sunbox" synth? not sure of spelling
Iβd love ideas on make the physical βbarsβ of the bar chart.
@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?
beta.0
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
@ionic elk Limor requests: Could you do urandom first, and then add all those boards?
Addresses Issue #2149
Create a sample code.py file during board flashing with a print hello world program. Tested on CircuitPlayground Express Board.
To-Do's:
1- Add compiler flags to disable this feature on non-express / limited memory boards
2- Error handling when fail to write the file for any reason
Addresses Issue #2149
Create a sample code.py file during board flashing with a print hello world program. Tested on CircuitPlayground Express Board.
To-Do's:
1- Add compiler flags to disable this feature on non-express / limited memory boards
2- Error handling when fail to write the file for any reason
@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.
@danh ok I'll look at size and performance
@plucky flint fired up the ble radio example on a pair of CPB -- works great!!
@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!
Will do!
@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
@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
I'm seeing a brief bright flicker on the pulsing green NeoPixel (before entering REPL), and when I enter REPL then NeoPixel is extremely bright. Do you see this?
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,
@dhalbert I don't see any differences between my board and my m4_express. I assume you're using the binary in my latest post?
@dhalbert I don't see any differences between my board and my m4_express. I assume you're using the binary in my latest post?
I pulled from your repo and am building the latest stm32-neopixel branch version. Hmm.
You could try the binary, but it's possible I still missed something about the status LED guts - can you give me exact repro steps? And when you say extremely bright, is it as bright as the max LED strength if you plug in 0 FF 0 in a test sketch?
@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
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
@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
Yeah that's visibly not the behavior I ahve
i'm reloading my .bin, will try yours in a minute
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
well, I think our boards were made around the same time
have to Saleae the output and check what the clock rates are
if you figure out a way to get a saleae hook on the neopixel please send pics of that tooπ
i can try external neopixels in a bit; still trying to get it into DFU mode
do you not have a stlink available?
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
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
i have to go out in about half an hour and will try again tomw
k
@tulip sleet I have had trouble getting to DFU mode. So far it has worked after a few failures. Not sure why.
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
Iβll try more systematic testing of DFU tomorrow and report.
ok, GDBServer success
@ionic elk could you pass me a firmware.elf?
from your own build?
lemme get my urandom PR up real quick here
np, i have to leave imminently, just drop it here when you have a chance
@rafa_gould thanks for your work in this PR, I'm sorry technical limitations are making us slow to accept it.
ok, thanks dan
reloading via j-link gives the same neopixel effect, so it's not a load problem
hmmm
@ionic elk for scoping you could redefine the neopixel to be on an exposed pin that is easy to probe
This PR fills in the stub of urandom in the os module, adding true RNG capability to the STM32 port for seeding, etc. Resolves #2168.