-
-
Notifications
You must be signed in to change notification settings - Fork 8.2k
esp32/machine_bitstream.c: Replace with RMT-based driver. #7985
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This aims to solve the glitching issues on long neopixel strips. Signed-off-by: Jim Mussared <jim.mussared@gmail.com>
If anyone wants to test this compiled firmware for ESP32-GENERIC is here: (updated) |
Some more background from CircuitPython (which use the exact same RMT code based on the Espressif sample) adafruit#3835 |
@jimmo It looks like that firmware file is not generally available (Google's asking me to log in)? |
Sorry about that, fixed now. |
Hi. Sorry if this is turning into a support call, but I ran into a couple things here. Here's a log of my firmware install (to be sure I'm not messing that part up):
Then, via the REPL:
(I thought I was expecting 1.17 here, but I'm not sure) Digging into the actual matter, via the REPL again:
Yields: https://files.scoat.es/KonwnZlQ.mov On Twitter you requested:
Trying this, I get what looks like a bad cast from the tuple:
Sorry again if this is turning into much more than you wanted to take on. Edit: This is Espressif + LOLIN D32 Pro, FWIW. |
Sorry @scoates argh this is why I shouldn't do this a 2am. I grabbed the wrong file. Here's the correct firmware. This should also fix the ability to set custom timing. Thanks for testing this out! |
With that one, I seem to get a reboot loop (and no REPL):
|
@scoates sorry it's been a while since I did builds of esp32 firmware and things have changed. I (mistakenly) just gave you the application.bin (which goes in a different location). I should have given you the combined firmware. Here's a combined firmware.bin, for real this time -- https://drive.google.com/file/d/1TUzZelltMIyObAYdJqphuD1wJWMRolh6/view?usp=sharing |
Ah I see what's been going wrong -- I've been using @dpgeorge I think we should make the deploy target also make combined firmware.bin (just so you never have a state where the build dir has a different micropython.bin to firmware.bin). |
Great news:
And: Wonderful! No noise/ghost pixels! (I didn't [have to] change timings.) Thank you! |
That's fantastic, thank you very much for testing @scoates ! I'll sort out the idf 4.0.2 compatibility (it's using convenience macros added in a later IDF version) and do more testing on other esp32 family chips and see if we can get this in for 1.18. |
Fixed IDF 4.0.2 build, tested on TinyPICO with IDF 4.0.2 and 4.2.2, and merged in 599b61c |
Testet on ESP32 and it works! |
I also tested the new firmware and it works! One question, i was using a library called urequests in one of my network modules. After flashing your new firmware it was not able to find this modul anymore. Do you have a idea to fix that? The rest was working with no problems. Thank's so far @jimmo |
It could be because the stable releases of esp32 firmware bundle some additional Python modules. You can separately install these by copying (eg with https://pypi.org/project/mpremote/) the files, eg from https://github.com/micropython/micropython-lib/blob/master/python-ecosys/urequests/urequests.py |
I was experimenting with this (firmware above) again this weekend, and I noticed that if I turn WiFi on, I get noise again. Happy to explore this in another issue, or maybe wait for the official release… just commenting because we'd had this conversation here already. |
Thanks @scoates! I also was experimenting with this. I also got noise, when WiFi is turned on. |
Can you please open a new issue about this noise with WiFi enabled? And add some detail about how to reproduce it. I'm trying with an 8-pixel strip doing |
See #8158 |
I am also working on a Neopixel project and I was bothered about sporadic flickering. All the Tips I found on internet did not bring me to a satisfying solution. Then I found a webpage discussing, that the Neopixel WS2812b exists in two versions. The regular one and a new one. According to the datasheet from the new Version the timing of the T0H/T0L and T1H/T1L is slightly different and need some adjustments. Usually the Neopixel Library available for micropython works with a timing pattern of (timing=(400, 850, 800, 450)) according to the new datasheet the value 400 and 450 is to close to maximum allowed. I changed them on my setup to a timing=(350,800,800,350) and all the flickering was gone since then. Try to adjust this timing if you are using the new version of WS2812B Neopixel maybe it helps for you too. Here the link to the Webpage of this discussion: https://blog.adafruit.com/2017/05/03/psa-the-ws2812b-rgb-led-has-been-revised-will-require-code-tweak/ |
synthio: Add LFOs
This aims to solve the reported glitching issues on long neopixel strips.
Although I wasn't able to repro any glitching on the existing firmware (suggestions welcome!), with this RMT driver I'm seeing no issues on a 300-LED SK6812 strip and a 32-LED WS2812 grid. Test setup is just a TinyPico connected directly to the strips (no level shifting).