#circuitpython-dev
1 messages Β· Page 279 of 1
yes, maybe I'll just leave it. It appears that a long-running event handler is not as problematic as one might have thought.
π― π― π₯ π π― π― to everyone who helped get this over the finish line - you are heros! many glowy projects will thank u :)
I don't actually think this is a reset issue. The buffer for PWMing the neopixels is huge totalMem = numBytes*8*2+(2*2) and in the stack trace numBytes is 960 for a total of 15364 bytes.
I'll have it raise an OOM if the SD is on.
I changed the interface to read_report_into, but for some reason it now stopped working. I need some more time to debug this.
Excellent! Thank you for clear thinking on all of this, and debugging the neopixel PWM issue.
@tannewt Right, the more pixels, the more likely this is to be triggered (but even doing just 32 Neopixels was enough to eventually trigger the fault). During that test, I had the pixel count set to either 240 or 320 (I forget which now). I wonder why that eventually becomes an issue? This issue was happening whether or not I had adafruit_ble imported.
What further testing (and/or breakpoints or other gdb commands) can I do to provide more context?
@slender iron thanks! glad to see it finally make it into master.
@craggy galleon the cookiecutter error has been fixed. if you run it again, make sure to answer yes to the re-download question. thanks for bringing the issue to our attention!
Ill give it a test run shortly. Thanks heaps
@gilded cradle @onyx hinge Either of you still on the clock and have a couple of minutes to review a PR?
Sure
@craggy galleon as a peripheral affect, i'm currently looking at writing some tests for changes to our cookiecutter. this would have been easily caught.. π
Which pr @idle owl ?
Thanks @gilded cradle!
yw
@rhooper give it a try now that I have it throwing a memoryexception. I have a feeling it'll fall into the "memory fragmentation sucks" bucket which doesn't have an easy fix. One option would be for neopixel_write to hold onto its memory indefinitely and reuse and expand it as needed. That could reduce heap churn.
Another option would be to make it accept an optional pre-allocated buffer, like the audioio does now. This way the user can control the lifetime of the buffer if it's needed.
@gilded cradle You can merge it - Limor already ok'd someone else reviewing it. I initially thought she wanted to, but she headed out so I verified with her before she left.
ok
Thanks so much for the super thorough review! I really appreciate it.
You're welcome. I didn't test it, but just looked at it closely.
I tested it when updating the guide because I had to do Mu screenshots of everything anyway.
Excellent
Yeah, easy enough to fix.
@deshipu That was going to be my suggestion, rather than having neopixel_write hold onto memory.
You're welcome!
PacketBuffer facilitates packet oriented BLE protocols such as BLE
MIDI and the Apple Media Service.
This also adds PHY, MTU and connection event extension negotiation
to speed up data transfer when possible.
Upon further thought, this is a port-specific behaviour. Having neopixel_write take a buffer just for one port isn't a great idea. The suggestion by @tannewt to reuse (or grow) a buffer is a good one and should be easy to implement.
A future optimization might be to free the buffer (on NRF) if garbage collection is called manually from gc.collect?
@raven canopy thank you for the fix. Works now. I also wanted to note that it puts the older versions of Python3 as supported (3.4, 3.5) rather than newer ones (3.7,3.8). Is this something that should also be updated?
This might address https://github.com/adafruit/circuitpython/issues/2442
I'll leave it running overnight.
The possibility of a using pre-allocated buffer could be hidden in the calling libraries. neopixel_write could report this possibility with a property or similar.
I wonder, do we really need to fit the whole thing in one buffer? Would it be possible to use two small buffers for double-buffering back to back, and fill one while the other is playing out? This way it could handle any number of pixels with constant memory.
Might be able to use a single smaller static buffer - though I'm not sure if the timing would remain accurate. That said, it would be easy to test if a fixed buffer works, as DMA mode still has a wait loop. https://github.com/adafruit/circuitpython/blob/master/ports/nrf/common-hal/neopixel_write/__init__.c#L213
It isn't clear whether use of two sequences and NRF_PWM_TASK_SEQSTART1, NRF_PWM_EVENT_SEQEND1 would be helpful.
@craggy galleon i don't have a confident answer to the setup.py referencing 3.4/3.5, beyond the fact that CircuitPython (via MicroPython) is based on the 3.4 syntax. There are quite a few popular things in 3.6+ that we don't really support. Granted, Blinka users will have the newer versions available... @idle owl might have a more concrete answer.
@tannewt I would need to get six working. Would like to port this project to CP:https://www.hackster.io/paul-bricmont/nearly-nimo-clock-9309ec
@pbricmont Your url text and link differ for https://www.hackster.io/paul-bricmont/nearly-nimo-clock-9309ec
I didn't know about NIMOs. At a glance, I would have assumed your project emulated a vacuum fluorescent display but that's probably based mostly on the colour.
FYI, there's also an issue ticket for fill() being slow over on https://github.com/adafruit/Adafruit_CircuitPython_DotStar/issues/37
I've noticed two very minor differences on the Circuit Playground Bluefruit wrt to touch pad inputs. I doubt these are CircuitPython specific but I am running 4.1.0 vs 5.0.0-beta.2. The first difference is I think the default sensitivity is a little different. It's subtle but I think the CPB takes more to register the input using a finger. This is based on comparing a single pair of boards so far... There's a few questions here, is the auto-calibration at startup working? Is there expected to be a difference with the nrf chip? Is this difference significant enough to affect (existing) projects?
Second one is more fun. I've got the speaker active and I'm making some beeps on it. I'm also using touch pad A1 next to the AUDIO pad. If you put your finger firmly across A1 and AUDIO then it makes a curious sci-fi type noise. This is probably just some combination of the amplification of signal on A0/AUDIO being more sensitive and different approach to capacitive input between the two chips? This code can be used to demonstrates it: https://github.com/kevinjwalters/circuitpython-examples/blob/b590ddf935f10983ca7e99068ce8ad328d00db06/cpx/cpx-reaction-timer.py - press A1 whenever the first NeoPixel comes on or it beeps and try firmly "bridging" over to AUDIO pad on CPB with finger.
As I didn't see it discussed in this issue, is there any plans to bring over the DMA based libaries to cpy?
hello here.
@slender iron is telling me to do a PR (pull request) on github ... is there a documentation to do that correctly ?
I usually use git to clone, and to manage my projects locally, but never to push to github or similar services
@PTS93 the latest changes to _pixelbuf were just merged into master yesterday. If you're good with building CircuitPython yourself, you can try the _pixelbuf variants of neopixel.py and adafruit_dotstar.py over at https://github.com/rhooper/Adafruit_CircuitPython_DotStar/tree/pixelbuf and https://github.com/rhooper/Adafruit_CircuitPython_NeoPixel/tree/pixelbuf
If you're using one of the new nRF boards like the Feather nRF52840 https://www.adafruit.com/product/4062 DMA is used for neopixel...
@kevinjwalters _pixelbuf has a native fill that the previously mentioned forks/branches of adafruit_dotstar.py and neopixel.py can use.
Thanks a lot !
typical SCK scope trace while playing MP3 from SD card
@onyx hinge is that good? π
@ruby atlas It is okay I guess. danh is concerned about things that block for 1ms and this is a lot more than that (all the time that SCK is pulsing, it's in a background task and blocking other background tasks) but on the other hand it's a lot less than 100%
(actually it's blocking more than that, because it also has to decode MP3, this is just showing the SD transfer time)
it's mostly "whee, I know how to use my o'scope" π
I wouldΒ like to play with scoping more. I haven't used any modern scopes.
Is the concern that >1ms of background will affect the Soft Device?
(BTW, What the heck is the Soft Device in the NRF port?)
This is still running ... ~11 hours later.
@ruby atlas Soft Device is the code from nRF that makes bluetooth work, is my understanding
Right, but i'm wondering why it's called that π I guess I should google.
"SoftDevice S132 is a high performance Bluetooth 5 qualified protocol stack for the nRF52810 and nRF52832 SoCs"
I assume because it's Software that implements the bluetooth Device ? idk
Also "The SoftDevice contains the Nordic Bluetooth code. It's a piece of firmware that is flashed in a certain area on the microcontroller. When you have flashed a SoftDevice you need to adjust your linker settings of your code. See the examples for suitable linker files."
I just wish I knew how to disable SoftDevice when debugging via jlink
Ha.
you too eh?
hmm, wonder if it's always enabled now.
But either way, I feel like Scott or Dan know how to avoid the SD being enabled if you don't want it while debugging something that really doesn't need it.
seems like it is always enabled now
@tulip sleet I realised too late, I should have included some kind of friendlier error in the Circuit Playground library for when importing the Bluefruit-only features on Express. I'm adding it now, I don't expect it to be included in 4.1.x, but we should include it in 5.x.
Also realised that if I add those errors, the code I have to update one of the examples to work with both CPB and CPX no longer works because it uses hasattr and they'll both have it now.
So that update will no longer work.
There's one thing that CPX has in dir(cp) that the CPB does not, but it's wholly unrelated to the program. Keeps the code clean though, so I guess I'll run with it and comment it instead?
could you use os.uname()?
@idle owl what about a class property has_bluefruit on both, set to False on cpx, True on cpb? That could make example code easier to read than try/except.
@raven canopy Don't want to complicate the code any more than necessary.
π
@ruby atlas Maybe? this is literally the only example that it's an issue though.
Anything else can be written specific to each board really easily, or has no issues working on both.
What I wrote works. I can comment it and it'll be fine.
>>> os.uname()
(sysname='nrf52', nodename='nrf52', release='5.0.0', version='5.0.0-beta.0-112-g17c8356b8-dirty on 2019-12-05', machine='Adafruit Circuit Playground Bluefruit with nRF52840')```
Yeah, that's cleaner.
This adds one line of code to check if the touch_A7 is available or not, and calls it Express if it is. It's pretty clean.
@tannewt : Is there a way to use ports/atmel-samd/boards/monster_m4sk/mpconfigboard.mk, or I change the value directly in py/circuitpy_mpconfig.h ?
Hi experts, I'm trying to convert a float value from time.monotonic() into two integers which I want to transmit on IR.
How would you suggest I go about doing that?
I guess the part before the decimal are just int(x), but what about after? The number of decimals I guess, three would be nice, two can be ok if need be.
Ooops, wrong room, I think. Sorry π
@timber mango One way is math.modf() it's present in my M4 Feather build https://docs.python.org/3.5/library/math.html#math.modf
(Not tested): What you could do is change these lines in circuitpy_mpconfig.h:
#if CIRCUITPY_DISPLAYIO
extern const struct _mp_obj_module_t displayio_module;
extern const struct _mp_obj_module_t fontio_module;
extern const struct _mp_obj_module_t terminalio_module;
#define DISPLAYIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_displayio), (mp_obj_t)&displayio_module },
#define FONTIO_MODULE { MP_OBJ_NEW_QSTR(MP_QSTR_fontio), (mp_obj_t)&fontio_module },
#define TERMINALIO_MODULE...
perfect. I will do that very soon
allow defining CIRCUITPY_DISPLAY_LIMIT in the mpconfigboard.h files for each board
setting it at 2 for the monster m4sk
following instructions from : https://github.com/adafruit/circuitpython/issues/1760#issuecomment-570802884
my first PR ... sorry if something is wrong...
π
@idle owl Is there some work going on with offering a single import line or cpx / cpb object that works (mostly) on both CPB and CPX?
@simple pulsar from adafruit_circuitplayground import cp and it detects which board and imports properly.
Still needs help pages and a few other finishing touches but getting pretty close now, I will probably get the code up today or tomorrow. All of the main functionalities from the iOS app are working:
https://youtu.be/f0aQ4DjcFx8
@lone axle That's great! Please let me know if you need testing. I have no idea how to build it myself but if you can get me the packaged app, I'd be happy to test it.
@idle owl Thank you π I will definitely need some help testing on different devices. I'll include a built APK file in the repo once I put it up.
Excellent.
@idle owl Is the new cp fully compatible with code written for cpx object? Is that going out for 4.x as well as 5.x? Perhaps all these questions are answered already somewhere?
Is the cpb been deprecated now? I've got some CPB only code that'll probably go out in a guide in a week or two, hence my interest.
The old way works as well, but we're wanting to use the cp method going forward so all code works on both. Yes, it is fully compatible. It simply checks the board and imports the module, so it's basically cpx/cpb behind the scenes. The old way isn't necessarily deprecated, as it still works. @simple pulsar
It's already in 4.x and 5.x.
That was the main reason for 4.1.2
These questions are not really answered anywhere, you're not missing anything. I'm updating the main guide for the library, but we're not expecting all existing guides to be updated.
I can update the README with this information.
@idle owl do I have do do anything to my forks of library repositories with respect to the change over to github actions?
@solar whale Presumably do a pull once everything is merged. I don't think there's anything you specifically need to do.
Thats what I was hoping! -- Thanks
@slender iron @tulip sleet do I need to do edits to the UF2 generator for stm32 before I should expect it to start working properly? The current build process creates one, but the Meowbit bootloader doesn't even recognize it (compared to UF2s they provide for micropython).
I've got their emails now, so I can reach out if this is something that's more likely on their end, but I want to make sure there's nothing more I need to do first.
@idle owl : thanks for your guide about git and github. it was very nice to read and everything worked as expected (for now).
You're welcome! Thank you for the feedback. Let us know if you have any further questions.
sure !
This is almost done with two remaining issues.
- I'm still unable to get the Meowbit's built in UF2 bootloader to recognize the UF2 files generated by
tools/uf2/util/uf2conv.py. Unlike the Micropython UF2 they provide from their website, which causes a reset when loaded, ours just moves to the bootloader drive and sits there without incident. Hoping to resolve this with the Meowbit team since otherwise users will need to manually solder on an...
Thanks I will give it a try! Building it is no problem.
Though regarding at DMA for M0 needing to much space/memory, I don't really understand, thats the main target of the Arduino libraries?
Here's what I learned from a little grepping around in the bootloader:
Auto reset after reaching a target number of flashed blocks is in both meowbit's bootloader and the microsoft samd uf2 bootloader, but I think a bug prevents meowbit's from working.
The code is a little different, but here's the relevant block from write_block in https://github.com/microsoft/uf2-samdx1:
void write_block(uint32_t block_no, uint8_t *data, bool quiet, WriteState *state) {
...
if (s...
So I got the latest master and compiled for the PyBadge but speed is exactly the same, is there anything different about how I need to call or construct anything?
import neopixel
neopixels = neopixel.NeoPixel(board.D3, 120, brightness=0.3, auto_write=False, pixel_order=neopixel.GRB)
Using the hello world code of the py badge:
for color in range(0, 360, speed):
for index in range(0, NEOPIXEL_COUNT):
palette_index = pixels[index] + color * directi...
Just booted up my Feather M0 Express with Featherwing OLED (and I also have an adalogger) after the longest time. I am wondering if anyone has any ideas for projects involving this microcontroller and its addons?
Ok I compiled the pixbuf tree and it works a lot faster now!
https://twitter.com/timonsku/status/1213599823116591105
Still a lot slower than the Arduino library but it now makes 100-200 pixel strips usable in combination with other stuff, which before was just impossible! Thanks for all the work!
@short phoenix You could use some of the pins as button inputs (capacitive touch) and see what kind of game you can come up with to run on the oled.
:πππWhooooππππ₯³
Awesome contribution, thank you! Much glow will be had
Okay, thanks
@jepler I'm not a UF2 expert here but I do know that manually resetting out of the bootloader after flashing the Circuitpython UF2 to it does not result in it rebooting to circuitpython - rather, it boots to whatever was written before, in this case micropython. So something is happening further up the chain that is resulting in the UF2 never hitting the point where it's written to the internal flash at all. It makes it to the external flash and stops there.
eek well that's even worse :-(
Using the HID-based (hf2) bootloader might just work, and have the same memory layout constraints as for uf2.
@idle owl and anyone else interested / willing to test. The repo is up now and there is a debug build APK in the root of it that you can download to install on an Android device. https://github.com/FoamyGuy/Android_Bluefruit_Playground
There is a direct link to the APK in the readme file now. Anyone with an Android device and a CPB who is willing to try this out please let me know how it goes and which Android device you have tried.
@lone axle what firmware goes with the app?
@quasi fjord this pdf has the full details on the app: https://cdn-learn.adafruit.com/downloads/pdf/bluefruit-playground-app.pdf?timestamp=1577363264 and the firmware specifically is here: https://adafru.it/HCh
I will update the readme tomorrow with that information.
looking good on a Pixel 3a. The NeoPixel page could use a page indicator. I didn't realize there were other modes until I read the guide. And for your TODO list, the accelerometer page doesn't let you manually rotate
Android 10 on the Pixel 3a. It also looks good on a Nexus 5X running Android 8.1.0
a quirk on the button status: the switch shows an update animation when I first hit either A or B
Looking good on a Samsung Galaxy Note 4 too, Android 6.0.1
Any idea if this works with Windows / OSX hosts?
I would like to request PIDs for 2 of my i.MX RT Feathers: 1011 and 1062, and for the MIMXRT1010_EVK board, so 3 in total.
Thanks!
@quasi fjord Thank you π I'll get those added to the todo list. If anyone here has a CPB and an iPhone and is willing to help out. A short recording of the Accelerometer module in the iOS would be most appreciated. In particular I'm trying to see the behavior of manually dragging the 3D model vs. the Accelerometer data moving it.
Any idea if this works with Windows / OSX hosts?
It should work fine assuming they have BLE support (you may need Windows 10). In our experience, iOS is the pickiest, and hardest to get working. Windows, MacOS, Linux, and Android are all easier.
@lone axle just tried your app on an older ZTE android phone -- v7.1.1 -- worked great!
one minor issue is that "Disconnect" does not seem to work ??
Hooray! Thank you. Yes that is correct I need to hook up the disconnect button in the top left corner of the modules list page. For now tapping the notification in the notification bar is the way to disconnect and shut down the bluefruit service in the background.
once I am disconnected -- how do I get the App to restart and rescan?
it just comes back up but is not connected
@solar whale Re-launching it from the home screen / app drawer should initiate a new scan I think. If not I believe there is a refresh button in the top right of the pairing activity that you can press to manually start a scan
Oh, I see on my end that re-launching is not working quite right
ok - np -- tryin g to record iphone accel screen -- now trying to upload
Accel. Demo
if you use the back button on your device you can work your way back through closing things. Once everything is closed the next time you launch it should take you to pairing screen where you can scan/connect
sorry about the beginning of the recording -- is that what you needed
Oooh, Thank you. Is there any way to show screen touches?
I have no idea π
I'm trying to figure out how the interaction between manually dragging the 3D model vs. the incoming accel data moving it
like if you manually drag it does that override the accelerometer position for a few seconds or something?
and then just go back to matching the accelerometer after some time?
if you manually drag it, taht seems to just provide a starting point for actually moving the CPB.
the accel only seems to give relative position
The meow:bit folks pointed out the uf2 family is for stm32f4.
Looks like the UF2 family id is wrong: https://github.com/adafruit/circuitpython/blob/master/ports/stm32f4/Makefile#L259 should be "STM32F4" https://github.com/microsoft/uf2/blob/master/utils/uf2conv.py#L21
all the motion in the movie was from moving the CPB
Ah I think I understand. Can you record one more where you drag model on the screen a bit and then move the physical device a bit?
ok -- just a sec
first part is dragging -- left it on side view the started moving the CPB
Awesome. Thank you.
It's like an extra adjustment that allows you to change the angle you give the board from.
yes -- seems that way --
The 3D Model was new territory for me so I'm not sure exactly how to implement it, but I should be able to figure it out now. Thanks again for testing on the Android device as well.
You've done a great job -- so quickly -- glad to be of help.
Hi all, tomorrow is our first CircuitPython Weekly of the year! It is here on Discord in the circuitpython voice chat at 11am Pacific / 2pm Eastern. Everyone is welcome to attend. More info and notes are here: https://docs.google.com/document/d/1GDZ5iwjekH8D-wLp5atE8N4eL4L6pwmDZcK6oG9YN0A/edit?usp=sharing <@&356864093652516868>
happy new year scott
you too @exotic pumice !
π
@heady rampart thanks for the ping! I added the CircuitPython builds for the Particle Meshes. I don't think there is much remaining work there but it's nice to have a contact. π
@lone axle the neopixel selection is a bit skewed on my Android phone.
sorry -- could not figure out how to get the android to do a screen capture -- took a picture with iPhone...
volume down + power typically
tried many combos -- funky phone
@jerryn no worries. Picture is fine. I think i know the cause of that. Will need to tweak the available sizes of the board graphic. Do you know the resolution of your device by chance? Or the model number?
ah -- got it -- just was not hitting vol down properly...
I can never figure out the SERCOM stuff on the samd51
this is a ZTE N9137
I feel like I need a memory expansion to hold everything in my head to figure out which pins to use.
@ivory yew that table in the datasheet just never helps me. there must be a better format to present the info
that table is horrific.
not sure of details -- or where to find them -- I got this just to play with android apps - don't use it much
I just want a second SPI bus.
I guess I can use my current SPI bus and just add another CS pin.
that seems easiest, for some definition of easiest
the docs on atsamd-rs hal used to be good for that but we changed some things and now it's a mess
I guess I can get old docs
API documentation for the Rust SPI5Pinout enum in crate metro_m4.
does that help at all?
not really
yeah, still gotta figure out the pads and stuff
@lone axle looks like it is 480x854 https://www.phonemore.com/specs/zte/tempo-x/n9137/
@jerryn perfect, thank you Im out and about today but once i get that tweak made, i'll get a new apk put up in the repo.
no rush on my part -- thanks for all the work -- happy to help.
@ivory yew This is for uart but could be adapted to find spi pins fairly easily I think https://learn.adafruit.com/circuitpython-essentials/circuitpython-uart-serial#wheres-my-uart-14-14
good lord
I give up, I'm just gonna multiplex the one SPI bus I have. It's not a big deal.
less stuff to route anyway
@solar whale Its a bit of a balancing act on android with all of the different screen sizes and densities. But should be able to get them covered with a good set of differently sized assets. Thanks again for the help, i really appreciate the feedback.
Hmmn I should probably run pylint on jeplayer
what a way to ruin your day π
Are there timer allocation issues that the pin code above would reveal that the data sheet would not? I've been meaning to make an all-purpose version of that code for all of the major features... I2C, UART, SPI, etc
(Ran into trouble trying to PWM the LED on PyPortal due to lack of an available timer)
@ivory yew @idle owl has a script that tries all combinations on an existing board def
you could modify it from the pins defs in microcontroller.pin
iMX RT1011 Feather VID 0x239A PID 0x0073 # bootloader
PID 0x8073 # arduino
PID 0x8074 # circuitpythoniMX RT1062 Feather VID 0x239A PID 0x0075 # bootloader
PID 0x8075 # arduino
PID 0x8076 # circuitpythonMIMXRT1010_EVK VID 0x239A PID 0x0077 # bootloader
PID 0x8077 # arduino
...
@solar whale overall I do think it leads to better code. (One or two rules are wrong but people disagree about which ones)
finally got my #circuitpython-dev2020 finished. :phew:
@slender iron does a link here work fine? or do you (also) want an email to the CP2020@adafruit?
https://gist.github.com/sommersoft/5cf89098fa8a657bdd45a7f5fd4bf0ac
meeting today? (Jan 6)
@fierce girder yes -- notes here https://docs.google.com/document/d/1GDZ5iwjekH8D-wLp5atE8N4eL4L6pwmDZcK6oG9YN0A/edit
The PewPew M4 devices come with different displays, which require
different offsets. Since the information about offsets is saved in
the bootloader, we can take it from there.
Your code has been rated at 0.50/10
Lint needs to be more empathetic ...
your code has been rated 0.50/10 but I've seen worse...
yeah this is discouraging enough that I am reconsidering whether to spend my time this way
At least it was positive -- I've had negative ratings...
o_O
@onyx hinge I assume you have seen this https://learn.adafruit.com/improve-your-code-with-pylint/pylint-errors
yup, thanks!
I spent most of my career as a solo programmer on embedded systems -- It has been a struggle to get used to a large opensource project like this. I appreciate the need for standards, but bristle at some fo the nit-picking. My response to lint is often "If it bothers you, then you fix it" π
but then I go ahead and do it ...
I am going through that a bit myself right now, but I'll try to get through it
some of these rules are so contrary to my personal style that it's hard to be willing to adapt
do you guys use a lint for your C code?
I thought that all that was basically covered by compiler warnings these days but I want to make sure I'm not missing out on anything
afaik we don't use clang-tidy or anything like that.
@ivory yew though tannewt has looked into doing it
that's certainly possible.
@ionic elk the compiler errors are pretty stringent for "real" problems but don't do much for "stylistic" concerns. I've been able to run clang's scan-build static analysis and it found a few interesting things but not many.
clang can't compile CMSIS so it's not possible to build anything but the Unix port with it
(I should have probably chosen different language so it doesn't sound like I'm disaparaging "stylistic" checks. They're important, because a project needs to speak with one voice as it were)
was just reading https://barrgroup.com/embedded-systems/how-to/lint-static-analysis-tool out of curiosity. The compiler by default doesn't highlight the example it provides.
Printable PDF Language specifications, including those for C and C++, are often loosely written. A static analysis tool called lint can help you find dangerous and non-portable constructs in your code before your compiler turns them into run-time bugs.
I figure the open source tools incorporate the bulk of the useful warnings from proprietary tools
Having just spent some time chasing down a pointer error I'm feeling like I could use a little extra check
but I don't know that from direct experience
@tannewt Yep working on that this morning! I missed the magic number requirement.
All the circuitpythonistas in Europe and UK: https://hackaday.com/2020/01/06/hackaday-belgrade-call-for-proposals/
hum unexpectedly I am getting hangs when I use audiomixer .. in shared_dma_transfer!!
which is ??? because I believed I had fixed the hang
Not exactly sure where to put this so my apologies if this isn't the right place. But just wanted to point this out for @tannewt and @dhalbert
but even before it does that, it plays back "stuttery". there may just not be enough CPU power left over after spending all that time on SD card reads
shouldn't the M4 DAC go up to nearly +3.3V?
seems like it clips at 2.7v
it is drive strength or something, on headphones it clips at more like 2.6v
audiomixer playing a 768-sample, 10-repetition sine wave.
I think audiomixer may have an assumption somewhere about the relationship between its own buffer size and the underlying samples' buffer sizes? A 1024-sample, 10-repetition sine wave plays fine.
sine wave clipping. headphones and speaker disconnected from pygamer.
ooh, thanks for the tip @dunkmann00 !
DAC is characterized for max load of 5kOhm, actual load is 200ohm in pygamer according to schematic, probably explains clipping π
@onyx hinge There are two 100-ohm series resistors leading to the PyGamer's amplifier after a 4.4K-ohm voltage divider, but the amp's internal impedance is 10K-ohms; shouldn't be an issue.
The DAC is seeing a 4.0k-ohm load caused by the voltage divider and the amp's internal resistance. That is close to the 5k max load spec as you noted.
this is the part I was looking at
@meager fog @slender iron evaluating my priorities today as Meowbit weeds wrap up. Current shortlist is:
- full optimization test across all chips/peripherals
- address remaining busio issues like one-line SPI, etc
- internal filesystem improvements & better package management
- Add espruino wifi/pico, Discovery F405
Anything you'd like to add/move around? Happy to help with @onyx hinge with audio DMA stuff if that's high priority, it's still on my basecamp todo.
doesn't that create a 200 ohm load on A0?
@onyx hinge Ah. That's a horse of a different color.
same code as the "clipping" example, but over on a metro m4 express
^^ Yes. I missed that on the schematic.
np, you found 2 100-ohm resistors and I wasn't any more specific..
But I'm more confused after looking at the M4 DAC's output minimum spec:
200 ohms would exceed the minimum?
so they're saying that's the lowest resistance allowed, not the load. Okay.
that's my take
Looks good to me! - canonicalizing the features.
I don't have a decade box or I could be more specific
sorry about the distraction. Was confused by an earlier reference in the spec sheet that said the DAC outputs had "high-drive capabilities."
For what it's worth, 5kOhm is indeed on the higher side... often you'll see more like 50-100k specs in garden-variety DACs.
@errant grail I appreciate your time, thank you!
@errant grail I'm glad you're working on this. I'm starting to use the PyGamer/Badge as a quasi-universal front panel for projects and hadn't seen this limitation yet.
The PyBadge doesn't have a headphone jack, so the schematic is different:
PR #2439 does not appear to have fixed this
Adafruit CircuitPython 5.0.0-beta.2-90-g776c9b011 on 2020-01-04; Feather STM32F405 Express with STM32F405RG
>>>
>>> import minimqtt_demo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "minimqtt_demo.py", line 94, in <module>
File "adafruit_minimqtt.py", line 120, in __init__
AttributeError: 'str' object has no attribute 'encode'
>>> string = "ad...
I said way back on 11/29 that I could play 2 mp3s through audiomixer on nRF. I think it was that "test.mp3" (40kBit/s 44.1kHz, stereo) and that I was using i2s audio out.
and of course it was from flash, not SD
samd51's clock speed is way higher than nRF52840 isn't it?
looks like I reformatted the 52840 feather that had that code on it, for working with seesaw and kmk. but that tells me to try next with that same file on samd51
@onyx hinge I recalled testing M0 DAC output drive two years ago for a JP AM radio transmitter project. My notes confirm that distortion increased when the load resistance dropped below 5k-ohms. Wish I had taken some o'scope pictures.
@slender iron I can do https://github.com/adafruit/Adafruit_CircuitPython_HID/pull/43, do a major release, and then do https://github.com/adafruit/Adafruit_Learning_System_Guides/pull/981 if you are ready. I have to update the branch on the guides PR.
@tulip sleet do you need it in soon? I was going to do it this week
no, i was just going to test BLE HID, and noticed it was hanging out. No rush on my part.
@tulip sleet I wanted to test a few of the guide updates before merging
sure, np, I wonder if there is some guide text to update too, in a few places.
but when switching to my 'mixer' branch it doesn't look much worse/different
so that points to "bug" rather than "running out of CPU"
afk for some lunch, back for the voice meeting
@raven canopy I got ya. no need to email
Total discord noob here. Where do I mention or report possible bugs or surprising features of CircuitPython beta releases and latest builds?
@bright aspen Filing an issue on the CircuitPython GitHub repo is the best option.
<@&356864093652516868> Meeting in ~40 minutes. Don't forget to add your Hug Reports and Status Updates to the doc even if you're attending - it's super helpful. Looking forward to seeing everyone there! https://docs.google.com/document/d/1GDZ5iwjekH8D-wLp5atE8N4eL4L6pwmDZcK6oG9YN0A/edit#
@idle owl Thanks!
Thanks for the reminder @idle owl
@bright aspen You're welcome! You can mention things in this channel as well, but filing an issue gives us a place to discuss and track it.
@idle owl I will file an issue unless my mention generates comment that allows me to see I goofed. Mention: AudioOut.paused occasionally gets stuck when playing mp3. Insane laughter is welcomed.
@bright aspen @onyx hinge is working on that and sees problems like you describe
Yes i did see something like that as well. But worked around it rather than fixing it. @bright aspen if it's convenient can you file a github issue so I don't blow it off?
@onyx hinge I found that you did. #2374
I manually tracked whether I had paused the audio
HI,
I would like to request PIDs for the conference badge we are working on and for the previous one (2 total).
AramCon Badge 2019
AramCon Badge 2020
We are planning to upstream later this year.
our circuit python fork https://github.com/urish/circuitpython
the badge repo https://github.com/urish/aramcon-badge
Thanks for all the great work on circuitpython!
Here's a reproducer that uses RawSample. Tested on pygamer:
import time
import audiocore
import audioio
import board
import digitalio
import audiomp3
r = audiocore.RawSample('\x80' * 1024)
s = audioio.AudioOut(board.A0)
s.play(r, loop=True)
time.sleep(.1)
s.pause()
time.sleep(.1)
assert s.playing
assert s.paused
s.resume()
time.sleep(.1)
assert s.playing
assert not s.paused
Many thanks for everybody's work on HID support thus far. Prior to the refactor in https://github.com/adafruit/Adafruit_CircuitPython_BLE/commit/8291ee9b1bd2206cb384483183c30358be40e6c5, I was using code like (simplified):
from adafruit_ble.hid_server import HIDServer
ADVERTISED_NAME = 'Whatever'
hid = HIDServer(ADVERTISED_NAME)
if not hid.connected:
hid.start_advertising()
while not hid.connected:
pass
# ... do something once connected ...
Once I'd paired my...
@lone axle Thank you for adding notes to the doc! I moved your notes up to the top - we read them off alphabetically, so that's how we try to order the list. I wanted to let you know in case you try to view or update anything.
Text only today.
Text only here, too.
text only
@idle owl I probably botched the order, too, then. Sorry!
@errant grail nice work on this graphic, i am mentioning the thermal camera project today in the community section, great work π
@river quest Thank you. It was a step in the process of gaining an understanding of displayio. Still have more to learn...
oh that reminds me I did a thermal camera to pygamer screen demo over the break, I should polish it up and maybe get it added to github.
@onyx hinge yah, please do!
user requested that I add "press button to save to SD card"
yah, that's a good idea
oooh. save to SD. nice!
nothing sophisticated like in that screenshot of @errant grail 's though
ah shucks. Here's a preview of the Thermal Camera repo. Still working on the step-by-step documentation. https://github.com/CedarGroveStudios/Thermal_Camera
I'm using https://www.adafruit.com/product/4469 which one are you using?
You can now add affordable heat-vision to your project and with an Adafruit MLX90640 Thermal Camera Breakout. This sensor contains a 24x32 array of IR thermal sensors. When connected to your ...
I'm using the AMG8833 8x8 FeatherWing
@old smelt Are you participating or lurking today?
I was guessing that from the nice blobby pixels. not that 768 pixels is photo quality
lurking today
No worries! Wanted to know how to enter your name in.
I opted for the low-res for my application thinking that CircuitPython wouldn't be fast enough. However, I was pleased with the speed.
Going to try 128x128 extrapolation just for the fun of it.
Thanks so much for the quick response, and great to hear this is on the radar!
subscribe to the CircuitPython weekly newsletter (comes out Tuesdays)
What do you want from CircuitPython in 2020?
https://blog.adafruit.com/2020/01/01/what-do-you-want-from-circuitpython-in-2020-circuitpython2020-circuitpython/
Over the break...
200+ libraries!
https://github.com/adafruit/Adafruit_CircuitPython_Bundle/blob/master/circuitpython_library_list.md
95 boards!
https://circuitpython.org/downloads
CircuitPython Organization
34 boards for Blinka!
https://circuitpython.org/blinka
CircuitPython Organization
(and we have a counter on the pages there now too! Thanks Melissa and Justin!)
Also, new boards...
CLUE
https://blog.adafruit.com/2019/12/24/adafruit-top-secret-december-24-2019-get-a-clue-adafruit-clue/
FEATHER Bluefruit sense:
https://youtu.be/BbNj23MP_C8
Coming soon ... Preview - FEATHER Bluefruit Sense!
Since we've experimented with adding all sorts of sensors to our new CLUE board (see previous newsletters for more info about CLUE) - we thought we'd try adding the same bevy of sensor goodness to a Feather nRF52840. We remo...
@bmeisels cool! is there a reason you cannot submit a PR for the changes/support for the two boards?
The top product of the decade for Adafruit is CircuitPython powered
https://blog.adafruit.com/2020/01/02/adafruits-top-ten-best-selling-products-of-the-decade-adafruittopten-decadeofadafruit/
CircuitPython Thermal Camera. Here is the final test of the Thermal Camera project. It uses an AMG8833 Thermal Cam Wing and PyGamer with CircuitPython. Features include image/histogram display, alarm, focus, adjustable display range:
https://twitter.com/CedarGroveMakr/status/1213696186764288001
https://youtu.be/IyMZOlKJu3Q
https://github.com/CedarGroveStudios/Thermal_Camera
CircuitPython code running an Adafruit PyGamer. Sensor is the AMG8833 Thermal Camera FeatherWing.
"...a joy to prototype with"
https://twitter.com/hermansm/status/1211774526071029761
Needed quick POC with light- and motion-activated LED-strip: it's a joy to prototype with #circuitpython on well-documented @adafruit boards (https://t.co/5bI18unBwT) https://t.co/XPmM0iJa1r
Serpente "shields"!
https://twitter.com/arturo182/status/1212767737560387584?s=12
PublicDomainDay! Cleveland Museum of Art open access API ... PyPortal!
https://twitter.com/cogliano/status/1213654813411618817
Cambridge Python's first meeting of 2020 will be with Nicholas Tollervey: Developing Developers - Meetup. Tues, Jan 7, 2020:
https://www.meetup.com/CamPUG/events/267171231/
7,000 Thanks!
Thanks to everyone who shares their projects, code, sends in links, and for the joy of coding with Python on hardware, the Python for Microcontrollers newsletter has reached over 7,000 subscribers!
https://www.adafruitdaily.com/category/circuitpython/
DRAFT of the newsletter is here:
https://github.com/adafruit/circuitpython-weekly-newsletter/blob/gh-pages/_drafts/2020-01-07-draft.md
Ships out Tuesday 11am!
https://www.adafruitdaily.com/
Workaround works for me on Feather M4 Express.
Got it: not mp3 related, not new
I don't think I see it in the first play (not looping), but after a few tries in subsequent playing of different playables. I haven't explored this.
cpb beat cpx this week in downloads!
I really wish piwheels had their API working. the blinka/SBC download numbers would be much more accurate.
lurking
lurking
I am just lurking. You can ignore me
Is this still considered an open issue?
It cut off for me too
me too! I thought it was my end
Darn!
Dropped packets?
That was weird. Did I get cut off?
it was going in and out
Anytime Jeff
@sai-ydev I believe it is. I've gotten the MCP23S08 working here but lost momentum trying to work out interrupt handling on the MCP23S17, then got distracted my many shiny objects and life generally.
π ty. And will do.
@jerryneedell it might have been that MICROPY_CPYTHON_COMPAT needs to be overridden, not merely defaulted as it is in the PR. #2439 got merged before you had a chance to test it, which wasn't my intention - I don't have a adafruit_minimqtt setup available and thus didn't test the PR myself, I should have made that more clear in the PR text. I'll submit a new PR with a note that it should not be merged until it is working on your setup.
@jerryneedell it might have been that MICROPY_CPYTHON_COMPAT needs to be overridden, not merely defaulted as it is in the PR. #2439 got merged before you had a chance to test it, which wasn't my intention - I don't have a adafruit_minimqtt setup available and thus didn't test the PR myself, I should have made that more clear in the PR text. I'll submit a new PR with a note that it should not be merged until it is working on your setup.
the easiest way to verify is to do as above -- just...
I don't want to step on your toes but I would like to take a stab at it if you aren't actively working on it.
Congrats @prime flower
thanks anne !
A Boston CPy meetup could be a lot of fun...
"don't tell the PCBs" π π
The sound on a tonewheel Hammond organ is varied through the manipulation of drawbars. A drawbar is a metal slider that controls the volume of a particular sound component, in a similar way to a fader on an audio mixing board. As a drawbar is incrementally pulled out, it increases the volume of its sound. When pushed all the way in, the volume is decreased to zero.[16]
oops I slept through the weekly.
@inland tusk Here's a library that could help index a slide pot to act like a drawbar. Would be easy to create a "click" with a piezo or something. https://github.com/CedarGroveStudios/Range_Slicer
@ivory yew not too late, still going π
but now I have a meeting
I'm text only
@ionic elk Yep - would be great to do one, even if it's a 1-time-thing (though it'd be neat as a recurring meetup)
This is one of those 20 first PewPew M4s
love the orange
it goes well with the yellow pcb
I can
THat's odd
it happens, I just reconnect and it fixes it
@prime flower I've got a couple of people here who would definitely be in by default, and advertising at A2 tends to go a LONG way, if we hosted it here
We could also just go concurrently with the circuit hacking night here at Artisans Asylum makerspace on wednesday
[still getting cutouts in the audio]
Much less frequent cutouts on my end this time
getting most of it
@ionic elk Sure - maybe the others will migrate over
I'll have to figure out what it was.
@prime flower It's a big lab we could just pick a corner and talk circuitpython haha. @tulip sleet could we convince you to make the hike?
Not at all. I'll send you my 'S08 code if you would like it.
@ionic elk sure
But I thought that the lens and Gizmo could make a great Mad Eye Moody prop
brb
@solar whale Do we identify the nodes, I wonder if its possible to prevent collisions via naming, also TTN has a paper on this https://www.thethingsnetwork.org/forum/uploads/default/original/3X/b/3/b3020fe0c5aff85b0ebd9672db9b3dd184118b8f.pdf
@solar whale your note in github is that I can test it without needing the board, right?
@ionic elk yes -- just a quick "sanity check" but I'll be happy to test it.
@solar whale - the device address should be in the frame header payload... Are you giving your nodes unique names. This is interesting
I didn't dig down too much since I assumed (mistakenly?) from your post that it was hardware-requiring code
@prime flower yes -- the node id is in the header. It's more a matter of collisions
without interrupts - the time not listening can become an issue
Yep!
not ideal , but fwiw the chances of 2x lora nodes tx'ing at the same time is relatively slim. still, we need to quantify a packet loss % we deem as reliable for this PR.
@prime flower agreed - that is what I have been trying to quantify.
Let's continue this over in #radio where @main meteor or someone familiar with protocols like this may chime in with thoughts
Yep!
So you can run animations without a strip connected.
it's not JIF, it's GIF
Correct. Or we'd say "jraphics."
it's not jraphic interchange format
"...The debate over how to pronounce GIF, which stands for Graphics Interchange Format, re-emerged this week when Steve Wilhite, the inventor of the widely used Web illustration, declared it should be pronounced βjif,β like the brand of peanut butter, rather than with a hard G sound"
Giraffes everywhere rejoiced.
That's why I corrected myself. π
(I want to know what boat anchor of a 3d printer @pastel panther picked up)
Yes, he invented it, but he's still wrong.
@onyx hinge it's a CR10S V2. At this point I'm unsure if it's the printer or me; Good money is on me being a total newb and not knowing what is reasonable to expect.
@pastel panther I hope you are happier with it soon
Hi there :)
I think finally this puppy is ready for the initial commit and review.
The commit adds the NXP i.MX RT10XX series port, so far supporting the RT1011 and RT1062 chips but the whole family is very similar so it's easy to expand.
Support status:
- AnalogIn - seems to work, tested it on the RT1011
- I2C - seems to work, I managed to scan and talk to a sensor
- SPI - should work in theory, haven't quite tested it enough yet
- UART - seems to work, supports the new timeout ...
I have to drop off. Have a great week, all!
Hehe, those rocket reactions on github feel sarcastic cause I took so long to do this π
Hi @ladyada,
We have not completed development of this years firmware and the hardware is not finalized. I think it would be better for our port to be more stable before we start upstreaming.
Result of in-the-weeds discussion: make this specific to display and audio and it may be mergeable.
https://github.com/Microsoft/uf2/blob/master/cf2.md <-- docs for that
https://github.com/adafruit/circuitpython/pull/2452/files#diff-76c65d2153c8bf69d96a7ed09c92179eR38-R67 <-- this is the PR with the function that gets the config values
The problem I had is that I have the same board with different displays sourced from different places, and they have different offsets
(I think he's talking to someone IRL)
new world record! π gratz π
oh jeeze my goof recorded for all eternity
what about for the 2019 board definition? we like to give the USB PID as an incentive for people to open PR's for their hardware definitions ;)
Thanks everyone!! It's going to be another great year, simply because you're all here.
Thanks all
Thanks
for 2020 I want more in the weeds π
I like weeds, it's a dog thing
after the weeds was a thing for while too π¦
@onyx hinge Ok, so there is an issue which I haven't figured out with nina-fw's SNTP. It affects every piece of code which uses Adafruit_CircuitPython_NTP.
I wouldn't mind a few more organized times to just chat about problems, it's something I miss from working in an office
This try/except fires around 3 times (~15sec) https://github.com/adafruit/Adafruit_CircuitPython_NTP/blob/master/examples/ntp_simpletest.py#L35
let me toss that on my pyportal, it should reproduce the issue right?
Absolutely should repro
https://github.com/adafruit/nina-fw/blob/master/arduino/libraries/WiFi/src/WiFi.cpp#L578 < in nina-fw land, this is the call to SNTP
wow this screen is so big compared to pygamer
is it a titano?
no just the original
Have a good week -- dog is demanding a walk π
walkies... the proper term is walkies
@indigo wedge thanks for the PR! I'll try and do a first pass today
hm is my library out of date ? AttributeError: 'NTP' object has no attribute 'valid_time'
@onyx hinge try updating, should be fine, works on my machine (TM)
I'm curious if the firmware is spending time polling the server (why would it be...the wifi conn is established prior to SNTP being set) or if it's a predefined NTP timeout
OverflowError: timestamp out of range for platform time_t
CircuitPython counts time from a different starting point
trying again with beta2
I'm on Beta2, all 5.0 libs
so it looks like the ESP will return a current time of "0" for awhile after startup
Right, that's here
the use of 946684800 is what I'm curious about...
TZ=UTC date --date=@946684800
Sat Jan 1 00:00:00 UTC 2000
seems like a pretty special date to me
π
Ok, so it's waiting for it to increase past that timestamp since that would be the earliest date possible?
It might start counting at zero seconds from bootup, but then when it gets back an NTP packet it updates to "now", which is always after 2000?
yeah, I wonder if there's a way to handle this other than polling it
I suspect not
it looks like it sends an NTP packet "shortly after" getting on the network. and here it reliably gets a packet back "shortly after that"
it has to do things like DNS-resolve the NTP server too
here it's >10s from starting the DHCP process to getting the NTP packet back, but I'm not sure how much of that is after is_connected starts being True
21:15:25.047475 ARP, Request who-has 10.0.2.76 tell 10.0.3.226, length 46
21:15:25.047504 ARP, Reply 10.0.2.76 is-at 94:10:3e:98:c6:72, length 28
21:15:25.054753 IP 10.0.3.226.49153 > 66.85.78.80.123: NTPv4, Client, length 48
21:15:25.063297 IP 66.85.78.80.123 > 10.0.3.226.49153: NTPv4, Server, length 48
``` I think that it became connected right after that first ARP request above, then a 6s pause, and then it starts doing the NTP
because of my network configuration, DNS packets are not visible here
The 6s pause is due to "things like DNS-resolve"'ing the server, right?
21:18:29.373867 ARP, Reply 10.0.3.226 is-at a4:cf:12:55:f9:14, length 46
21:18:33.469910 IP 10.0.3.226.40995 > 10.0.2.59.53: 3376+ A? 0.pool.ntp.org. (32)
21:18:33.594753 IP 10.0.2.59.53 > 10.0.3.226.40995: 3376 4/9/0 A 138.68.46.177, A 172.98.193.44, A 206.55.191.142, A 192.111.144.114 (246)
21:18:33.879531 ARP, Request who-has 10.0.2.76 tell 10.0.3.226, length 28
21:18:33.879555 ARP, Reply 10.0.2.76 is-at 94:10:3e:98:c6:72, length 28
21:18:33.881117 IP 10.0.3.226.49153 > 138.68.46.177.123: NTPv4, Client, length 48
21:18:33.920302 IP 138.68.46.177.123 > 10.0.3.226.49153: NTPv4, Server, length 48
``` here's a more complete trace
All checks have passed
Well, damn :D
so for me it's pretty fast from starting DNS activity to having an NTP time received, but there's a multi second delay before it starts the process with the first DNS packet
I for one welcome our new iMX overlords :)
Awesome work @arturo182! This is gonna be sweet
/** According to the RFC, this shall be a random delay
* between 1 and 5 minutes (in milliseconds) to prevent load peaks.
* This can be defined to a random generation function,
* which must return the delay in milliseconds as u32_t.
* Turned off by default.
*/
#if !defined SNTP_STARTUP_DELAY || defined __DOXYGEN__
#ifdef LWIP_RAND
#define SNTP_STARTUP_DELAY 1
#else
#define SNTP_STARTUP_DELAY 0
#endif
#endif
(I think esp incorporates lwip but we probably don't know exactly what their source says)
@pastel panther can confirm, is sweet
but .. it's supposed to wait a random length of time after start for the first (S)NTP poll, so it may just be doing its job @prime flower
also 5000 is not 5 minutes in milliseconds, but who is counting π
we can push the 2019 board definition but a change in circuitpython 5 breaks I2C for us.
right now our fork handles this by reverting this change but i don't think that would be suitable for upstream. We are thinking of a better solution which would work with upstream but it is still WIP.
If you prefer to give us a PID when the PR is ready we have no problem to wait.
More details about the issue:
We don't have pullups on the board and https://github.com/adafruit/circuitpython/commi...
RFC states it could be 1<delay_mins<5, I wonder if decreasing the delay would be OK if its within the params. I won't fiddle with it past there, the NTP needs to be set once in user-code and having a ~10-15sec delay on bootup once isn't terrible
I'm not sure it's the full explanation, either, because it looks like the DNS query would happen, then the random delay, then the NTP query
@onyx hinge what networking setup are you running to obtain those frame captures - wireshark, something else?
@prime flower just tcpdump running on my openwrt router
tcpdump -n -i br-lan 'ether host a4:cf:12:55:f9:14'
(asking bc I'm going to be setting up a router soon and that's super useful for me)
only problem is I have to reset it from time to time or my internet speed goes down by 90% π¦ π¦
hiya what do you mean by 'breaks' - it should throw an exception, does it not throw an exception?
the hardware is Linksys WRT1900AC which was a cast-off from a friend but still pretty good spec
but yeah I think you are going to just have to poll, as there's a deliberate random delay (and maybe some other less deliberate delays on top of that, it's not clear)
going afk
thanks for your help!
It does but this means that the board doesn't work with many addons which don't have pullups.
it shouldn't - pullups are required for I2C to work!
hey @idle owl this build is failing due to a supposedly missing module docstring, which seems to be coming from adafruit_circuitpython_thermalprinter/__init__.py but I'm not sure exactly how to fix it.
Do you know where this missing docstring is supposed to go? Maybe outside of the __init__ method ?
Of course. I had a discussion on the circuitpython discord channel with @dhalbert on the topic. This used to work for us on circuitpython 4 as the underlying nordic driver (twim) uses internal weak pullups. Apparently https://github.com/adafruit/circuitpython/issues/2253 required checking for strong external pullups.
@pastel panther I would try adding one to the beginning of the __init__.py I guess. Is that not fixing it? Could also be here https://github.com/adafruit/Adafruit_CircuitPython_Thermal_Printer/blob/9dd720585e5ba12f6a9b27b967cfbcea015df64b/adafruit_thermal_printer/thermal_printer.py#L125 maybe? I'm guessing though.
@idle owl Hadn't tried it yet. I'll give it a go
@pastel panther Might be because there's extra whatnot in __init__.py that it requires a top level docstring.
@idle owl Ya, that's what I was thinking but it likes that even less π€ (may have done it wrong)
bleh. hmm.
This seems to suggest that we're on the right track
https://realpython.com/documenting-python-code/#docstring-types
Maybe the format is wrong π€·ββοΈ
I'll look into it more when I'm back
@jerryneedell I will need more information about your setup to replicate this error - import minimqtt_demo does not work with the base library package. Are you working from a guide? If you could provide more information about your exact setup so I can replicate it, that would be ideal.
hmm @dhalbert should we allow internal weak pulls if its allowed - samd21/51 does not have that ability (but avr allows it in arduino)?
A continuation of #2439, which got merged prematurely. Please do not merge until @jerryneedell has had a chance to review. Should resolve #2433 when finished.
If you give https://github.com/adafruit/circuitpython/pull/2457 a spin, it will hopefully resolve your issue.
@slender iron I hit a revert button on a PR and now github is DREADFULLY confused. Is it possible to delete the branches that github makes? I don't see an option for it anywhere
@ionic elk git pull and delete it from command line maybe? I don't see anything obvious on GitHub either.
It's a branch that was made on the actual circuitpython repo, not my fork, is the thing.
hence my nervousness mucking with it
it's revert-2439-stm32-cpython-compat
Currently we have some unnecessary bloat of the BUILD flags that are shared across all ports, notably that there are differently named settings to turn things off as well as on:
- CIRCUITPY_FULL_BUILD (everything on the list)
- CIRCUITPY_SMALL_BUILD (just turns off full build only items)
- CIRCUITPY_DEFAULT_BUILD (everything not in full build)
- CIRCUITPY_MINIMAL_BUILD (turns off default build items)
- CIRCUITPY_ALWAYS_BUILD (items with no HAL component that always get built)
It'd b...
still no joy
Press any key to enter the REPL. Use CTRL-D to reload.
Adafruit CircuitPython 5.0.0-beta.2-91-gb778aee21 on 2020-01-06; Feather STM32F405 Express with STM32F405RG
>>> import minimqtt_demo
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "minimqtt_demo.py", line 94, in <module>
File "adafruit_minimqtt.py", line 120, in __init__
AttributeError: 'str' object has no attribute 'encode'
>>> string = "test"
>>> dir(string)
['count', 'ends...
This will require further investigation then. I was hoping the build order would put the board settings and overrides last. I'll need to dig deeper on how things are ordered.
Can you provide a zip of this minimqtt_demo.py file you're using so I can test it?
yes but you don't need it to test -- just do the dir(string) to see if encode is there.
will post the code in a sec.
yes but you don't need it to test -- just do the dir(string) to see if encode is there.
will post the code in a sec.
In that case, I'll just need a full list of whatever other includes I need to replicate your result.
yes but you don't need it to test -- just do the dir(string) to see if encode is there.
will post the code in a sec.In that case, I'll just need a full list of whatever other includes I need to replicate your result.
none - do a clean boot
string = "test"
dir(string)
I am extremely pumped for this. I'll try and punch in some time testing this week. Would love to touch base with you on the neopixel code at some point, I've got some revamps I still need to make to that.
@prime flower @onyx hinge On tcpdump you may wish to set the snaplan -s too if you want to capture all of each packet. Obviously increases load and any storage if you are -w file'ing.
Ah, sorry! I'm actually quite bad at python. All C over here :)
@onyx hinge What's the interest in ntp here and why is it problematic if it has a laid-back startup wrt to polling?
Shouldn't need anything else. I'll ping you once I've got the attribute back in there and we'll do another full hardware test.
Ah, sorry! I'm actually quite bad at python. All C over here :)
no problem! it's a simple check -- also if you have another board - any express board with full build -- you can do the same thing to compare the output -- that was what I meant by showing the grandcentral result.
@prime flower My knowledge here is from 15 years ago but if you want an instant setting of time at boot time from ntp for a device that has no RTC clock then isn't a one-off ntpdate the typical solution followed by starting up the daemon as needed? ntpdate won't have issues with big time stepping too. Ah, reading more into this thread it looks like you are not using a bog standard ntp distribution here.
Shouldn't need anything else. I'll ping you once I've got the attribute back in there and we'll do another full hardware test.
it worked ok when I changed it in py/circuitpy_mpconfigport.h
#define MICROPY_CPYTHON_COMPAT (CIRCUITPY_FULL_BUILD)
to
#define MICROPY_CPYTHON_COMPAT 1
@idle owl I added a docstring to the top of __init__.py, and it works. Really odd that it wasn't working for you @pastel panther
@trim elm Good to hear.
@idle owl Do you want me to add a license to __init__.py?
Ok
Right, the trick is that's overriding the port level define, rather than the other way around. So I'll need to add some logic there to get around that.
@idle owl It passed Actions, can you review the docstring I put in __init__.py? Thanks
@ionic elk it's ok to have a spare branch around. what do you mean by confused?
@trim elm It says checks have not yet completed. Please ping me once it passes.
@idle owl Ok. I saw that the push test had completed and assumed that the pr test would be completed soon after, but it looks like it's still queued
Sure, we can set up a chat this week, right now it's midnight here π
kk, thanks for pushing everything! I'm excited!
my pleasure and embarrassment that it took so long π
no worries. glad you feel good about it
now i can go back the HW as we work on merging the SW π
π
I was surprised how quite easy to was to get uf2 working with tinyusb
@prime flower @onyx hinge Jan 1, 2000 is special to CP/SAMD at least https://circuitpython.readthedocs.io/en/latest/shared-bindings/time/__init__.html
Not sure why WiFi.cpp follows that. NTP time should technically be relative to Jan 1, 1900.
Does anyone know if UDP is fully implemented in ESP32SPI? Might be handy to test an alternate path for NTP etc. I see some code there, not sure if it's all there and tested.
and i'm excited about the potential of having one bootloader for many many chips
ya, me too! thanks for doing it that way
like, tinyusb has stm support so we just implement flash api there and boom, uf2 for stm
@idle owl It finished running
@trim elm Merged.
@idle owl Thank you
@ionic elk reading your meow:bit email: you don't need to move the program start. we could squeeze the internal flash between it and the bootloader
update for gcc arm on homebrew: https://github.com/Homebrew/homebrew-cask/pull/75184
Thanks @dunkmann00! I've submitted a PR to update the version: https://github.com/Homebrew/homebrew-cask/pull/75184
and now it's merged. π
The nrf I2C drivers turn on internal 13K pullups (typical, range is 11k-16k). We don't turn these off, but they are not on when we first test for pullups , using GPIO operations.
The code is testing for powered pullups. The original problem was that an Arduino Nano 33 BLE has uses a set of 4.7K pullups for all of its on-board peripherals. The peripherals can be switched off, and when they are, the pullups are unpowered. So that puts the equivalent of a 9.4k resistor between SCL and SDA in ...
@crimson ferry UDP looks like it half works judging by https://forums.adafruit.com/viewtopic.php?f=60&t=159873
@simple pulsar thanks
hey @slender iron looks like @ruby atlas fixed the actions workflow paths here
https://github.com/adafruit/Adafruit_CircuitPython_Pypixelbuf/pull/3
can I merge it?
I think I'm the only python code contributor to that repo.
@pastel panther totally! I'm behind on emails and reviews
thanks!
You peaked my interest when you said the T4 would be interesting when you do.
I'm also very interested in there being a way to send and receive DMX-512 data with CircuitPython.
Preview of the first "Python for microcontrollersβ newsletter for 2020! Sign up for some great content, community projects, sneak peeks of hardware, and more over on the βPython for microcontrollersβ newsletter! https://www.adafruitdaily.com
Preview of the first "Python for microcontrollersβ newsletter for 2020! Sign up for some great content, community projects, sneak peeks of hardware, and more over on the βPython for microcontrollersβ newsletter! https://www.adafruitdaily.com
#circuitpython #python #mic...
ooof - i suppose we should fix the hang before we disable the pullup check. dan, what do you think we should do?
This hanging problem is not confined to nRF; it also shows up in atmel, and we added the pullup checks originally to the atmel port to catch it. https://github.com/adafruit/circuitpython/pull/719.
We could add a conditional compilation flag that suppresses the pull-up check on nrf, and @bmeisels, you could turn it on for the current board. Is that enough of a solution?
This looks like a great start! Thank you so much for it!
Two questions and then we should be ready to merge.
mp_raise_NotImplementedError(translate("AnalogOut functionality not supported"));
It looks like this may have been autogened by a vendor tool. Is there a copyright that needs to go along with it?
This was copied from nrf, I can fix but we should fix there as well for consistency: https://github.com/adafruit/circuitpython/blob/master/ports/nrf/common-hal/analogio/AnalogOut.c#L37
It's taken from one of the examples in the SDK, licensed BSD-3-Clause, should I note that in the file somehow?
@dhalbert sure that would be great.
I have prepared a branch with the board definition. Once this issue is solved I will rebase and open a PR.
Sure! We must have missed it there.
Yes please. That way we'll know where to reference to compare later too. Thanks!
It's interesting to see that Serpente is so high when sorting by Downloads π https://circuitpython.org/downloads
CircuitPython Organization
it's really popular
Somebody can help me out with a code for python with ws2811 leds on raspberry?
@stuck elbow but I only sold like 200,i thought adafruit boards would have thousands
no, they don't really sell as many of them as it seems
it's still just a hobbyist market
I think I figured out how to use the whole 128KB RAM, need to test with HW later today :)
@crimson ferry Not sure about the state of UDP in ESP32SPI
@prime flower I suspect espressif has a 'bug' where they won't do the first SNTP until after the minimum interval elapses from startup https://github.com/espressif/esp-idf/blob/826b9f63805ab9b955cd2129673117080c6d29ba/components/lwip/apps/sntp/sntp.c#L100
Could make some sense... enforces minimum interval across restarts
RFC is pretty explicit: "A client MUST NOT under any conditions use a poll interval less than 15 seconds."
@arturo182 Is there any way to run this on a Teensy 4.0 (with added hardware, e.g. SPI flash)? I can help out with testing in my free time.
I wanted to ask the same question, I have a purple teensy 4.0 just waiting for use
@onyx hinge should be relatively easy I think
needs a board file and a linker file for non-express-ish use I suppose
Hi folks... http://ntoll.org/article/circuitpython-2020 <- a bit late, I know, but new year was hectic...! π HNY to all.
Homepage of Nicholas H.Tollervey
-> AFK to give a talk in Cambridge. π
@plucky flint Not late at all, thanks for passing it on. Have a lovely time!
@idle owl π€
@onyx hinge all imx rt boards have to have qspi flash because it stores the code externally
ah I read too much into what gragib said about needing to add SPI flash
it is only 2mb though. artur's is 8 mb
Flash is accessed by FlexSPI, which maps the entire Flash into the M7's memory. Any location in the Flash chip may be read as if it were ordinary memory. Caching is used, so often there is little performance loss. But a cache miss does require many clock cycles to fill a cache row from the Flash chip. Normally only large tables, startup code, and other resources which are not speed critical should be accessed from the Flash memory. String constants may be placed only in the flash using F("string") syntax.
code and CIRCUITPY in the same flash device seems more like non-express configuration to me
ya, in the port its marked "internal"
but it has the size of an express board since it is an external chip
what kind of split would make sense, 1/1? 1MB code for circuitpython core should be more than ample, you'd think.
ya, that's what the current ones are, 1/7
This PR changes the pin search algorithm to allow for the exclusion of MOSI or MISO on the SPI bus. Resolves #2309.
Tested for crashes and initializations, but unfortunately I don't have any SPI devices on hand with libraries that allow the exclusion of either pin, so that would be a beneficial extra test.
@slender iron could I talk to you about ble evt handlers and their lifetimes across vm instantiations? I ran into a problem last night trying to add an evt handler before the vm was set up (to catch cccd changes). The linked list of evt handlers is allocated from the heap. I could special-case my own problem in some way, but I'm worried about the CircuitPython service event handlers living between vm's.
e.g. the long-lived CircuitPython service connection
ya, I'm around
i'll start a call
@pbricmont Thanks for the link! Are the displays all on the same bus or are they different? Would you be interested in debugging if we got you a JLinkEDU?
The soft device must only support up to 64 bytes here: https://github.com/adafruit/circuitpython/blob/master/ports/nrf/common-hal/os/__init__.c#L70
We should split it up as needed.
Thanks! Let me know when I should take another look.
if (pixels_pattern_heap_size < pattern_size) {
Please make sure that this is reset to NULL when the heap is reset otherwise it'll break after a reload.
Thank you! Why is PewPew also being update?
Can this be done with UART at the lowest level? Do we just need a Python library for it?
What is the least expensive testing setup?
@solar whale have you seen any usb issue on raspbian buster? https://forums.adafruit.com/viewtopic.php?f=60&t=160482
I don't use the I often but I have not noticed a problem -- I'll try it a few times.
just tried a Grand-central -- came right up and ejected right away
hrm, not sure what their issue is then
just tried a feather_m4_express -- no problems -- wrote a file to it as well
hrm
Please include the actual license text. (One of the three clauses is that it must be included.) A link to the example would be awesome as well.
Do I put the BSD license under the MIT license? The file itself only has this header:
/*
* Copyright 2019 NXP
* All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
The example is inside an SDK .tar.gz so can't really link.
Let me know how to proceed :D
Ya, that is enough for the license. A link to the SDK would be helpful too. Thanks!
@slender iron @solar whale the only thing I thought of when I read that, was whether or not they had tried an unmount via the CLI.....ie, is something going on with the UI that's hanging and not actually the USB/filesystem subsystems of the kernel? Not sure how much you wanted to dive down that rabbit hole...so feel free to ignore my thought train π
There are no official download links, there's a web tool called "MCUXpresso SDK Builder" that allows you to generate a custom SDK package (A bit like Atmel Start but less customization).
@sly falcon interesting -- if I do a CLI umount, it unmouts just fine, but if I then unplug it the GUI does complain about it not being ejected -- umount != eject -- but it still works ok.
oh interesting....I hadn't thought about the UI not noticing that the filesystem had been unmounted
but the eject icon disappears when you umount π
on Cinnamon on my various Fedora workstations, if I do an unmount of the fs, the UI clears the mount in the GUI eject dealy in the toolbar
A little expedient modification of the snap fit case
it lets me access the debug header
haha...well....WINNING! π₯³
@slender iron darn i wanted to press it π
do you have pics of your boards for circuitpython.org?
kk, awesome
meeting up with a pro photo friend to take photos of some other boards for Tindie π
excellent! I'm sure adafruit would give you photos they take too
yes once i ship the boards to them π
π
@tulip sleet can you finish this review? https://github.com/adafruit/circuitpython/pull/2367
I'll do beta.3 shortly
after I get a frozen update in
testing it now
Looks good - sorry for the delay!
HID's API has changed to take in devices explicitly so that both
USB and BLE work.
{:2d} works for years like 2020 but looks odd. Is it intentional? I'd expect either {:d} or {:4d} probably the former.
@kevinjwalters That is just in the test program, and it appears to not match the output :man_shrugging: anyway, which says 2019. Maybe the test program was updated and an old version was pasted in the original post.
@stuck elbow is your hid output report PR ready?
@slender iron no, sorry, I didn't have time to work on it, and it somehow mysteriously stopped working when I tested it last week with samd51, I suspect it only works on samd21, because that's what I was testing before, but I didn't have the time to check
@slender iron I mean the code should be fine, it's probably just tinyusb that doesn't work on samd51 with this
either way, we should probably wait with merging it
@stuck elbow im very thankfull that you helped me out today i was wondering do you know the code to fade in to 255, 41, 147 ?
@slender iron holidays ended, work started :(
ya, understandable
@coral marsh from 0, 0, 0?
from 0, 0, 255
for step in range(10):
pixels[0] = int((0 * (9 - step) + 255 * step) / 10), int((0 * (9 - step) + 41 * step) / 10), int((255 * (9 - step) + 147 * step) / 10)
general formula is int((start * (number_of_steps - 1 - step) + end * step) / number_of_steps) for each component
@stuck elbow this is what i got so far the end must be the warm white and iff possible all off with keyboardninterupt
i even want a button to start the script as you turn the xbox wall on ant iff possible push it again or another button to play the opposite in reverse
@slender iron Where is usb_hid coming from? CircuitPython?
@idle owl it's in C built into the firmware
Ok.
π
and its been in the firmware a while. only the library is changing
nice post @gilded cradle ! Its amazing to me that you just started in the community a year ago. π
Thanks @slender iron βΊοΈ
@slender iron Merged your PR.
ok, will update the guides
@slender iron Did you get this one: https://forums.adafruit.com/viewtopic.php?f=60&t=160679
That's fine, I was going to reply thanking them for their input. But wanted to make sure you had it on your radar.
Ok
Hi y'all. I created a pull request for the PyPortal library to orient a mix of portrait and landscape images correctly from multiple fetch()'s. Feedback is welcome. A nice demo is included in the comments you can try it out. https://github.com/adafruit/Adafruit_CircuitPython_PyPortal/pull/60
Does anyone have experience of CPB to CPB bluetooth range? 5m looks like max for me. Got them on their sides. One is LiPo powered.
do FDPLL0 and DPLL0 refer to the same pll?
under clock source selection it's DPLL0 and under PCHCTRLm it's FDPLL0
Use BLE_GATT_ATT_MTU_DEFAULT instead here.
This looks good! One tiny change and one request for clarification for the code reader.
Could you write a comment here or in the .h file about why outgoing[2] is of length 2? Are you just swapping back and forth between the buffers (one pending, one in progress)? Could that limit actually be increased? I'm not sure.
@slender iron Potentially dumb question. I'm looking at the CPB and I don't see any obvious pads to attach the J-Link. Any advice? I still need to ransack the lab to find it, but I'm trying to figure out next steps....
Oh!!! Got it. I was looking at one in a case and the pads are under the mounting hole.
Thanks!
Hey @tannewt ,
A Python library would be the easiest way to do it. But it might need doing at the hardware level of the SAMD21/51. I read in the datasheet that these chips should support RS485 at the hardware level.
I know only one python library that does this well at the moment. https://github.com/mathertel/DMXSerial
At the heart of DMX:
- serial RS485
- 250 kbit/s
- 513 byte transactions (frames)
[Element 14 DMX Explained](https://www.element14.com/community/groups/ope...
After extensive reading from the adafruit forums from 2018 ... please ignore my comments about direct hardware support.
The SAMD51 has some support for RS485 but external hardware is still required. The SAMD21 has no built in support.
The only way is to use a transceiver module (MAX3485 is most popular) and normal UART protocols with a packet decoding layer (presumably this is what everyone in this issue is looking for)...
Based on previous mention of the SAMD51 having this hardware feature too I thought I'd try a nearby Feather M4 Express. I put 4.1.2 on that and I've noticed that works ok with numbers larger than 64.
It does blow up with -1 and 30000. I hunted around the upper magic value and it doesn't look like a fixed value but perhaps one related to memory. It goes into hard fault handler and says The CircuitPython stack was corrupted because the heap was too small. I doubt many people ar...
hi ! Please take this review with a grain of salt as I'm new(ish) at reviewing PRs for Adafruit. But, I think some improvements can be made.
In the past, @tannewt has asked me to {}-ify even single statement conditionals
It's tempting to suggest structuring the search like this:
for(SCK alternatives) {
if(mosi != mp_const_none) search for mosi and continue outer loop if unsuccessful;
if(miso != mp_const_none) search for miso and continue outer loop if unsuccessful;
}
which eliminates the duplicated code and removes a level of loop nesting. However, as this is not performance critical code, doing it what you felt was the most straightforward way possible also has merit.
I hear ya but it pains me for these one liners. @tannewt are you hard and fast on this one?
@jepler Unfortunately, this approach does not function properly in the both-enabled case, as it excludes an edge case where there is a second SPI peripheral on the MOSI pin that is the only viable match to MISO. The only way to properly find that is to have the loops nested.
I think I could still fit it all in one nested loop, but it'd take so many flags and crazy conditionals that I'm not convinced the marginal code lines reduction would be worth the cost in readability.
I am hard and fast on this, because of stuff like: https://dwheeler.com/essays/apple-goto-fail.html. In the long run we will clang-format the code anyway.
Related to #2447, this fixes hard faults when large buffer sizes such as 30,000 or erroneous buffer sizes such as -1 were passed to os.urandom().
Testing performed: on metro m4 express, os.urandom(-1), os.urandom(100000).
Well, without a goto: anyway. Dan's link above reminded me. I try not to use them myself.
This also fixes #2447 on nRF by calling into the softdevice for random bytes as many times as necessary.
@tannewt least expensive could be some 'amazon dmx led spot' (you never know if they are conform to the specifications...) -
the better setup: a scope or digital-logger/analyzer thing... ;-)
or just some already 'proven to work' arduino library..
all the implementation can be tested in the 3.3V / 5V TTL levels...
as @wallarug has written - to get to the actuall DMX512 HW-Layer ('just' RS485) some differential driver /receiver is needed..
here would be the challenge to check and find on...
@onyx hinge heya are you comfy testing the hardware side of the SPI simplex PR?
e.g. with scope/logic
Here's a goto version that covers all edge cases, I think:
https://gist.github.com/hierophect/8d304e7d44c9816e294874529937019d
As I suspected, it only saves about 15 lines of code, and I think it's harder to decipher what's going on. I could be missing an easier opportunity though.
@meager fog I would need a suggestion of a "MISO" only device, I think
other than that, yeah
that's true
if so ill remove it from my todo list π
okay, so : pick a set of pins, verify that all 3 of: duplex, miso-only, and mosi-only work as expected.
yep
I didn't make headway on the audiomixer stuff yet, yesterday was working on a non-adafruit project and today I got distracted by urandom so far and now this π
np
but I'm learning heaps about pi I/O from that so it might come in handy if you need a hand on blinka someday
i do need a userspace-for-spi at some point
because spidev does not compile on constrained platforms π¦
we have pure python ioctl for i2c, but not spi
or do you mean bit-banging
accessing the bcm28xx SPI registers directly via mmio
and it's GPL so you wouldn't want to directly pull it into permissively licensed stuff like blinka
oh juk
yeah we prefer not to do that, because the offsets change with ever new pi
thus, we use python and spidev
we tend to write large buffers over spi at a time
so its ok
which blinka device is so resource constrained it doesn't have spidev?
oh yeah are those the tiny mips ones?
yeppres
spidev is all ioctls, should be doable direct from python without a compiled module. I can look into it someday, did that for linuxcnc too
yah in the future, its not a huge rush
kk
as mentioned, we have it for i2c
and we only bumped into the one board that doesnt support it
the nice thing is its a very simple interface for SPI
ok, stm32 feather is on the workbench π₯½
ok in a vidmeetin π
ill add ya to a new issue just so we have it down
ok made https://github.com/adafruit/Adafruit_Python_PureIO/issues/11 its not a todo yet - its just like, a note to remind us
@gilded cradle FYI ^
Excellent. Thanks @onyx hinge
eek, goto a label inside a loop? The compiler may have to de-optimize things to allow this to even work. Interesting coding exercise, but your old code is ok by me. :)
@dhalbert lol it was really more an exercise in convincing myself it was a bad idea to rework ;)
UART has the same issue show up so I think it's a good problem to have thought hard about.
Done. Please take another look.
Yup, {} is the way to go. I try to be relaxed on style because I intend to turn clang-format on at some point. {} around single statements is actually one of my main reasons to do it. Unfortunately, clang-format can't actually do it. clang-tidy can but it requires a bit more tooling.
Thanks for the info. To summarize: I don't think there is any core work needed for this. On the drivers side we'd likely need a community library for the external transmitter IC and then a library for the DMX protocol on top of that.
I don't have any experience with DMX so someone else will be a better person to do it. I'm happy to consult on the CircuitPython side of things but won't be picking this up directly myself.
{} here please since we're trying to be better about it.
I'd add a neopixel_write_reset and add it here: https://github.com/adafruit/circuitpython/blob/master/main.c#L190
<@&356864093652516868> I'm going to grab lunch and groceries. Will do Beta 3 once I'm back so please get everything in that you want to go out.
Quick, Scott is away, merge everything!
@slender iron the stm32f405 will still not have the MICROPY_CPYTHON_COMPAT enabled but I don't think it's worth holding up beta3 for.
AFIK this only impacts using the miniMQTT library at this time.
@indigo wedge Imma smash-merge in support for my 1984 maytag washer 
that's a reference that just went way over my head π
not a reference, just nonsense π
pretty sure you could run a laundromat full of 1984 maytag washing machines with a trinket m0, if they're even electric. Pretty sure they ran on coal back then
not enough io π ββοΈ
Fixed the submodule and addressed this review.
I added the neopixel_write_reset to the port only, as this is only for nrf. I called it from reset_port().
I bought a Maytag washer in 1979 -- pretty sure it did not have have a webserver built in....
The board seems to be resetting on me after this change - hold tight for more testing.
@solar whale "pretty sure" π
@solar whale is there a PR for it?
@ionic elk is working on it , but It is not ready yet.
cool cool. thanks
I put a question about exception handling and recovery for adafruit_ble transient connectivity issues in https://forums.adafruit.com/viewtopic.php?f=60&t=160711 as I thought the answer might benefit others.
@simple pulsar: @idle owl has an example of a lot of exception catching for BLE; I'm looking for it right now.
@tulip sleet @simple pulsar https://learn.adafruit.com/circuit-playground-bluefruit-neopixel-animation-and-color-remote-control/circuitpython-setup-and-code ?
@idle owl thanks!
@simple pulsar I have ideas for writing a simple "EZ BLE" library that will handle all this dropping and reconnecting automatically; just haven't had time yet.
@simple pulsar see the send_packet() routine in that link
Attemping to run TFT gizmo examples on Circuit Playground Express. displayio ImportError happens with both CircuitPython 4.1.2 and 5.0.0-beta2.
ah, she beat me to it π
Automated website update for release 5.0.0-beta.3 by Blinka.
New boards:
- clue_nrf52840_express
- feather_mimxrt1062
- imxrt1010_evk
- feather_mimxrt1011
This PR revisits some of the differences that appeared between the busio modules as they were implemented and brings them closer together in terms of style and readability. Also reorganizes the fix for an issue with I2C that would occur on soft reboot - the code is now closer to comparable APIs like Arduino and MBED. Resolves #2172.
Aha! That's what I was missing. It's working for me now, thanks much!
Currently most native objects don't use m_new_obj_with_finaliser(), which marks the object as having __del__() to call when the object is gc'd. Only network.socket and audiobusio.I2SOut currently do this, and I'm adding another use in _bleio.
audiobusio.I2SOut.__del__() just called its deinit(), which seems like a good idea. We could do the same for other objects with deinit(), like busio.*, etc. This would free up pins when their holding objects were gc'd.
I'm not sur...
Did https://github.com/adafruit/circuitpython/issues/2341 get done?
@idle owl @tulip sleet Thanks, will have a look in an hour or two.
@makermelissa @arturo182 we'll need content for downloads page :)
@slender iron I know I have some PRs baking, but let's let them go for beta3 rather than rushing to accept any of them.
I missed it anyway I guess
furiously scrolls to the present
yup, π
thanks for beta3!
lots to go in beta.4 π
Can anyone help me find docs for CircuitPython builtin libraries?
I have very low expectation of finding help() via REPL
Oh, I can re-use those low expectations for the very easy to find documentation I was looking for https://circuitpython.readthedocs.io/en/latest/shared-bindings/usb_hid/__init__.html
I'm rehabbing an old joystick with obsolete interfaces, and I need to take some liberties with the usb_hid device provided by CircuitPython. I'm not sure how to define usb_hid device parameters in code, and I need to see some examples or documentation.
OK. Thanks. That explains a lot.
it is tricky with USB because the USB descriptor is used by CircuitPython itself
with BLE the HID descriptor is separated
the external IC is only 'levelshifting' so no lib there..
maybe we need some special edge cases implemented in the UART Core...
in total you are right - best is if someone with deep detail understanding of the DMX-Protocoll finds the time to implement it -and then we will know where the limits are..
i think i could do it - but i don't know if and when i find spare time for it - so if there is someone else willing i could support/help with some protocoll information and testing with some ha...
@onyx hinge Feel free to merge the PR you approved. Under normal circumstances I would also ask that you release the lib, but there's about to be a release sweep so you can hold off on that.
@idle owl I will try to remember that. will also need a small tutorial the first time I do a library release!
CLUE is already there (though the image could be updated), so it looks like we just need the IMX boards.
@onyx hinge Ooh. Let's do a release on that library then to have you do it so you've got one under your belt.
@idle owl we can do that right now if you want. is there a doc pointer I can start with, and then come back if I have a question?
I found feather images (and a bit of info) here: https://twitter.com/arturo182/status/1199841134253682690
I haven't located anything for imxrt1010_evk yet...
@gilded cradle https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/i.mx-rt1010-evaluation-kit:MIMXRT1010-EVK but probably the images are not licensed for re-use
I bet @meager fog has an RT1010-EVK at adafruit they could photo
Excellent. And, not really. I will think of a place to put that since this isn't the first I've needed to and won't be the last time I need to explain it. For now, I will explain it to you. It's quite simple. We have a basic template we include no matter what: ```
To use in CircuitPython, simply install the Adafruit CircuitPython bundle.
To use in CPython, pip3 install adafruit-circuitpython-bitmap-font.
Read the docs for info on how to use it.```Beyond that, you want to view the commit logs and mention any major updates above the template. In this case, we migrated to GitHub Actions and "Handle string inputs to load_glyphs for BDF." I like to thank the people involved with any contributions by @-ing them with their GitHub IDs as well, especially if they're new or don't contribute often. Use Markdown to format the list of updates as bullet points if you like, or list them however you like. The title should try to reflect the changes succinctly, but that's not always possible, so you can explain further in the release notes. As for the version number: do you understand semantic versioning?
@idle owl so am I starting at https://github.com/adafruit/Adafruit_CircuitPython_Bitmap_Font/releases "draft a new release"?
@onyx hinge Correct, exactly.
Take note of the current version number so you can choose a new one.
At least half the time I have to go back to find it because I forget to do that π
@idle owl I usually keep the releases page open in another window for that reason
word
just don't do like I did when releasing several libs and forget to close the releases window for a lib and the "recycle it" for another lib π€¦ββοΈ
b3356eb (origin/master, origin/HEAD) Merge pull request #15 from tannewt/load_string_glyphs
49f2818 Merge pull request #14 from adafruit/dherrada-patch-1
31d0b01 (master) Merge pull request #12 from adafruit/dherrada-patch-1
@idle owl ok I have a draft release now https://github.com/adafruit/Adafruit_CircuitPython_Bitmap_Font/releases/edit/untagged-6126ff43322dc3c43202 I think you can see it?
@onyx hinge Great! Flip the order though, put the bullets above the template.
okie
Then publish release!
@onyx hinge Ooh wait, the URL for the library bundle is wrong.
You can edit it if you already published it
should be https://circuitpython.org/libraries
We've been slowly updating them as we do new releases.
I also added
Thanks to contributors @slender iron and @dherrada.
Excellent!
review again, send another link, it apparently changes when you make changes
oops
I refreshed and it 404'd π
interesssting
so some time after I do this, it will be picked up and actually put in the bundle?
Yes.
that happens daily or so?
The next time the bundle builds which will be tomorrow.
It builds daily when there are updated releases.
@onyx hinge Thanks!
thank you!
hm the title of the release is a bit silly ("1.0.4: Merge pull request #15 from tannewt/load_string_glyphs")
should I specify a "release title" manually?
@idle owl
@onyx hinge Ah yeah, sorry I wasn't clear about that. You should manually make a release title.
Something like "GitHub Actions and load_glyphs" or some such
yes
(I bet most users have no idea about actions vs travis, it doesn't make any difference a user can notice does it?)
Doing it back to back usually causes no random bytes to be available yet. In fact, usually even 1ms is too short for more random bytes to be available. I think that in the softdevice, something interrupt-driven is happening, but not that frequently. I can remove the delay, and it will just make the loop loop more times.
now time to figure out how to unbrick this nrf52840 feather, which isn't working right since I .. jlink flashed it with a firmware for stm32