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

ESP32 and WS2812b are not working #651

Open
jorgecis opened this Issue Sep 9, 2018 · 2 comments

Comments

Projects
None yet
2 participants
@jorgecis

jorgecis commented Sep 9, 2018

I have a 1m WS2812B strip, runnig the following code in my ESP32 dev, only the first turn on Green all the time, so it never go off, sometimes the brightness is a little different but never go off.

#include "FastLED.h"
#define NUM_LEDS 30
CRGB leds[NUM_LEDS];
void setup() { FastLED.addLeds<NEOPIXEL, 12>(leds, NUM_LEDS); }
void loop() {
	leds[0] = CRGB::White; FastLED.show(); delay(30);
	leds[0] = CRGB::Black; FastLED.show(); delay(30);
}

I tried all the other examples, most of the time only the first led turn on/flick in ramdom colors. I tried with the pins 12,13,14 all give me same results.

Using the same wires setup and a ESP8266, all the examples works fine. The only change in the code betweeen boards are the GPIO PIN.

Any ideas?

@focalintent

This comment has been minimized.

Show comment
Hide comment
@focalintent

focalintent Sep 9, 2018

Member

What version of the library do you have I staled? Also, do you ha e the most recent esp32 platform installed? Finally, do you have a level shifter between the esp32 and the leds?

Member

focalintent commented Sep 9, 2018

What version of the library do you have I staled? Also, do you ha e the most recent esp32 platform installed? Finally, do you have a level shifter between the esp32 and the leds?

@jorgecis

This comment has been minimized.

Show comment
Hide comment
@jorgecis

jorgecis Sep 9, 2018

Hi, Thanks for taking the time to check this issue.

I was using the last version of everything (ESP32 core, libs, ..), but I found the problem and is not in your code, in many forums and website like this one https://learn.adafruit.com/adafruit-neopixel-uberguide/powering-neopixels it said that we need to install a resistor in the data pin.

Adding a 300 to 500 Ohm resistor between your microcontroller's data pin and the data input on the first NeoPixel can help prevent voltage spikes that might otherwise damage your first pixel. Please add one between your micro and NeoPixels!

So I did that, I added a 470 Ohm resistor and that was the cause of my issues, without the resistor and using the pin 25 all the examples are working fine, the animations are smooth.

So the ESP8266 works fine with and without the resistor but the ESP32 only works without the resistor.

I'm not sure if the problem is only with my led strip ( I have only one).

jorgecis commented Sep 9, 2018

Hi, Thanks for taking the time to check this issue.

I was using the last version of everything (ESP32 core, libs, ..), but I found the problem and is not in your code, in many forums and website like this one https://learn.adafruit.com/adafruit-neopixel-uberguide/powering-neopixels it said that we need to install a resistor in the data pin.

Adding a 300 to 500 Ohm resistor between your microcontroller's data pin and the data input on the first NeoPixel can help prevent voltage spikes that might otherwise damage your first pixel. Please add one between your micro and NeoPixels!

So I did that, I added a 470 Ohm resistor and that was the cause of my issues, without the resistor and using the pin 25 all the examples are working fine, the animations are smooth.

So the ESP8266 works fine with and without the resistor but the ESP32 only works without the resistor.

I'm not sure if the problem is only with my led strip ( I have only one).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment