1

After hours of searching for a solution and try many ways of wiring, I must asking here for Help:

I'm using a ESP8266 (ESP-12E) with a WS2801 - 4 Wire LED Strip and using this Pinout-Diagram to connect WS2801 wires to NodeMCU.

https://alexbloggt.com/wp-content/uploads/2015/10/nodemcu_pinout_700.png

Here is my Wiring:

LED     ESP
====   =====
5V --> Vin
GND --> GND
CK --> GPIO2 (D4)
SI --> GPIO3 (RX)

I have found this sample Program which should turn on and off all LEDs one after each other for 100ms. But it happens nothing after compiling and uploading it to NodeMCU board using Arduino IDE. Any help is highly appreciated.

enter image description here

//This program was taken from the FirstLight.ino supplies with the FastLED library
// It has been modified for use with a NodeMCU for use in a tutorial by NQMakerSupplies.com.au
// Hosted at theMakers.org.
// 
// Special thanks to the people behind FastLED.io and all the contributors :)

#define FASTLED_ESP8266_NODEMCU_PIN_ORDER   // map output pins to what they are called on the NodeMCU
#include "FastLED.h"

///////////////////////////////////////////////////////////////////////////////////////////
//
// Move a white dot along the strip of leds.  This program simply shows how to configure the leds,
// and then how to turn a single pixel white and then off, moving down the line of pixels.
// 

// How many leds are in the strip?
#define NUM_LEDS 10

// Data pin that led data will be written out over
#define DATA_PIN 3

// Clock pin only needed for SPI based chipsets when not using hardware SPI
#define CLOCK_PIN 2

// This is an array of leds.  One item for each led in your strip.
CRGB leds[NUM_LEDS];

// This function sets up the ledsand tells the controller about them
void setup() {
    // sanity check delay - allows reprogramming if accidently blowing power w/leds
   delay(2000);
   FastLED.addLeds<WS2801, DATA_PIN, CLOCK_PIN, RGB>(leds, NUM_LEDS);
}

// This function runs over and over, and is where you do the magic to light
// your leds.
void loop() {
   // Move a single white led 
   for(int whiteLed = 0; whiteLed < NUM_LEDS; whiteLed = whiteLed + 1) {
      // Turn our current led on to white, then show the leds
      leds[whiteLed] = CRGB::White;
      // Show the leds (only one of which is set to white, from above)
      FastLED.show();
      // Wait a little bit
      delay(100);
      // Turn our current led back to black for the next loop around
      leds[whiteLed] = CRGB::Black;
   }
}
6
  • Are you sure the VIN pin is providing 5V? It looks like it's only for powering the board. If you have LoLin's V3 board, it has a USB power out pin marked as VU.
    – gre_gor
    Commented Nov 9, 2016 at 23:22
  • I have a Amica (V2) and pretty sure that Vin outputs 5V. Because once I connect the led strip to Board all leds turn white and remain. If I connect CK to CLK and SI to MOSI, I can see a fancy blinking christmas lights during the Upload. Is DATA_PIN 3 --> GPIO3 and CLOCK_PIN 2 --> GPIO2 correct?
    – nicmon
    Commented Nov 10, 2016 at 7:17
  • Just to make sure, NodeMCU has a different/weird numbering compared to all other ESP modules for the GPIO pins, you are aware of this? Just google 'nodemcu pin' or so, plenty of images.
    – bluemind
    Commented Nov 10, 2016 at 8:25
  • The second thing to consider is voltages, ESP8266 GPIO voltage is 3.3V, if WS2801 is powered from 5v, I'd guess that it also expects a 5v data signal, so you might need a level converter of some sort. Again google, people would have already documented this :)
    – bluemind
    Commented Nov 10, 2016 at 8:28
  • Also, this might be usefull, a bit, mayby github.com/FastLED/FastLED/wiki/ESP8266-notes
    – bluemind
    Commented Nov 10, 2016 at 9:40

1 Answer 1

2

Changing the first line from

 #define FASTLED_ESP8266_NODEMCU_PIN_ORDER

to

 #define FASTLED_ESP8266_RAW_PIN_ORDER

has solved the Problem.

1
  • Had the same problem, and this was the solution for me as well, thanks for posting!
    – Estyn
    Commented Dec 3, 2019 at 5:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.