#circuitpython-dev
1 messages ยท Page 281 of 1
@idle owl An issue on the Adabot repo mentioned adding the count of good first issues to the weekly stats generated by adabot. Do you think that would be a worthwhile thing to do?
Delays are shorter than expected, due to rounding down, and coarse millisecond precision.
This code gives a 125 Hz waveform, but should be approx 100 Hz.
import board
import digitalio
import time
led = digitalio.DigitalInOut(board.D13)
led.switch_to_output()
while True:
led.value = True
time.sleep(0.005)
led.value = False
time.sleep(0.005)
Details here:
https://forum.pjrc.com/threads/59040-CircuitPython-on-Teensy-4!?p=226231&v...
@onyx hinge I'm interested to see how you approach it. I did take the "never distort" approach. And that 16bit unsigned...no CMSIS and my lack of assembly kept me from getting it done "fast". ๐
@raven canopy some number of steps forward, some number of steps back, and it's not clear what the net direction overall is
I'm getting a "Can't remount '/' when USB is active" error, when calling storage.remount("/", False) , despite the fact USB is not connected while the command is running.
Steps to reproduce
The board has to be battery powered, so that it keeps running the code even when USB is disconnected.
- Get into CircuitPython REPL (over USB-CDC)
- Type the following code:
import storage
import time
try:
time.sleep(15)
success = False
storage.remount("/", True)
...
oops I think I just hosed my IS31FL3731. I had read the docs which said the panel was symmetric so I didn't think twice when attaching it to the driver board. the driver board is upside down. #lfmf
if only I'd actually followed the online guide I couldn't have made this mistake, since they soldered the "control port" connector first
time to eat something rq before the meeting
<@&356864093652516868> Here's the notes doc for the meeting in ~12 minutes. Please add notes even if you're attending, it's super helpful! Talk to you all soon! https://docs.google.com/document/d/1IA9bA0Inf2JrTk_CbDvENPPGOuqmmtdmfv5Nj2sbKmg/edit
Lurking
I think I'll be lurking to incase JP needs a hand
lurking
Lurking!
sometimes mobile internet is all one can get (like my area)
Likely offline / lurking, but I left some notes in the doc.
@onyx hinge You've got a truly note-worthy job
lurking
text only today
lurking only
Mere mortal here. I'd be pleased to help characterize this.
CircuitPython 2020, where do we want to go together?
https://blog.adafruit.com/?s=%23circuitpython2020
98 boards!
https://circuitpython.org/downloads
CircuitPython Organization
HUG REPORT FOR @indigo wedge
CircuitPython snakes its way to the Teensy 4.0
https://blog.adafruit.com/2020/01/10/testing-circuitpython-on-teensy-4-0-iot-made-easy-ioteensy-adafruit-circuitpython-arturo182-tannewt-nxp-paulstoffregen/
https://forum.pjrc.com/threads/59040-CircuitPython-on-Teensy-4!
Testing CircuitPython on Teensy 4.0 โ IoT made easy IoTeensy (video)! Scott and Artur have done an amazing job bringing CircuitPython to the NXP iMX RT1062, this chip holds a lot of promise! โฆ
Thanks to @arturo182's work on the iMX RT series in Python, we can now easily support Teensy 4!
There are many issues still to work out but a bunch of stuff does work. Check the GitHub label for relevant issues here: https://github.com/adafruit/circuitpython/issues?q=is%3A...
Also have a look at the open issues, many are waiting for feedback and ideas ๐ https://github.com/adafruit/circuitpython/issues?q=is%3Aopen+is%3Aissue+label%3Amimxrt10xx
CircuitPython i.MX Feather progress
https://twitter.com/arturo182/status/1216033357940895744
https://twitter.com/arturo182/status/1215036958956806144?s=12
@indigo wedge amazing
Joey is working on the CircuitPython version of the OpenBook
https://twitter.com/josecastillo/status/1215388022692372480
https://github.com/joeycastillo/circuitpython/tree/openbook/ports/atmel-samd/boards/openbook
Today's second project: @CircuitPython support for the #OpenBook! It's not 100% there yet โ I have yet to get the screen working as board.DISPLAY โ but I can create it in main and it "just works" with @tannewt's IL0398 driver. This feels like a big step. https://t.co/U...
117
photorealism of those renders ๐
Save the World with Code: 20 Fun Projects for All Ages Using Raspberry Pi, micro:bit, and Circuit Playground Express by Lorraine Underwood
https://www.amazon.com/Save-World-Code-Raspberry-Playground/dp/1260457591
PyCascades 2020 in Portland is just a month away, Scott is speaking and Nina made a PyPortal countdown!
https://twitter.com/nnja/status/1215414459964878848
Did you know that #PyCascades2020 in Portland is just a month away? ๐
To keep track, I built a countdown timer using my @adafruit PyPortal.
๐tickets: https://t.co/CWbr7pDvBL
๐ฃtalks: https://t.co/5zT0HSxOcA
๐ฉโ๐ป code: https://t.co/l2K6LTlgyr
๐ฆ follow: @...
Top 10s of 2019, and decade, lots of CircuitPython
https://blog.adafruit.com/?s=%23AdafruitTopTen
I am the last of the conference. ๐
DRAFT is here: https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2020-01-14-draft.md
the net issues increase is mostly exciting iMX ideas I think
Yes I created 34 iMX issues ๐
@slender iron Many apolofgies to all affected. i am still very new & finding my way around discord. My PC has no microphone connected so did not think it would affect the stream
@idle owl - any time
@slender iron at the moment. still getting my head around all the features that Discord offers, also no where near being in a position to offer any input to such a great & talented group . Is there any protocol here that I should be aware of for people who are just listening?
yup, just let us know you are lurking and we'll skip you when we do the round robins
let us know if you have any discord questions, we're happy to help answer
Hi folks just lurking so please skip past me !
@pastel panther there is a font folder in the repo with the OpenSans-9 font.
@ladyada now that #2498 by @dhalbert solved out issue i would like to open PRs for the 2019 board definition. Could you please give us a VID/PID for the board?
@errant grail this popped into my RSS ๐ https://twitter.com/Hacksterio/status/1216788925349552131
On Feather M0 Express using the latest CP and the above script but A0, I get this:
124.97 Hz, On 3.984-4.001 ms, Off 4.003-4.019 ms (Saleae 500MHz samples)
So, yeah, 125 Hz.
Guide coming for that @prime flower
Thanks @prime flower! I'd better get busy on that guide.
@errant grail whoopsie doodle, I must have missed that
@pastel panther ... another reason to get busy on the guide!
I hope I have more time going forward
https://learn.adafruit.com/pyportal-retro-compys/3d-printing ooh looks fashionable
๐ฌ
Text only. Sorry I was lost in timezone computation. I wrote my notes.
Hope they don't get discouraged by the Alpha-ness of it ๐
@slender iron dylan and I can PyPi-ify it but it should be close to ready, just needing a release
we may have disabled it by renaming the setup.py but I think otherwise it should be good to go
yep
๐
wew ๐
@tulip sleet - are you sure???? ๐คฃ
@slender iron
https://github.com/adafruit/Adafruit_CircuitPython_BLE_Apple_Notification_Center and
https://github.com/adafruit/Adafruit_CircuitPython_BLE_Apple_Media ?
the others will use it
ok
thank you, thank you
sure thing
I'm reading through a circuit python tutorial and I see this function definition:
def get_voltage(pin):
return (pin.value * 3.3) / 65536
I get that the 3.3 is our total logic level voltage, but what is 65536
?
@ionic elk just think of it as a chance to get rid of all the cruft and tune your installation procedures ๐
@uneven yarrow analog values are normalized to 16 bits
so 65536 is the analog value at 3.3
@ionic elk mute please
sorry
np
ah ok. thanks!
np ๐
@uneven yarrow here's a useful library for working with ADCs and DACs https://github.com/theacodes/Winterbloom_VoltageIO/blob/master/README.md
MMh, that would be neat ๐
office hours idea is from @drowsy geyser: https://blog.moyer.ai/2020/01/02/circuitpython-2020-thoughts/
print(0.005, math.floor(1000*0.005))
print("{0:20.18f}".format(0.005))
==>
0.005 4
0.004999999046325684
A workaround of adding 0.000_01 s seems to help.
You could utilize Discord custom status to highlight when you're available... (Cause we need more options in this convo. lol)
tuesday works for me
Tues!
I want to test my microphone...

:+1:
Violent Crickets is a great band name
A metal band for empty venues
@half sedge I'll stick around after the meeting so you can test
@slender iron Assuming I can have the same setup next week.
๐ค
Thanks all
Thanks!
Thanks everyone!
yay!
Congratulations @idle owl
that issue number didnt sound right, you said 20 but i myself created 34 ๐
It happens a lot. The last couple will often not show it. Def a GutHub issue.
AttoCurroct, ftw. ๐
is Gut Hub for sharing recipes ?
Some of those domain names will increase in value. Stock up now!
Not yet
I'm 100% sure I screwed up the pins or peripherals in the imx port somewhere
there were just so many
Next time.
e.g. in my .gdbinit:
define sload840
python
import os.path
import sys
sys.path.insert(0, os.path.expanduser("~/repos/bnahill/PyCortexMDebug"))
end
source ~/repos/bnahill/PyCortexMDebug/cmdebug/svd_gdb.py
svd_load ~/repos/circuitpython/ports/nrf/nrfx/mdk/nrf52840.svd
end
I have this for several chips
Heading out. Cheers everyone!
it does work on my feather, i did test it also on the evk
@tulip sleet ooh more gdb stuff for me to copy from you. I "jloadc" multiple times per hour
svd NVMCTRL, etc.
the evk comes with a cmsis-dap debugger
Should I re-shuffle the doc to have chronological order?
I saw the exact same ~125 Hz behavior on Teensy 4.0 and Metro Grand Central M4.
@half sedge I will not turn down that offer ๐ Please do!
I reshuffled the one I had to go out of order for, so at least it's mostly in looping order.
Take a backup !
Downloaded a copy of it
my current .gdbinit
@idle owl I belive it is done now.
Thank you!
yay!
AramCon Badge 2019 VID 0x239A PID 0x0079 # bootloader
PID 0x8079 # arduino
PID 0x807A # circuitpython
AramCon Badge 2020 VID 0x239A PID 0x007B # bootloader
PID 0x807B # arduino
PID 0x807C # circuitpython
So I guess it's truncating down from 5 msecs to 4 msecs, since 0.005 is not represented exactly.
https://www.h-schmidt.net/FloatConverter/IEEE754.html

and with the 3-bit float representation we use (uncheck the rightmost two bits:

My more general frequency generator has a jitter problem, but good frequency:
import board
import digitalio
import time
import math
led = digitalio.DigitalInOut(board.A0)
led.switch_to_output()
print(0.005, math.floor(1000*0.005))
print("{0:20.18f}".format(0.005))
f = 100.0
duty_cycle = 0.5
period_ns = (1/f) * 1_000_000_000
on_ns = period_ns * duty_cycle
while True:
led.value = math.fmod(time.monotonic_ns(),period_ns) < on_ns
In general, it would be nice if time.sleep() and time.monotonic_ns() had the best resolution convenient per platform. There might be a benefit in keeping all 1 ms resolution, but one doesn't come to my mind right now.
The order of operations matters for floating point precision, what if instead of:
period_ns = (1/f) * 1_000_000_000
you did
period_ns = 1_000_000_000 / f
I made the change and still got the jitter. I think this is to be with floating point. I expect that If I change to integer math with corresponding limitations in the f value, this would not have the jitter.
@slender iron does this look good to you?
https://github.com/adafruit/Adafruit_CircuitPython_BLE/releases
@trim elm ^
@pastel panther yup!
@slender iron would that be a major version since the other libs were removed?
sure
@pastel panther @slender iron Should I go ahead and release it?
sounds good to me
is it all set up for pypi?
I'll double check but it should be
kk
taking a sec to do a double plus check
@trim elm good thing I checked; it's missing a setup.py; use the cookiecutter to make a temporary new Adafruit_CircuirPython_BLE directory and then commit the setup.py into the BLE repo
thanks @pastel panther !
@trim elm before you push it, use the steps in this issue to verify it:
https://github.com/adafruit/cookiecutter-adafruit-circuitpython/issues/61
Ok
thanks!
@pastel panther It seems like there's a way to get the stuff in curly brackets to autofill. How do I do that?
did you use cookiectutter?
What?
lol, one sec ๐
Ok
read the readme here:
https://github.com/adafruit/cookiecutter-adafruit-circuitpython
@pastel panther And it seems like the purpose of that is to automatically generate part of the setup.py. Is that the case, and if so, how do I do that?
Oh, wait, you said to read the readme
indeed I did ๐
lol. Back in 1 sec
kk
It's crazy, it's almost like the README had all the answers to the questions I had.
@slender iron I hath returnethed
@ionic elk kk, I need to find my swd breakout
are you using stlink?
no, jlink
does that still use openocd? I forget
hmmm maybe I should get my BMP back up and running
@slender iron @pastel panther Made the PR.
https://github.com/adafruit/Adafruit_CircuitPython_BLE/pull/53
The gdb system I used to use, st-util, isn't maintained anymore and openocd gives me lots of issues
@trim elm kk, ๐
@ionic elk why not get a jlink from the store?
I could do that, which one do you use?
I mean is it way better than a BMP? Because that was fine too
though this lack of correct registers might be a build / GDB problem
I haven't used BMP. I don't think they've added SAMD51 support
something something makefile didn't properly specify etc
https://learn.adafruit.com/debugging-the-samd21-with-gdb is still my process
yeah they haven't, but it's not as though I'm able to use a SAMD51 with an stlink either
what is the meowbit pinout?
Oh right that isn't documented anywhere hang ong
only 3v is labeled
k, thanks. is your PR up to date too?
or is there another branch?
we could switch to audio if you like too
and I can share my screen
I will update it now
k thanks
I'm in ameila
still there?
can't hear you
@trim elm ok, I think we're good to go on the release. should be 4.0.0 with ------BREAKING CHANGES--- or whatever in the title and description since the other libraries moved out into their own repos
Ok. I'll add BREAKING CHANGES to the title and do the release
@pastel panther Alright, made the release
@pastel panther @slender iron Should I also draft a release for ANCS?
@trim elm it's green, so sure!
Also, as far as Apple_Media goes, should I be working on trying to fix the docs/linting errors?
hmm
re ANCS, test the setup py with my prior instructions. lmk if you need them again
@pastel panther the only commit since the last release (initial release which had already been migrated to Actions) was just updating the build badge, and it's already on pypi. Do you still want me to do a release?
ANCS?
Yeah
no, that's ok
Ok
@pastel panther I'll finish up a forum response and then take a look at the Apple_Media issues to see if I think I've got a shot at fixing them
sounds good!
@pastel panther I think I'll let @slender iron or someone else fix the pylint issues on that repo
@trim elm he asked for help getting it sorted out so I'll take a look when I can
he mentioned it would be a bit tricky so no worries
@pastel panther Ok. Actually, I think I'll grab something to eat (just remembered I forgot to eat lunch) and maybe see if I understand it any better then.
@slender iron https://github.com/KittenBot/uf2-meowbit
bootloader for meowbit based on https://github.com/mmoskal/uf2-stm32f - KittenBot/uf2-meowbit
@trim elm good call, bloodsugar helps brains chooch
reminds me I gotta get that sweet free chipotle delivery today
say waaaaaaaaat?
then I would eat more chipootle and I'd start looking even more like a burrito
If that was an outcome I would already be one, chipotle is literally my favorite food
@ionic elk Thanks for reminding me about that. I almost missed it
in the times where I have lived near one I have had weeks where I ate it literally every day
เฒ _เฒ
It's high up there for me. Burritos are my comfort food. Sad for chippapoodle, I live in CA and have a more-amazing-er taqueria literally around the corner
@slender iron would we have any other starting targets for tinyuf2 in addition to imx or would it be imx for now? i guess the stm32 uf2 bootloader seems to be in some stable state? if we found another target then we could bring more people in on the project ๐
@tulip sleet I though I recalled talk of adding touchio support to the M4 boards using the resistor based approach used on other boards; Am I remembering correctly?
@pastel panther, yes, it is in the build now.
there is now "generic" touchio support, which is turned on for SAMD51 and nRF boards
and the code checks for the large-value (like 1Meg) pulldown resistor being present
and will throw an error if it's not
ah, excellent.
BLE pairing now will store appropriate bonding information after pairing. A region of internal flash is allocated for this. It's a growing consecutive log of "bonding blocks", which store either keys or CCCD values (sys_attr values).
CCCD values must be restored to their values after pairing when a bonded connection is made; this is required by the BLE spec. So whenever a CCCD is written for a paired connection, we remember its value using the sys_attr mechanism in the nRF SoftDevice.
...
@ionic elk https://github.com/KittenBot/uf2-meowbit/blob/4ba91d56c2e2cf2c42ad1d23b9fb88df7480d555/bl.c#L129
bootloader for meowbit based on https://github.com/mmoskal/uf2-stm32f - KittenBot/uf2-meowbit
I tested on iOS 13, MacOS latest, Ubuntu 18.04, and Windows 10.
Ok, we sorted out the interrupt issue! The functions called by an interrupt are dictated by the vector table. The location of it can be moved so that one set of code can swap to another (such as a bootloader). In this case, the STM uf2 is correctly setting it but our start up code is setting it back to the original location! For reference it is the VTOR register in the system control block (SCB) that controls it.
@hierophect is now unblocked and will continue with this. It's great to sort ...
Does anybody knows why the "Feedback? Corrections?" button ask for anonymous contribution with no personal data? When I find something I don't like in the documentation, I like to point it out, but I would also love to know if this is taken into account, and if ever the guide improve, know about it. Why it can not be like an issue on GitHub?
I am talking about learn.adafruit.com
As a result of not having that, I have no tracking on things I might have suggested in the learn side.
yay for learning things :)
@slender iron I made a pr on your fork of BLE Apple Media. If you've got a sec, it'd be great if you could take a look at it, since that's the last pylint error we were getting
Never mind. I'll just make a pr from my fork of your fork
@urish I'm seeing the same thing as you. At first I thought this was related to changes I have made in an attempt to implement a different HID device incorrectly / missing something (Microsoft Radial Controller / Surface Dial) , But after seeing your report I loaded up this BLE HID Keyboard example verbatim and am seeing the same behavior on Windows 10. Same thing, where it takes a second or two f...
I have been working on BLE bonding over the past couple of weeks (see #2510), and just tested on Windows 10 with a BLE-capable dongle, and did not have this problem. But it also worked before without bonding. So it may be particular to the Bluetooth hardware on your Windows machine(s).@mscosti and @urish, what is your hardware?
@PaulStoffregen Would rounding to the closest ms (or the current sleep resolution) be the fix you are imagining? Since folks can be easily surprised by 0.005 s rounding down to 4 ms, I think that is better than explaining it in documentation.
And if I might add to that fix an enhancement request: Increase sleep and monotonic_() resolution (as I mentioned above). Should that go into a separate issue?
@dhalbert I'm using a MS Surfacebook 2, which has Bluetooth built in (no dongle)
@mcosti hmm, some kind of pairing issue mentioned here: https://social.technet.microsoft.com/Forums/en-US/31e39461-0b8b-4daa-86d0-010f0bd2feed/microsoft-surface-and-ble-issue?forum=win10itprohardware. The OP said it works with a dongle, but not with the builtin Bluetooth hardware. I assume you're up to date on drivers and the latest version of Windows 10, but if not, that might be worth trying.
I did not find many similar reports, but very few people are trying to use BLE HID with Windows....
I added digital pin names to A0-A5 and SCK, MOSI, MISO as shown in the product pinout. I discussed this change with Radomir Dopieralski on Discord help-with-circuitpython channel.
This is fine with me. I looked at the scripts are they are designed to be Python 2.x and 3.x compatible. @tannewt if good with you, do you want to indicate by merging?
@ivory yew did you see https://github.com/adafruit/circuitpython/pull/2054 ?
yes
ooh it would be awesome if someone could help that PR forward, it's one of the longest standing ones at this point, I think
Thanks for the approval @ladyada ! I'll roll this out to other boards as I have time and submit a larger pull request for the lot.
Thanks! A simple formatting request: could you group pin aliases together, and put a blank line between aliases? This makes it easy to see and check.
{ MP_ROM_QSTR(MP_QSTR_A0), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_D14), MP_ROM_PTR(&pin_PA02) },
{ MP_ROM_QSTR(MP_QSTR_A1), MP_ROM_PTR(&pin_PA05) },
{ MP_ROM_QSTR(MP_QSTR_D15), MP_ROM_PTR(&pin_PA05) },
{ MP_ROM_QSTR(MP_QSTR_A2), MP_ROM_PTR(&pin_PB08) },
{ MP_ROM_QSTR(MP_QSTR_D16), MP_ROM_PTR(&pin_P...
OK, I wasn't as clear as I should have been - sorry! It's OK to keep the singleton lines together to save space, and then have a blank line before the three board things at the end. I just usually add blank lines around two or more of the same pin together.
Have a look now, I think it should be right.
Very nice, thanks for indulging my finickiness.
Thank you! And looking forward to future PR's.
@pastel panther @slender iron To the best of my knowledge, all major issues, both pylint and Sphinx, have been solved on BLE_Apple_Media
If you could take a look at my PR to make sure I didn't do anything that will break something else, that'd be awesome. The PR is still failing, but I did some local testing by just removing the things that were failing one at a time, and they were all todos, or Sphinx wanting some more documentation in one or two docstrings.
@slender iron ^
link please
did you have it as a PR to me originally?
we shouldn't need the adafruit_ble mocks
we should be able to use adafruit-circuitpython-ble from pypi
Ah, ok. Just doing a simple mock import wasn't working so I mocked it kinda like adafruit_circuitpython_ble does with _bleio, but if there's an easy way to get it to do it from pypi instead, then that'd probably be a lot cleaner
And that would also have the added benefit of the mock not needing to be updated if ble were to get a new feature that would require a mock update
The issue mentioned here sounds very similiar to the one I'm experiencing. https://answers.microsoft.com/en-us/windows/forum/all/problem-with-bluetooth-low-energy-gatt-compliant/ec845657-d885-47e8-a796-cd3ff83a7698
Unfortunately, the suggested solution that others confirmed working for them (uninstalling Microsoft Bluetooth LE Enumerator and restarting) did not seem to work for me. @urish , I am curious if this works for you, though.
I'm not sure if its relevant/true/meaningful, but w...
According to the error code, the cause of the issue: the device's hardware key contains a "FailReasonString" value, and the value string is displays an error message defined by the hardware manufacturer. If the hardware key does not contain a โFailReasonStringโ value the message above is displayed.
I think that is just saying that it's failing and we didn't supply a reason string ??
As far as I can tell i'm up to date on my drivers. I have 2 other Bluetooth HID devices (Pen digit...
@trim elm I'll take a look tomorrow. thanks for getting it this far!
Is this meant to be public?
I think if the precedence is pretty clear we don't parenthesize, but we do sometimes just for readability. No hard and fast rules on that.
hmm. Not sure about the PS4 game pad, I think that's older, but the Surface Pen is listed as using Bluetooth 4.0, and in device manager shows up in HID section as Bluetooth Low Energy GATT compliant HID. So, still not 100% sure, but most likely?
Is there perhaps some arduino BLE HID code I could try on the CPB instead to see if I get the same issue?
Looks good! Just one typo, rest is style.
Not a big deal but I usually use size_t for unsigned indices.
Maybe make this a table lookup or a switch, still with appropriate #ifdef's.
typo: self->scl->pin->number but should be self->sda->pin->number
Adding sources mentioned in "Comparison" which was renamed "Price Comparison" to make page clearer.
How about https://github.com/adafruit/Adafruit_nRF52_Arduino/blob/master/libraries/Bluefruit52Lib/examples/Peripheral/hid_keyboard/hid_keyboard.ino ? You'll need to install the Adafruit nRF52 BSP if you haven't already.

Renamed "Comparison" link to "Price Comparison" and added links from Nordic.
Interesting note in: https://www.nxp.com/docs/en/application-note/AN12042.pdf
<img width="865" alt="Screen Shot 2020-01-13 at 10 27 18 PM" src="https://user-images.githubusercontent.com/52649/72319494-1ffc4280-3654-11ea-9d26-433f05d97f1d.png">
Someone summoned me, lol
@frank1119 yes, that works. What I'm trying to achieve is to write to the storage without having to tell the user to restart the device with one of the buttons pressed down. It makes sense that we'd be able to remount the storage as writable when the USB is not connected.
ah i think that is not possible at this time - we'd need https://github.com/adafruit/circuitpython/issues/544 first
@ladyada if we get someone from our team to look into #544, would that help to move things forward?
im sure it would be greatly appreciated! when dan & scott are awake they can comment further :)
Maybe setting a flag in nvm (if possible) to test during boot?
@frank1119 that's a good workaround. I tested and the nvm size on the nRF52840 seems to be 8kb. Our use case is uploading new code/assets through Bluetooth, so this will restrict us to around 8kb at a time, but it's still better than nothing. Thanks for the suggestion!
@urish I was not suggesting to use nvm as storage, but it is surely a way to think out of the box :-)
@frank1119 yeah, temporary storage :-)
@hierophect I made a quick test over VTOR reg in SystemInit:
/* Configure the Vector Table location add offset address ------------------*/
#ifdef VECT_TAB_SRAM
SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
#else
#define VALUE_TO_STRING(x) #x
#define VALUE(x) VALUE_TO_STRING(x)
#define VAR_NAME_VALUE(var) #var "=" VALUE(var)
#pragma message(VAR_NAME_VALUE(FLASH_BASE))
#pragma message(VAR_NAME_VALUE(VECT_TAB_OFFSET))
SCB->...
This all made me wonder what micropython did for this, from docs: https://docs.micropython.org/en/latest/library/utime.html#utime.sleep
The unix port builds micropython and not circuitpython. The Makefile should probably be updated to build circuitpython (the test suite will also need updating).
@mcosti: Sorry, typo for "mscosti" :)
Digging around circuitpython's testing framework... Are we still running Rosie CI? https://github.com/adafruit/rosie-ci I also saw some remnant mentions of qemu but we seem to have removed that in October.
The unix port should have it's Makefile updated so that hardware-independent modules are included, so that tests can be added for them.
Please add modules you know can be added to the circuitpython unix port to this checklist.
We might also want to have a HAL that provides dummy hardware for testing code functionality too, but that will probably want a bunch of different issues.
- [ ] _pixelbuf
@slender iron @pastel panther Just to update you guys on the BLE AMS PR, everything is currently passing Actions, both Sphinx and PyLint.
@dhalbert Thanks, I'll give that a shot when I next have time, likely sometime tomorrow evening. Is it appropriate/relevant to keep this discussion on this issue, or would you prefer a new github issue?
@slender iron I'm coming up blank on how to detect dma underrun on samd51. Is there another keyword I might try searching on or do you have any tips?
Seems like it just cycles the descriptors freely but I can't see how to tell if you missed a message about it
Hopefully I'm overlooking something simple
"Adafruit CircuitPython 5.0.0-beta.3-6-g926375d99-dirty on 2020-01-10; Teensy 4.0 with IMXRT1062DVJ6A" halts after :
import microcontroller
microcontroller.cpu.temperature
Thanks for making CircuitPython available on Teensy 4.0 !
With "Adafruit CircuitPython 5.0.0-beta.3-6-g926375d99-dirty on 2020-01-10; Teensy 4.0 with IMXRT1062DVJ6A", REPL disconnects after pasting more than approx. 4 lines in paste mode (CTRL+E). I have to disconnect from the USB port and connect to REPL work again.
With "Adafruit CircuitPython 5.0.0-beta.3-6-g926375d99-dirty on 2020-01-10; Teensy 4.0 with IMXRT1062DVJ6A", ampy utility doesn't work with Teensy 4.0 :
$ ampy -p /dev/ttyACM0 ls
Traceback (most recent call last):
File "/usr/lib/python3.8/site-packages/serial/serialposix.py", line 537, in write
n = os.write(self.fd, d)
OSError: [Errno 5] Input/output error
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/hom...
Just curious, Is there any plan to have a CLI based package manager for circuitpython? Something which can fetch and put a library to /lib folder
most circuitpython boards don't have network
and by default the filesystem is read-only
this is a feature, not a bug? ๐we dont want folks using ampy, its for boards without native usb
ampy uses raw REPL mode so very likely related to #2515
@obsidian compass I have homebrewed my own thing while working on JEplayer. It uses makefiles and will mpy-cross the libraries you symlink into a src/ directory, and finally uses rsync to ensure what you have on the device is up to date. I don't know if this is anything like what you are asking for, but I welcome feedback! https://github.com/jepler/JEplayer/
@onyx hinge thanks for sharing, I'll give it a try ๐
@ruby atlas no, Rosie hasn't been running for quite some time. I have been slowly working through a replacement. My #circuitpython-dev2020 posts have some details.
@stuck elbow that's right but during dev we can use host machine cli to fetch and put the .mpy library to /lib
I liked @ivory yew's point of going GUI over CLI for handling the package management. Using Kivy came to mind, so that it could be cross-platform. Not the only option, certainly.
@obsidian compass oh, you mean on the computer's CLI?
there is a number of such tools you can choose from, the two most popular are called wget and curl
@raven canopy yes that's right ๐
@raven canopy anything but electron based app ๐
I would do a multilayered thing. I'd make the core of the package manager a shared library and build CLI and GUI interfaces on top.
@ivory yew that sounds like the best way to do it, IMO
I think conda works same way too
this is a feature, not a bug? we dont want folks using ampy, its for boards without native usb
ampy works with Pyboard v1.1/Lite/D, which have native USB (internal file system as USB mass storage).
Also, I bet circup could have a load new functionality added. https://github.com/adafruit/circup
pip also has a frontend IIRC
language-specific package managers are generally rather harmful to that language's community in my opinion
kk, btw we dont automatically permit writing to fs from he interpretter, youd have to remount it
I wrote up a very rough doc about this last september.
very rough, so if y'all wanna peek at it go for it, but please keep in mind I brain dumped this for an hour before I got distracted and I haven't cleaned it up or come back to it at all: https://docs.google.com/document/d/1DyImgx0fs_TFMTLfUh9d62b5z8wtwgtuxOZMEN5fbP4/edit?usp=sharing
bookmarked!
kk, btw we dont automatically permit writing to fs from he interpretter, youd have to remount it
Ok. So "Mu Editor" seems the recommended IDE, right ?
gotta run, have fun reading my brain soup!
@ivory yew On a quick browse through your doc, as long as you're detecting dependency issues between the lib and the CP version, why not include firmware build and install?
Not sure what you mean?
Latest library .mpy + latest firmware, therefore, no dependency colliosions.
Like updating the firmware?
Yes
Ahhh, ok. I didn't notice it. But it was, admittedly, a very fast scan.
but yeah I would want it to detect fw version and give you the option of upgrading
but never force you.
@drowsy geyser I remember during initial days of micropython it has a web interface where you select which lib you want to include in your default image/.bin it builds new binary including them and mail it to you
it's also an incomplete brain dump, as mentioned.
Totally understand. Just trying to offer some feedback.
๐ feel free to leave comments on the doc
Oh, cool. I'll do that.
Copied from #1050.
@urish:
Windows 10 does see the device (even though not always - I had to remove the scan_response part from the advertising so that it show it on the list of pairable devices), but disconnects about one second after pairing with a "Driver error" message:
Android works well
@mscosti:
@urish I'm seeing the same thing as you. At first I thought this...
@dhalbert:
I have been working on BLE bonding over the past couple of weeks (see #2510), and just tested on Windows 10 with a BLE-capable dongle, and did not have this problem. But it also worked before without bonding. So it may be particular to the Bluetooth hardware on your Windows machine(s).@mscosti and @urish, what is your hardware?
@mscosti:
@dhalbert I'm using a MS Surfacebook 2, which has Bluetooth built in (no dongle)
@dhalbert:
@mscosti hmm, some kind of pairing issue m...
@mscosti:
The issue mentioned here sounds very similiar to the one I'm experiencing. https://answers.microsoft.com/en-us/windows/forum/all/problem-with-bluetooth-low-energy-gatt-compliant/ec845657-d885-47e8-a796-cd3ff83a7698
Unfortunately, the suggested solution that others confirmed working for them (uninstalling Microsoft Bluetooth LE Enumerator and restarting) did not seem to work for me. @urish , I am curious if this works for you, though.
I'm not sure if its relevant/t...
@mscosti:
hmm. Not sure about the PS4 game pad, I think that's older, but the Surface Pen is listed as using Bluetooth 4.0, and in device manager shows up in HID section as Bluetooth Low Energy GATT compliant HID. So, still not 100% sure, but most likely?
Is there perhaps some arduino BLE HID code I could try on the CPB instead to see if I get the same issue?
@dhalbert:
How about https://github.com/adafruit/Adafruit_nRF52_Arduino/blob/master/libraries/Bluefruit52Lib/examples/...
I've opened a new issue for the Windows problems.: #2517. Closing this because we do now have BLE HID.
@mscosti asked out-of-band which Bluetooth/BLE dongle is working for me. I am using this one: https://www.adafruit.com/product/1327.
Updates header, mobile menu, and landing page based on latest designs from @tylerdcooper.
@slender iron do you remember what it was that lead you to realize that VTOR might be the problem? I'm trying to make a note of how we ended up there. We were looking at the control registers, and then we realized something wasn't loading as it should have been...
After that I remember it was VTOR isn't right, it's being properly set by bootloader, watchpoint to determine it was changed in Reset Handler, then I guessed it was in system_stm32.
Was it just that it happened to be up on your screen as we were looking at SCB registers, and we noticed it was wrong?
I think it'd look a little better here so I'll put it in.
whoop thanks for finding that.
I guess the switch would be like:
switch (USARTx)
{
#ifdef USART1
case USART1: self->irq = USART1_IRQn;
break;
#endif
#ifdef USART2
//etc
default: // code to be executed if n doesn't match any cases
}
But how would a table lookup work without extractable index information? And would the reason for one of these be just code line reduction, or is it something else?
@ionic elk I think it was because we were looking at what the bootloader did before jumping to the app
and I have svd on the STK already so when I saw SCP I tried it
@slender iron I feel like there was something that tipped us off that the vector table wasn't being loaded properly. I'm trying to remember what that was
cuz I want to remember it for next time
well, we saw that the SCB->VTOR value was back to 0x8000000
and therefore it must have been unset
right, that was after, everything was pretty clear from that point on
I pushed some basic code structure to https://github.com/arturo182/tinyuf2, it builds and "works" (blinks a led and usb interfaces show up) on the rt1011 evk, note that there is no uf2 code in there yet
We were looking at the control registers, then we checked out the memory to make sure everything was in the right place...
It's not super important though so nbd
I'm thinking if we should reuse board definitions from tinyusb or make our own structure for that
@indigo wedge my plan was to have a supplemental board structure in tiny-logic-friend
it won't be shared at all because it will include logic analyzer specific data
my plan today is to split out flash info from board info today in circuitpython
i'm just thinking that right now if someone wants to add their own board they would have to make copy an existing tinyusb board folder and modify that and there would be a lot of copied code
like, look how easy it is to add a new board in the samd bootloader
ya, I think we can factor things out as we go
just 2 files
ya, we can get there. imx rt is trickier because of the flash info
@onyx hinge what do you mean by underrun? running out of buffer to playback?
@slender iron right, it alternately DMA's buffer A and buffer B to the DAC, so an "underrun" would be if it starts to dma buffer A (or B) but software hasn't filled it..
The table would be like:
{ USART1, USART1_IRQn },
{ USART2, USART2_IRQn },
etc.
I think a switch is fine. The main thing is that the current structure has each if statement fall into the next one. If the compiler is clever it won't be extra code. You could add else if instead. But I think a switch is cleaner.
and in this case the hardware is going to just DMA out old data and the software doesn't know it. Except your audio will sound .. wrong and jumbled
@kevinjwalters Yeah, utime is interesting. The functions returning wrap-around time can give new programmers headaches. The unspecified period can give everybody problems. If my code asks the question, "Has some length of time passed since this event of interest happened?", I want to feel comfortable that the counter has not wrapped around some number of times, but that the wrap-around time is much longer than the interest in the question. I'd rather not have to count wraps.
I understand...
@onyx hinge do we keep a counter based on dma block completion? wouldn't a gap of >2 mean an underrun?
does the dma mark the descriptor as invalid on completion too?
to the second question, I think no -- the B dma descriptor always points back to A and vice versa
to the first question, I don't know where we do that
lemme look. somehow we have to know what buffer is being used atm
we use the event system to track when a block is done
and it can tell you when an overrun (?) occurs
OK! I will look into what they term an overrun. I was looking at DMA in the datasheet, not thinking about event system though that makes sense in retrospect.
Seems like Scott uses just raw int as I do. Let's revisit this if we want to make it consistent across ports.
Note: I didn't test on HW, just read some diffs.
can someone take a look at this. 2 people having noise issues on DAC. i can't recreate. i moved it from another forum:
https://forums.adafruit.com/viewtopic.php?f=60&t=160663
@onyx hinge is the best person for DAC issues I think
Is there anywhere we can preview this? @kattni and @makermelissa would be interested as well.
yeah @tidal kiln @slender iron it seems to be my thing. I'm not in the right headspace to respond right this second, and I'm not even sure what I would suggest. If adding a small sleep is an effective workaround, that is great and they should go for it.
@tannewt, I should be able to run it locally. I'm not sure about a preview site though.
The table's going to be kind of ugly too, since I'll either need to assign an empty row for every undefined category or have the size be dynamic. Are you set on me changing this?
@onyx hinge @slender iron @tidal kiln Also hidden in that discussion on the DAC is a pop with the mixer. Is the using responsible for attack?
not sure what you mean by "Is the using responsible for attack?"
Uh, user.
so say your sample is +4000 and you change the volume from .1 to 1.0, the DAC will change from 400 to 4000 in one step. Yes, that will sound like a pop.
Right.
having the mixer spread a volume change over a short period of time is not an unreasonable request, I suppose, but the code is not written
Coding that might be easier than writing up how to do it in CP. (I have no opinion either way.)
@onyx hinge @slender iron @tidal kiln One person's workaround was to use the mixer. Perhaps that effectively increases the buffer size? Arg. I'm kibitzing.
I just previewed. It looks very nice and I everything appeared to function nicely.
@bright aspen kibitzing is fine, I love knowing other minds are thinking about the same problem as me. I don't think that the mixer adds a bigger buffer, I think it's 1024 bytes (divided into 2 512-byte buffers) by default just like for a WaveFile. ICBW of course.
Just going to drop in an existing function, to support the idea of adding in some ramping. It's done in AudioOut on the SAMD51, to handle pops when stopping. On quick glance, it would need to be reworked to adjust in both directions...
https://github.com/adafruit/circuitpython/blob/master/ports/atmel-samd/common-hal/audioio/AudioOut.c#L78
@raven canopy @onyx hinge I'm just guessing at how the mixer works. I'm assuming everything is done on half buffers. I'm also guessing that a mixing change is done on the edge of that. So maybe a volume change can take place over a half buffer. That means a faster change with faster sample rates, though. If I wandered down a bunny trail...
My CircuitPython 5 poster arrived today. You can release it now.
someone recently told me that she doesn't like the metaphor of a bunny trail or rabbit hole, so she prefers to say that she emerged from a wormhole about a topic. I thought that was great!
afk, it's well past local lunch hour here
@idle owl @trim elm http://pylint.pycqa.org/en/latest/whatsnew/
@raven canopy i need to find time to look at those and/or write my own!
Overall this is excellent. Really well done. Just a couple minor questions and comments. Thanks!
I don't think you need this. next_block skips invalid blocks.
Do you want to save bonding info when the connection has already been lost? (The handle is invalid.) There may need to be some locking here too since connection state can change in interrupts.
@urish I think this issue just needs usb_enabled to be changed. Basing it on a variable set in mount/umount lower in that file would be better. The terms there mean plugged and unplugged and are not mass storage specific.
That being said, I want to add a circuitpython service for uploading and downloading files. The beginnings of it are here: https://github.com/adafruit/circuitpython/blob/master/supe...
Ok, great! Just double checking.
I'd rather not rename it actually. It won't have any of the hardware APIs and will lead to more confusion about CircuitPython on Raspberry Pi.
We could make the underlying call use microseconds instead of milliseconds. I do want to avoid giving the illusion of false precision though since background tasks can come along and make things run longers.
@tannewt Thanks for the feedback!
The file transfer services look interesting, have you considered how it would play together with the USB storage?
When sending keystrokes to an iOS device using the new BLE HID support, any modifiers are completely discarded. For example, using the following code after a connection has been established (where kbd is an instance of adafruit_hid.keyboard.Keyboard):
kbd.send(Keycode.CONTROL, Keycode.OPTION, Keycode.H)
With iOS VoiceOver turned on, Ctrl+Option+H should activate the Home button, showi...
My guess would be that it's changing the lookup pattern in the global dictionary. I'd recommend watching https://www.youtube.com/watch?v=hHec4qL00x0 for some performance tips. Although it is for MicroPython, it applies to CircuitPython as well.
Only a bit. My thinking would be that first one wins. So if you are on USB first then BLE would be read-only. If you are on BLE first then USB would be read-only. If you unplug from USB then you can be granted write access too.
Adding a port and a UF2 bootloader for the Open Book Feather. Work is just about done, just want to get everything in order before opening pull requests.
Thank you!
Open Book Feather VID 0x239A PID 0x007D # bootloader
PID 0x807D # arduino
PID 0x807E # circuitpython
tested after #2507 -- builds OK on Raspberry Pi 4
Thank you!
Not to hijack (too much) the initial concern of rounding down to next ms instead of to nearest ms in time.sleep()...
Yes, I like microseconds. In addition to giving a false impression of precision is that what works on one board might not work as well on another. Those might be a documentation task. Even so, I favor a move to microseconds, if not for both sleep() and monotonic_ns(), then just for the latter.
Is there a guideline as to how long a background task can keep sleep() from ret...
I've added options to defer VTOR setting to the bootloader and properly adjust it when building UF2 files. Tested and working on Meowbit and Feather. Moving on to the screen/flash conflict.
When the input is a float (offering plenty of precision), why would you not just delay to the best accuracy the hardware is capable of implementing?
@indigo wedge what flash chips are you using on your boards?
@PaulStoffregen Yeah, I like that idea. Though, I would want to acknowledge that there might be some software concerns that might limit it a little tighter than the hardware capability. This will still need some docs work to create appropriate expectations.
@slender iron w25q64jv
for both? thanks!
yeah
kk
This PR adds support for the SAMD51-based Open Book board. Should be reasonably straightforward; uses displayio for the screen, gamepadshift for the buttons. UF2 bootloader is forthcoming.
Rename "Farnell" to "element14 Farnell" as I forgot to do that in my previous commit
Initial commit of board definitions for the Seeeduino XIAO. Very similar to the Sparkfun SAMD-21 Mini board. https://www.seeedstudio.com/Seeeduino-XIAO-Arduino-Microcontroller-SAMD21-Cortex-M0+-p-4426.html Note that changes are necessary to the Mu editor to use the serial terminal with this board (specifically, adding the USB VID/PID).
The USB VID/PID are just copied from what the Seeeduino XIAO provides as supplied (VID=0x2886 (SEEED), PID=0x002f). Digital and analog pin defs are as p...
I was just trying to be consistent. If you look at shared-bindings/*/*.h, nearly all declare common_hal_* as extern.
I think this is safe, because the sd_ble_sys_attr_get() calls in write_sys_attr_block() will fail if the connection handle is invalid, and then write_sys_attr_block() will just give up in that case.
Interestingly the documentation talks about (ideally) fetching the values after the connection is closed to avoid churn. But someone may press reset, etc. So that's why I put in the one-second delay, which seems to cover the typical case.
uint32_t sd_ble_gatts_sys_attr_get | ( | u...
@tulip sleet So this is weird: if you load the Circuit Playground library alone onto a CPB, and in the REPL from foo import cp it fails on a lack of lis3dh as expected. Drag lis3dh onto the board, go back to the REPL, from foo import cp it says
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
ImportError: no module named 'adafruit_circuitplayground.cp'```
I have to reload the REPL entirely by exiting the REPL and going back into it. Import again, fails on a lack of `thermistor`, again, as expected. `import cp` and it says the same `no module named 'adafruit_circuitplayground.cp'`. I have to exit and reenter the REPL again. Repeat until all the dependencies are installed, and it finally imports `cp` properly. ๐คท
@idle owl i'd investigate the sys.path.
@raven canopy Ok... what am I looking for here. It's ['', '/', '.frozen', '/lib'] because of the frozen CPX stuff.
CPB. Didn't try this on CPX. Can't, because dependencies are built in.
haz no CPB ๐ฆ hehe
@raven canopy Need to fix that. ๐
@idle owl in general once you import something, even if there's a failure, you can't reimport without a restart. That's just Python semantics; it's not peculiar to us.
@tulip sleet Hmm ok.
@prime flower I've been meaning to ask, can we have a quick chat about progress bar maybe in the morning? I had rolled my own in JEplayer and it's a little different. Would like to converge
adabot patch about to be applied to 195 repos... ๐ค
Actions is going to hate me. though i hope they enjoy the free stress-test. ๐คฃ
@raven canopy Actions doesn't feel.
@onyx hinge Oh, @prime flower is AFK until next week I believe.
@pastel panther @trim elm pylint examples patches completed. there are 3 repos that i apparently don't have access to (librarians not added yet, i assume).
... Beginning Patch Updates ....
.... Working directory: /home/sommersoft/Dev/adabot/adabot
.... Library directory: /home/sommersoft/Dev/adabot/adabot/.libraries/
.... Patches directory: /home/sommersoft/Dev/adabot/adabot/patches/
.... Deleting any previously cloned libraries
.... Running Patch Checks On 214 Repos ....
.... Patch Updates Completed ....
.... Patches Applied: 192
.... Patches Skipped: 19
.... Patches Failed: 3
.... Patch Check Failure Report ....
No Failures
.... Patch Apply Failure Report ....
>> Repo: Adafruit_CircuitPython_LSM6DSOX Patch: 0001-update-pylint-examples-directive.patch
Error: b"remote: Permission to adafruit/Adafruit_CircuitPython_LSM6DSOX.git denied to sommersoft.\nfatal: unable to access 'https://github.com/adafruit/Adafruit_CircuitPython_LSM6DSOX.git/': The requested URL returned error: 403\n"
>> Repo: Adafruit_CircuitPython_BLE_Apple_Media Patch: 0001-update-pylint-examples-directive.patch
Error: b"remote: Permission to adafruit/Adafruit_CircuitPython_BLE_Apple_Media.git denied to sommersoft.\nfatal: unable to access 'https://github.com/adafruit/Adafruit_CircuitPython_BLE_Apple_Media.git/': The requested URL returned error: 403\n"
>> Repo: Adafruit_CircuitPython_MCP4728 Patch: 0001-update-pylint-examples-directive.patch
Error: b"remote: Permission to adafruit/Adafruit_CircuitPython_MCP4728.git denied to sommersoft.\nfatal: unable to access 'https://github.com/adafruit/Adafruit_CircuitPython_MCP4728.git/': The requested URL returned error: 403\n"
oh dear. that looks like a jumbled mess. repos are: LSM6DS0X, BLE_Apple_Media, and MCP4728.
@pastel panther k. i'll hand jam 'em with git am.
hey @trim elm , @raven canopy put a pile of stuff on yer desk
๐
thanks @raven canopy
from one inbox to another... ๐คฃ
gives @trim elm aspestos potato mitts
just don't huff 'em
I'll try not to
I've got to take care of some other stuff, so I'll get started on this later tonight or tomorrow
ok, sounds good
@trim elm i was worried you had already started pushing releases. didn't want to double stuff for you. my attention was on that amazing LSU Tigers football clinic last night. ๐
also, the 3 libs above are now patched.
Awesome
Tried to look through the discord so hopefully I am not asking an old question. Looking to develop a project based on Circuit Playground Bluefruit - BLE as a beacon. If this is possible, any help with sample code would be greatly appreciated.
I got my CircuitPython V poster up. I'm all ready to be inspired.
@pastel panther Would you like me to draft releases for all the libraries?
Ok
it's up to you. If you're confidant in your automation, the go ahead however you want
Ok, I'm going to try it on a few more of my personal repositories then do it for everything
@pastel panther Any idea why this wouldn't work?
os.system('curl --data "{"tag_name": "v2.0.0", "target_commitish": "master", "name": "Migrated repository to GitHub Actions", "body": "This repository now uses GitHub Actions as a CI instead of Travis. This has no effect on the code itself.", "draft": true, "prerelease": false}" https://api.github.com/repos/dherrada/{}/releases?access_token=MY_TOKEN'.format(repo))
It's giving me this:
KeyError: '"tag_name"'
๐
Are you sure those double quotes are going to work? It looks like you've got a double-quoted argument to --data that contains double quotes.
ya, what @wind trellis said
Maybe backslash something inside there?
That stuff will make your head hurt bad. ๐คฏ
I tried that already, but with single quotes surrouding the {}s but that didn't work, I'll give it a go with double quotes
Yeah, same issue
@trim elm Not sayin' you're gonna like this, but...
If I have test.py as: ```python import sys
print(sys.argv)```
then I can do python os.system('python test.py "{\\\"one fish\\\": \\\"two fish\\\"}"')
and get: ['test.py', '{"one fish": "two fish"}']
So that second argument is correct. It's a dictionary definition with quoted key and value intact, passed through the os.system command and read from the argument list.
@wind trellis hmm... That might just work. Too tired to try it right now, but I'll give it a go tomorrow morning
Definitely not something to tackle when you're sleepy. Good luck with it!
@trim elm You can use the subprocess module to give arguments as lists instead of a whole command as a long string. subprocess.run(["curl", "--data", "{...}", "https://...."])
and yeah avoid starting subprocesses while sleepy
@onyx hinge Yeah, I think that might be a better option than what I'm currently doing.
or you could almost certainly use python3 requests package to send the request instead of curl
requests.post('https://httpbin.org/post', data={'key':'value'})
That actually sounds like a great option. I've tried using subprocess for other stuff, and while it does have a lot of functionality, doing complicated stuff with it is very not fun
i was going to mention... JSON is particular on single & double quotes.
@idle wadi We had iBeacon and EddystoneURLBeacon working in a previous version of Adafruit_CircuitPython_BLE, but we need to re-create them, after redoing a lot of the internals of that library. It would be based off the current advertising code. See https://github.com/adafruit/Adafruit_CircuitPython_BLE/releases/tag/2.0.1-alpha.2 (which does not work with the latest betas). What kind of beacon did you have in mind?
@trim elm also...be careful when automating releases. you may not have a great granularity on everything that is being updated, and leave things out of the release notes.
apologies if steps have been already been taken to release everything, so that its a clean slate.
@raven canopy he's only making drafts but yes, a missing key could bork that
Following the discussion on https://github.com/adafruit/Adafruit_CircuitPython_IL0373/pull/7
Circuitpython currently supports raw string / byte literals with the 'r' prefix but doesn't support the 'R' prefix.
This should be changed to support compatibility with CPython.
"Both string and bytes literals may optionally be prefixed with a letter 'r' or 'R'; such strings are called raw strings and treat backslashes as literal characters." (excerpt from https://docs.python.org/3.7/refere...
As per PEP 498:
In source code, f-strings are string literals that are prefixed by the letter 'f' or 'F'. Everywhere this PEP uses 'f', 'F' may also be used. 'f' may be combined with 'r' or 'R', in either order, to produce raw f-string literals.
Fixes #2522
@indigo wedge thanks for fixing this issue.
A bit off topic but I am curious about is why micropython chose to implement the is_char functions receiving a mp_lexer_t pointer and not just pass the actual byte. Do you think this is because it is optimized away?
Not sure tbh
I don't have a lot of luck using the displayio.release_displays() command. I still constantly get stuff like ValueError: SCK in use, etc. Does anyone know what's up with that?
is that a fourwire display?
yes
maybe the fourwire bus object is still lingering around somehow?
I'll look into that
I remember it worked for me in 4.x, but I didn't test it in 5.x
specifically it seems that the display works fine up until you fail the syntax in some way, and then the first pin of the SPI bus will be perpetually in use.
So as long as my code works, everything is fine, but as soon as I make any form of error, it'll lock the display bus until a hard reset.
that's on the stm32 or generally?
I will test generally now
we had some reset bugs with exception handling before
Correctly unwinding everything in an exception is annoyingly meticulous and subtle.
Appears to be stm32 only. And it's quite specific - if the error is between release_displays() and displayio.FourWire, it locks the bus. Other than that it all works ok.
hmmm I have been investigating how RawSample+AudioMixer gives pretty poor results. I discovered that even back when AudioMixer was first merged there were small glitches, but when the "only run background tasks once per ms" code went in it got substantially worse. This is from "before" the background tick optimization, a glitch about 2 samples long
specifying a bigger buffer for AudioMixer tends to hide it, at least from the scope, but there's still a little buzz.
and this is how poorly it behaves AFTER background tick optimization
@gentle bronze does tinyusb work ok with dcache enabled?
Does it traverse bit-depths/rates? Off hand, I'd likely say it's IRQ priority related, but it could be the execution cycles of each encoding type. @onyx hinge
@indigo wedge I've got things starting up ok but usb is unhappy
@raven canopy I have been concentrating on 44.1kHz / 16 bit because that's typical for mp3. My test program:
@slender iron does DisplayIO currently support screens that need a backlight LED pulled up? Sorry for off topic
@slender iron in tinyuf2?
i'm working on that one right now
should have a more working version later today
@indigo wedge no, in circuitpython
@ionic elk not sure, I don't think so
I don't think so either. Worth an issue?
@indigo wedge yup, also moved stack to dtcm and trying to enable both cpu caches
@ionic elk need it for meow:bit? could you just fix it?
Maybe, will need a never-reset for digitalIO I guess?
@slender iron yeah i couldn't get that one ram bank working maybe it's related, is this on the evk?
@raven canopy this is on pygamer fwiw but I think any samd51 will behave similar
@ionic elk there should be one on the backlight pin already
@indigo wedge I think I got the flexram setup ok
lemme push my changes
@slender iron I have no idea, which issue you are encoutering, I could try to help it out.
default buffer size is 1024, so each half should be 512 bytes, which is 256 samples, or 5.8ms. So there should be plenty of time margin available even if background tasks are only once per ms
@gentle bronze I broke my latest teensy 4 code and am wondering if the dtcm isn't flushing usb packets before queueing them up
I need to get some better tools to visualize background tasks and dma buffers somehow. I could scope plenty of signals but I don't know how to get them TO my scope
(this is monophonic audio, stereo would be 2.9 ms per half buffer)
@onyx hinge you can twiddle a pin in the background task
and you can connect the dma event to a pin as well
@slender iron not sure what you mean - there's no backlight definition in DisplayIO, and you can't mark pins as never reset manually, so I'm expecting I'd need to add a new parameter to Fourwire that allows a backlight pin, right?
@slender iron have time to tutor me about that second thing? I have the first in there
@ionic elk Display manages the backlight, not FourWire
@onyx hinge I can later. Now I'm in 3 concurrent conversations. The gist is you add the PORT peripheral as another user to the event generator for the dma signal and then you tell PORT what to do based on event input
@slender iron that's fine, I'll try reading a bit first ๐
@indigo wedge @gentle bronze https://github.com/tannewt/circuitpython/compare/teensy4...tannewt:teensy4-dev
@slender iron to be honest, I am sure either, is there any code I can try
@slender iron i think it might be cause you removed "USB_DEVICES = "CDC,MSC,HID""
and like i mentioned, i think we dont have enough EPs to have all 4 classes
so i turned off MIDI
I moved it @indigo wedge because it was the same for all boards
oh, maybe i shouldve looked at the whole thing ๐
left side has a glitch that is correlated with background task that does something nontrivial, right side has one that is not
its in mpconfigport.mk now
@slender iron if you defined CFG_TUSB_DEBUG = 2 and implement tu_printf to output via UART or SWO, it can be print out useful debugging log
ah, ok
yes i see
glitch1 to glitch2 is 2.2ms which doesn't mean anything to me right off the bat
for example USBDUSBD init CDC init MSC init USBD: event BUS_RESET USBD: event BUS_RESET USBD: event SETUP_RECEIVED 000: 80 06 00 01 00 00 40 00 | ......@. Get Descriptor XFER Endpoint: 0x80, Bytes: 18 USBD: event XFER_COMPLETE Endpoint: 0x80, Bytes: 18 USBD: event XFER_COMPLETE Endpoint: 0x00, Bytes: 0 USBD: event BUS_RESET USBD: event SETUP_RECEIVED 000: 00 05 1C 00 00 00 00 00 | ........ Set Address USBD: event XFER_COMPLETE
sort of looks like a glitch began in free running style, but the background task restored order
kk, cool @gentle bronze. right now I'm getting the USB IRQ even though nothing is plugged in ๐
before tick optimization, a glitch started and then was squelched right in the same "active" background task
@slender iron ah I missed backlight_pin. but it doesn't appear to get reset when release_displays is called
@slender iron hmm weird, do you know what cause the IRQ
going to step away and think about this.
@gentle bronze looking now. there are six enabled
@onyx hinge sorry, my brain is in usb teensy land atm
(traces look much less spiky when my GND leads haven't popped off)
@gentle bronze looks like SOF received is active
its possible the USB hasn't been reset correctly
@slender iron it is hard to say, you can try to disable the SOF, it is not used atm https://github.com/hathach/tinyusb/blob/master/src/portable/nxp/transdimension/dcd_transdimension.c#L318
are you running on this branch https://github.com/tannewt/circuitpython/tree/teensy4-dev
I will also give it a try as well
I just saw that there is now some support for circuitpython on imx.rt10xx. I have a NXP imx.rt1010 evk. How do I install circuitpython on that devkit?
@gentle bronze ya, that branch on the 1060 evk
@obsidian valley sit tight, we're getting there
one minute ๐
could totally be an unrelated issue
seems weird to have SOF interrupt when disconnected
yeah, it is weird, it shouldn't happen though
No worries I'm sure I'll have a easier time using that kit with cpy than the original ide. I guess there is some mad coding going on to get those boards working
@slender iron do I need to flash a bootloader first
@obsidian valley ya, I'm currently reworking the flash definitions
@gentle bronze no
ok, just copy bin file over evk link ๐
I'm using a jlink to load
Cool I'll keep discord running and scroll through the messages here every now and then to monitor progress
one more sec, pulling out my jlink as well ๐
@obsidian valley the checked in version should actually work on the 1010-evk
@slender iron so you removed the bootloader?
@indigo wedge no, I'm just placing the non-bootloader things where it is
@gentle bronze do you have the swo printf handy?
I'm just not certain what the procedure is to install it and verify if it works. I have tried dragging the .uf2 file into the flashdrive of the board in windows but could not connect to it in mu. And tbh it's been a long time since I used that board and I dont remember what button does what.
@obsidian valley what is the name of the drive? you could try dragging the bin
@slender iron I used to use the ITM_ReceiveChar/SendChar, it worked previously,https://github.com/hathach/tinyusb/blob/master/hw/bsp/board.c#L38 but I haven't used it much lately
can't remember which file extension the built in debugger takes
@gentle bronze thanks!
it takes bin
but if your bin depends on the uf2 bootloader then it wont work
cause it will go to like 0xC000 offset and theres no boot code
yeah, it doens't seem to work with copying bin file to MSD of evk-link
couldn't connect with both evk link, and jlink, maybe I miss a jumper setting or soemthin
i'm working on the uf2 as much as i can ๐
that's like the 1st rule of coding, don't be clever ๐
true, seems to be working for me though
I put the ivt where the bootloader would have it but it points to the isr table where the bootloader would look
you should always be clever, except for when you shouldn't
@slender iron I need some help to load hex with jlink, do I need change any jumper setting
a specific loading command would help as well ๐
@gentle bronze the SW7 needs to be 0010
for spi flash
and make sure to mon halt before load and mon reset after
I think the jlink is actually loading a program of its own to do the flash
Perhaps stating the obvious... I am new to ARM, CP implementation, and even github... I am today seeing this same behavior.
I looked at the systick handler. (I think it does some unneeded things; see below.) I don't see a problem. I didn't dive down into some functions such as one related to the file system. Perhaps those can be moved to software triggered exceptions (maybe using the STIR, if available, for an atomic trigger). Those can then run at a lower priority. From my limited glance, ...
Ok the EVK's dirve comes up as RT1010-EVK containing a html file that links to it's product page and details.txt
@gentle bronze I can't figure out how to get SWO going
I need to step away from my jlink to feed cats and eat breakfast. will have my laptop
The cats approve of your plan.
she definitely does
@slender iron I still haven't figure out how to run the code, is there anyway I could use use non-bootloader linker to copy bin file to MSC evk link ?
I give up for tonight, still haven't know which command load firmware with jlink
@gentle bronze I'm not using a bootloader with it
RIP my USB
thanks @gentle bronze will keep you posted
@indigo wedge ripped off the board? you could solder it back ๐
yeah, don't have any tools here, all at our hackerspace
@slender iron which command you use to load firmware ? Normally I used this for jlink flash target # Flash using jlink JLINK_DEVICE = MIMXRT1062xxx6A JLINK_IF = jtag flash-jlink: $(BUILD)/firmware.hex @echo halt > $(BUILD)/$(BOARD).jlink @echo loadfile $^ >> $(BUILD)/$(BOARD).jlink @echo r >> $(BUILD)/$(BOARD).jlink @echo go >> $(BUILD)/$(BOARD).jlink @echo exit >> $(BUILD)/$(BOARD).jlink JLinkExe -device $(JLINK_DEVICE) -if $(JLINK_IF) -JTAGConf -1,-1 -speed auto -CommandFile $(BUILD)/$(BOARD).jlink
do you power it via the evklink usb or the dc jack ?
ah right, could be that,I will try that tomorrow ๐
@indigo wedge midi should be fine, the datasheet says its 8 bidirectional endpoints
@indigo wedge solder the pins and glue the socket :P
I did see a crash in usb_midi_init when my interrupt handlers were in the wrong spot
I have my evk1010 connected, copied the file onto the board, what next?
@gentle bronze is this correct with 8 EPs in imxrt? https://github.com/hathach/tinyusb/blob/master/src/portable/nxp/transdimension/dcd_transdimension.c#L270
@obsidian valley the other usb should show up as a CIRCUITPY drive
but you have to move a jumper and connect to the 2nd usb @obsidian valley
J1 which selects power source should be moved from 1-2 to 3-4 if you want to power from the device USB
otherwise you can have both USBs connected and then i think it's fine to leave it at 1-2
ok I'll try this gotta search for another usb cable thanks @indigo wedge @slender iron
@indigo wedge ah that could be my mistake, that limit apply to lpc18xx, iMX have 8 endpoints for both USBs. I will double check dcd vs datasheet tomorrow.
thanks for pointing it out
ok, its definitely the dcache
Could this be it?

common_hal_time_delay_ms() takes uint32_t
Sounds like a job of ceilf()
Just remember these math.h functions are 64 bit double without the trailing "f" on the function name. Not a huge cost for M7 with FPU that can handle 64 bit double, but a huge unncessary cost on M4 with only single precision FPU.
Wow, thanks! I'm new to ARM. Maybe a + 0.5 would also work. Or using a different delay function.
fwiw, this looks like a classic HAL trade-off. I'm sure Adafruit's main goal is minimizing engineering time to support as much hardware as possible. But like most hardware abstraction layers, the result is often constraining the most powerful hardware to a set of assumptions based on experience with the last powerful hardware.
As someone who focuses on powerful hardware, but also has only limited hours to do far more that people want than can ever be accomplished... I have mixed feelings...
I get lost in these layers. Here we have a function with no prefix calling a function with a common_hal_ prefix. This looks like the right layer for rounding to nearest (or up). If this is the time for better resolution, then a different delay function is needed at the right level, one that can be called here.
has anyone ever had a watchpoint literally crash gdb before?
The imprecision here is an intentional decision, as I said when this first came up. The Python code will never have reliable timing. We provide other modules for timing sensitive functions. Sure, it'd be nice if this had sub-millisecond precision but it isn't a priority. We have more reliable alternatives.
So, we'll happily take a PR for this but please don't read too much into this.
OK. Can we leave this issue at rounding instead for flooring?
(Sorry about misreading your earlier comment.)
What do you recommend for timing sensitive functions?
@slender iron if you get a second today, do you think you could check out this issue? https://github.com/adafruit/circuitpython/issues/2524 it's proving to be a bit tricky for me since watching the relevant variables is crashing my debugger. Switching over to installing everything on my new PC so if you're busy I'll keep hacking at it tomorrow.
@Dar-Scott Rounding works for me.
For timing sensitive stuff, it depends on what you are trying to do. Generally the pulseio module is what you want for pin toggling.
@ionic elk sorry, I'm heads down trying to improve the imx rt performance for show and tell
@indigo wedge https://www.adafruit.com/product/4448 ๐
hehe, yeah ๐
Hi all - any recommended projects or learn guides I could check out to learn more about sending/receiving AT commands in CP?
@old smelt check out the ESP AT library. it...isnt great because ESP kinda sux but i did do AT parsing, also check Hologram's cellular examples
Thanks @meager fog !
Uh-oh...
Though, the idea of warm sun on Tatooine does sound nice.
Oops! I meant, suns.
Oh wait - I see what I did wiht the URLs.
Never mind.
Got it
This trip through Jason's Stream of Consciousness brought to you by...Shack Happiness!
tinyuf2 is now close to the same level as my uf2 branch of tinyusb but I can't quite test it cause of the hw usb issue (see above) https://github.com/arturo182/tinyuf2
Rounding down is probably not what people expect. I recommend always rounding up.
I hadn't heard of ITM_SendChar. Maybe it needs extra setup on Sam d51? https://www.alkgrove.com/articles/SAMD51_SWD_article.html
Late to the party, but here it is: My CircuitPython 2020 post. Thank you everyone who shared their thoughts. I look forward to another amazing year! https://blog.adafruit.com/2020/01/15/2019-highlights-and-a-pledge-for-2020-from-kattni-circuitpython2020-adafruit-circuitpython-kattni/
Upper or lower case may be used for f, u, r, or b prefixes, so if we support one, maybe we should support all. https://docs.python.org/3.8/reference/lexical_analysis.html#string-and-bytes-literals.
Given that, maybe there should be case-insensitive lexer routines to avoid an explosion of combinations.
Upper or lower case may be used for f, u, r, or b prefixes, so if we support one, maybe we should support all. https://docs.python.org/3.8/reference/lexical_analysis.html#string-and-bytes-literals
stringliteral ::= [stringprefix](shortstring | longstring)
stringprefix ::= "r" | "u" | "R" | "U" | "f" | "F"
| "fr" | "Fr" | "fR" | "FR" | "rf" | "rF" | "Rf" | "RF"
shortstring ::= "'" shortstringitem* "'" | '"' shortstringitem* '"'
longstring ...
See comment re extra pin names.
We use board.VOLTAGE_MONITOR for other boards that have this kind of thing. Add more descriptive pin name aliases if you would like. I'll approve the PR but will not merge in case you want to add any more pin aliases. Let us know.
Add board to .github/workflows/build.yml too (that's why check failed).
Closing as "solved". Please reopen if there's something further to address.
Should be fixed by #2504, which will be in the next beta. Please reopen if not.
You're right, this won't do :D
@rhooper Sounds like https://github.com/adafruit/Adafruit_CircuitPython_NeoPixel/pull/66 has determined we can close this?
The long-term issue to fix here is to prevent a hard fault.
Fixed by #2505. Thanks!
@slender iron so what I am seeing is that in audio_dma_background, this new condition + if(event_interrupt_overflow(dma->event_channel)) { is firing pretty much constantly in my test with RawSample + AudioMixer. Additionally, the "glitched" samples occur right when background tasks are being handled, and the glitch data is what SHOULD HAVE been in the stream two glitches before
this is rewinding to BEFORE I reworked the tick handling to fire at most once per ms; this becomes much less clear AFTER ticks were reworked, because up to 1ms or so of data is glitched instead of just a tiny bit
@onyx hinge does overflow happen when you do mp3? its possible we don't clear the interrupt
continue;
}
+ if(event_interrupt_overflow(dma->event_channel)) {
+ event_overflow_count ++;
+ last_overflow_event_channel = dma->event_channel;
+ last_overflow_dma_channel = dma->dma_channel;
+ }
bool block_done = event_interrupt_active(dma->event_channel);
if (!block_done) {
continue;
``` note that you have to check overflow before interrupt-active because the latter clears the OVF flag
I know that it doesn't increment while looping a RawSample without mixer, but I think that's because "single buffer" audio gets a different path. Will test with wav and mp3, jas
On second thought, never mind for now. I'll merge in and you can submit another PR later.
@joeycastillo please also add a PR to https://github.com/adafruit/circuitpython-org/ so it shows up :)
ยฏ_(ใ)_/ยฏ
Could you also submit a PR to https://github.com/adafruit/circuitpython-org/ to add it to the board list? See the README.md there for details.
event system is only turned on in the case of !single_buffer, so that's why no overflows are possible there...
Could you also submit a PR to https://github.com/adafruit/circuitpython-org/ to add it to the board list? See the README.md there for details.
Ok, we should look more broadly. I'm not sure I'm using extern in new stuff. This is good for now.
@slender iron @meager fog hi, is this what you meant by adding a PR for the Open Hardware Summit badge (nRF82540)?
https://learn.adafruit.com/how-to-add-a-new-board-to-circuitpython/submit-a-pull-request
it keeps tripping me up that if my program is in an input(), it will not auto-reload
@fierce girder yep!
thanks
Managed to get another couple datapoints today.
- Tried the same circuit python BLE keyboard code on a co workers windows machine (different manufacturer, different Bluetooth chipset even) with built in bluetooth and got the same error (driver error)
- Loaded up the Arduino BLE keyboard demo and was able to successfully connect and have windows recognize and treat it as a keyboard.

oookkaaaaaay. the difference between my working and non-working code was a print(), the long background task block is displayio scrolling the text display.
some of my programs weren't affected because they did not have print()s
that was the real pattern, and it was obscured by other things
now there is a remnant mystery about why even when playing correctly, there's "usually" an overflow indicated, but not always.
I've just added the new debug build v08 apk to the Android Bluefruit Playground Repo. This version changes how the neopixel animations work a bit to solve an issue where the animations failed to stop properly sometimes. I think it could also lead to the animations running smoother on some devices. There are also some improvements to the disconnection process from last night included in this build. https://github.com/FoamyGuy/Android_Bluefruit_Playground
Once I get the package namespace switched over, the signal strength icons, and a proper loading indicator on the accelerometer module, that will be everything from all of the feedback I've received and my own list of things todo. Getting pretty close to ready to launch. Anyone with an Android device and CPB interested and willing to test it out please let me know how it goes and what device you tested on if possible.
Goal is to finish up those things by the end of this weekend.
Did a little bit of digging. Used the nRF connect android app to scan so I could log what if any differences there was in advertisement data between the advertisement sent while using this arduino sketch vs using [this circuitpython example](https://github.com/adafruit/Adafruit_CircuitPython_BLE/blob/668b0bcb280a2cfd4c1a5e5ebd90c0c81d78ce52/examples/ble_...
This is really odd because I did the same thing as you, and am seeing the flags field (0x01 with value 0x06) in the advertisement. Below is my screenshot. I am using the code below as a test: it's a slightly modified version of examples/ble_hid_periph.py. I'm using https://github.com/adafruit/Adafruit_CircuitPython_BLE/releases/tag/3.1.2 (not 4.0.0). I'm using a very recent build off master of CircuitPython. Do these versions differ from what you are using?
[ble_hid_periph.py.txt](h...
I tinkered with the test script and it seems that time.localtime() or time.time() takes about 4.46 ms and during its execution 3 tick interrupts seem to be lost.
Super responsive UI using circuitpython!
@gilded cradle I know you asked this question literally months ago but I got the responsive buttons by using a procedural display library instead of displayio. I did some practical testing and I found this was was much more responsive heuristically. Not to mention itโs only blitting what it needs to
That being said, displayio is still great for most applications
@slender iron can I ask you some questions about glyphs? i'm trying to extract their bitmap but i;m not finding much docs
tomorrow, I'm headed to bed now
kk, sleep well ๐
really disappointed with Mouser, they've been keeping my order on hold for 4 days now cause I might build a bomb with the Adafruit accel board :/ https://twitter.com/arturo182/status/1217524744867610625
They agreed to remove that item from the order now, send me everything else and send me this one with the backorder items once the confusion is resolved
@indigo wedge so it's Adafruit's fault after all!
It seems hardware reset occurs with calibrationData = OCOTP->ANA1; in
sdk/devices/MIMXRT1062/drivers/fsl_tempmon.c
There is working TEMPMON example in SDK and in Teensy4 core
@indigo wedge what else could you possibly use it for ๐
@solar whale https://www.youtube.com/watch?v=K7nPh2p0_ak
Quick test of the Adafruit Circuit Playground with Bluefruit Playground AR puppet... full post is here:
https://blog.adafruit.com/2020/01/12/digital-puppets-using-ar-augmented-reality-some-apps-companies-and-14-ish-years-of-trying-things-2020cv_inc-thinkoco-creativecloud-char...
We have 99 boards!
...standing on the wall, 99 boards standing on the wall...
which reminds me that I need to update the photo
Heh. You gave me the tiniest amount of power! I shall abuse it. ๐
the black piece of cardboard that I use for background is getting really worn out
Gives a good vintage look
I photoshopped it with gimp to make it look black ;-)
Haha
OK this might be the fix: in sdk/devices/MIMXRT1062/drivers/fsl_tempmon.c before
calibrationData = OCOTP->ANA1;
add CLOCK_EnableClock(kCLOCK_Ocotp);
microcontroller.cpu.temperature
48.1304
Thanks @marble hornet. I think I was trying to figure out how to get the calculator buttons to be more responsive, but the CircuitPython displayio speed update fixed it.
@manitou48 nice find! would you like to submit a PR?
Please someone give a new micro USB cable to @meager fog ... The red one I see in YouTube video is damaged with the shielding is visible. Thanks.
has anyone else noticed a builtin font error on the nrf52840 feather in 5.0 beta 3 for the letter C ?
How strange, I definitely tested that code before and it did work, wonder if I removed the clock enabling code somewhere, anyway, @manitou48 if you want to fix it, it should probably be here: https://github.com/adafruit/circuitpython/blob/master/ports/mimxrt10xx/common-hal/microcontroller/Processor.c#L36
@marble hornet wat do you mean?
but manitou we believe in you and think you can submit a PR!
(sadly, I don't have any NRF board that runs CircuitPython, since non-express boards were dropped)
I was thinking about making a haxpress board, though
@stuck elbow I just did a build of the current master and it built the non-express nrf52840 boaeds -- which one(s) do you have?
the Feather nrf52840
that is an express
yes -- has 2Mbyte Flash chip
ok, I will try it then, thanks
now that you mention it, that's confusing!
I hope this patch I'm working on .. works out. Decreases AudioMixer CPU utilization 50% and switches to saturating arithmetic so voices don't get fainter as you mix more. Just waiting on some build testing before I PR it.
the build is BOARD=feather_nrf52840_express
yeah, but the silkscreen just says feather nrf52840
maybe I have an early hardware version
the product page also says "express" https://www.adafruit.com/product/4062
I wasn't trying the nrf port all this time because I thought it wouldn't work
silly me
the flash must be integrated in the RF shielded package?
no, I think there is a tiny flash chip just next to the module
@onyx hinge that sounds awesome
2 MB of QSPI Flash for storing CircuitPython files
re the patch
it does take +200 bytes or so of flash so I'm worried it might not fit everywhere
@stuck elbow i mean the c is shifter up and cut off on the bitmap ?
nm, it's my code! hmmmm
what's the best approach to stepping through a mpy file while debugging via stack trace? I hit an error while trying to get my esp32 to connect to a node server and the runtime error is popping up from within one of the mpy files.
I know that I can go to github and pull down the original py file and walk through them that way, but is there an easier way of looking through the mpy files themselves?
not that I know of
hmm, gotcha
00 usually means that there is a problem with the connection, or the esp32 doesn't respond for some other reason
oh good to know
spi doesn't have any crc or ack, so if there is no connection, you simply just read all 0s
I am seeing the "Legacy" problem with no flags with 4.0.0. Will investigate further.
Oh, the 4.5 ms for time.time() and the 3 lost SYSTICKs are from testing on Feather M0 Express.
interesting. so I'm using the following url to test:
SERVER_URL = "http://10.10.10.137/"
When I removed the http I got a different error stack
Traceback (most recent call last):
File "code.py", line 180, in <module>
File "adafruit_requests.py", line 270, in get
File "adafruit_requests.py", line 167, in req
ValueError: need more than 1 values to unpack
and this is making a request to a simple node/express server I'm running locally
const express = require("express");
const app = express();
const port = 3000;
app.get("/", (req, res) => res.send("Hello World!"));
app.get("/json-test", (req, res) => res.json({ message: "Hello World!" }));
app.listen(port, () => console.log(`Example app listening on port ${port}!`));
nothing fancy, nothing special
you need the http, I think
and I can def make that http request and get a response outside of the microcontroller
gotcha
hmm, let me try pinging the node server from the controller (haven't tried that yet)
make sure the esp32 has the correct firmware flashed, is correctly connected and is powered
(unless it's built-in)
I'm sure you've probably got it done already, but just because I caught myself with this the other day: Make sure your sever is visible to other devices on the network
aaaaah
