ESP32, WS2812b
Posted: Thu Dec 12, 2019 5:31 pm
Hey guys,
I hope it's ok to ask ESP32 questions here too?
My current project is based on an 32x8 WS2812b matrix and an ESP32 dev board. I have connected the LED matrix using a SN74AHCT125 as a level shifter to pin 4.
With this setup I can use all kinds of FastLED examples with the Arduino IDE, but switching to the NodeMCU ws2812 module doesn't work somehow.
For example I am sending a basic ws2812.write({pin = 4, data = string.char(255, 0, 0)}) using ESPlorer without any change in the LEDs.
Sending a ws2812.write({pin = 4, data = string.char(255, 0, 0, 0)}) turns the first LED green though (notice the extra 0 at the end)?
So I tried ws2812.write({pin = 4, data = string.char(255, 0, 0, 255, 0, 0)}) which makes the first LED blue/greenish and the second LED green?
Sending ws2812.write({pin = 4, data = string.char(255,0,0, 255,0,0, 0)}) seens to set the first two green and ws2812.write({pin = 4, data = string.char(255,0,0, 255,0,0, 255,0,0, 0)}) the first three.
But adding another triple ws2812.write({pin = 4, data = string.char(255,0,0, 255,0,0, 255,0,0, 255,0,0, 0)}) does not turn on the fourth LED?
Even worse. When sending ws2812.write({pin = 4, data = string.char(0,255,0, 0,255,0, 0,255,0, 0)}) I would expect the first three LEDs to be red, but only the first two are red and the third is "faded" green?
I have tried resetting the ESP32 and the LED power without any differences.
What am I doing wrong?
I hope it's ok to ask ESP32 questions here too?
My current project is based on an 32x8 WS2812b matrix and an ESP32 dev board. I have connected the LED matrix using a SN74AHCT125 as a level shifter to pin 4.
With this setup I can use all kinds of FastLED examples with the Arduino IDE, but switching to the NodeMCU ws2812 module doesn't work somehow.
For example I am sending a basic ws2812.write({pin = 4, data = string.char(255, 0, 0)}) using ESPlorer without any change in the LEDs.
Sending a ws2812.write({pin = 4, data = string.char(255, 0, 0, 0)}) turns the first LED green though (notice the extra 0 at the end)?
So I tried ws2812.write({pin = 4, data = string.char(255, 0, 0, 255, 0, 0)}) which makes the first LED blue/greenish and the second LED green?
Sending ws2812.write({pin = 4, data = string.char(255,0,0, 255,0,0, 0)}) seens to set the first two green and ws2812.write({pin = 4, data = string.char(255,0,0, 255,0,0, 255,0,0, 0)}) the first three.
But adding another triple ws2812.write({pin = 4, data = string.char(255,0,0, 255,0,0, 255,0,0, 255,0,0, 0)}) does not turn on the fourth LED?
Even worse. When sending ws2812.write({pin = 4, data = string.char(0,255,0, 0,255,0, 0,255,0, 0)}) I would expect the first three LEDs to be red, but only the first two are red and the third is "faded" green?
I have tried resetting the ESP32 and the LED power without any differences.
What am I doing wrong?