Chat freely about anything...
User avatar
By UniqueIdentifier
gbafamily1 wrote:Could be 3.3V versus 5V logic levels. If the LEDs are powered with 5V, the data in pin should used 5V logic. If the LEDs are powered with 3.7V (for example, from a Lithium battery), 3.3V on data in pin should work. ... -practices

NeoPixelBus is optimized for the ESP8266. I am not sure if this is true for FastLED.

Thanks GBA. Stumbled upon this last night but the link you have sums it all up nicely. Cheers!
User avatar
By icons
#63990 Neither I used "LED_PIN"
I ran your sketch with some changes, not sure what your goal was but this is what I got.

Also this is your sketch(modified):
Code: Select all


#include <FastLED.h>

// Definitions
#define NUM_LEDS 24
#define LED_TYPE WS2812B
#define LED_PIN D1

void setup() {
  FastLED.addLeds<NEOPIXEL, LED_PIN>(leds, NUM_LEDS);

void cycle() {    //This is a single led on/off at a time creating a single movement
        for(int dot = 0; dot < NUM_LEDS; dot++) {
            leds[dot] = CRGB::Blue;
            // clear this led for the next time around the loop
            leds[dot] = CRGB::Black;
}  // End cycle

void loop() {


This is running on nodemcu 1.0.
Separate 5v power supply to neopixel, 220ohm resistor, capacitor, nodemcu is still plugged to my computer usb, and nodemcu/neopixel same ground.
My neopixels are in a pallet so just imagine its a strip.
User avatar
By UniqueIdentifier
#64003 Thanks Icons.

The sketch was just a test to make sure I could light up the entire 5M strip.

I've got a level-shifter (74AHCT125D) and 1000 uf 6.3V capacitor on order.

Here's hoping I can continue on with this MQTT controlled Patio light.

Will post the sketch when I'm done.

Thanks guys!
User avatar
By UniqueIdentifier
#64391 Confirmed this morning after adding the 3.3V > 5V level-shifter that my sketch now works

In case anyone else has a similar issue, if you are powering your LED's via 5V, the data pin must receive at 5V as well and since the ESP8266 only outputs 3.3V you'll need to upshift.

I'm using a 74AHCT125 SMD (with super tiny contacts) so waiting to swap that out with a conversion board but as far as this morning tests, all good.

Thank you for the previous replys.