-
Notifications
You must be signed in to change notification settings - Fork 174
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
Controlling a WS2812 LED #448
Comments
I also tried something a little more complex like this:
Same: No compile errors. There's output. But the WS2812 LED doesn't turn on. |
Are you sure that the ws2812 are fast enough to be able to work with a 3MHz clocked signal? |
Ah, maybe not (Sorry, I'm not very experienced with this). I guess it'll be too complicated to use SPI. Now I'm using this RMT code. It works for external ws2812s. But not with the built-in ws2812 of the ESP32-C3-Zero. It used to be off all the time. And now it's always green no matter what. (The exact same thing happens with the official Arduino code for the ESP32-C3-Zero.) |
The https://github.com/smart-leds-rs/ws2812-spi-rs you mentioned is fully compatible with esp-idf-hal. The pull request for embedded-hal 1.0 is merged now. You also need to enable |
It most certainly is, I'm using 3.2 MHz in my code, the SPI signal is used to form correct timings, the timings I get with 3.2 MHz match the ones described in the datasheet for WS2812B |
@weiying-chen the code you can find in my links is tested to work with ESP32-C3-Zero built-in WS2812 led |
@okhsunrog Thanks a lot! I'll try it out. |
@okhsunrog Your code works. Thanks a lot again! |
I want to control the WS2812 LED of my ESP32-C3-Zero using
esp_idf_hal
's SPI. I tried this:No compiler errors. And there's output. But the WS2812 LED doesn't turn on.
Note: This is a rust library for WS2812. But I don't think it's compatible with
esp_idf_hal
.The text was updated successfully, but these errors were encountered: