-->
Page 2 of 3

Re: FastLED Sketch works with another board but not ESP8266

PostPosted: Sun Mar 19, 2017 9:52 pm
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.

https://learn.adafruit.com/adafruit-neo ... -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!

Re: FastLED Sketch works with another board but not ESP8266

PostPosted: Mon Mar 20, 2017 3:24 am
by icons
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


#define FASTLED_ESP8266_RAW_PIN_ORDER

#include <FastLED.h>


// Definitions
#define NUM_LEDS 24
#define LED_TYPE WS2812B
#define LED_PIN D1
CRGB leds[NUM_LEDS];


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;
            FastLED.show();
            // clear this led for the next time around the loop
            leds[dot] = CRGB::Black;
            delay(30);
        }
}  // End cycle

void loop() {
 cycle();

}


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.

Re: FastLED Sketch works with another board but not ESP8266

PostPosted: Mon Mar 20, 2017 7:36 am
by UniqueIdentifier
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!

Re: FastLED Sketch works with another board but not ESP8266

PostPosted: Wed Mar 29, 2017 8:11 pm
by UniqueIdentifier
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.