Chat freely about anything...
User avatar
By UniqueIdentifier
#63979
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!
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


#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.
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!