Open capedra opened 5 years ago
The 10 ns difference is well within the +- 150 ns tolerance.
If 5V is used for powering APA106, a level shifter may be required on data pin.
The 10 ns difference is well within the +- 150 ns tolerance.
If 5V is used for powering APA106, a level shifter may be required on data pin.
Any data pin works at 3V3 on ESP32. I'm currently using 5V from ESP32 to power up the APA106. I will test with a diode later. But what level shifter are you talking about? Maybe this one: https://www.adafruit.com/product/1787 ?
Adafruit's Neopixel library works perfectly fine on Arduino framework.
Any data pin works at 3V3 on ESP32. I'm currently using 5V from ESP32 to power up the APA106. I will test with a diode later. But what level shifter are you talking about? Maybe this one: https://www.adafruit.com/product/1787 ?
As ESP32 High pin state is 3.3 V it may be insuficient to be detected as high level on APA106 if it is powered from 5V (minimal high level is usually specified as 0.7 * Vdd, for Vdd=5V it is 3.5V). In this case any level shifting circuit (3.3V -> 5V) can be used between ESP32 pin and APA106 data pin. You may try to power the APA106 from 3.3V. Most WS2812B works well with 3.3V power (but its power supply range is specified as 3.5 - 5.3V).
Adafruit's Neopixel library works perfectly fine on Arduino framework.
I'm not shure how is it relevant for the issue.
@loboris The LED turns on with 3V3 but the colors are still wrong. GREEN, for example, should be 65280 but it shows this:
>>> Neopixel.GREEN
32768
This is the value of the Neopixel.GREEN
constant, Neopixel.LIME
is defined as 65280.
You can see the values of all defined colors here.
You can give the color as a number, you don't need to use the defined constants only.
Color value is defined as (red_value * 65536) + (green_value * 256) + blue_value
, or as hexadecimal value: 0xRRGGBB
.
Hello, At the same time that this is an issue, it's also a tutorial for making the APA106 LED work with this release of MicroPython:
Now, if you're using static colors, you can notice this: GRAY=YELLOW; GREEN=OFF; PURPLE=RED; BLACK=OFF; MAROON=RED; TEAL=OFF; GRAY=RED; OLIVE=RED; SILVER=MAGENTA; NAVY=GREEN;
MAGENTA=OK; RED=OK; BLUE=OK; LIME=OK; CYAN=SOSO
Maybe this issue that happens with these colors is because of this timings issue which can be shown below:
It basically shows that T1L != 1360 and also T0H != 1360, because the library doesn't let me assign these values correctly.