Wiring Diagram:
Sorry for the lame diagram, I am new to this.
I have a 5V input with 2.2A (checked using multimeter), with my data pin wired inline with a 220Ω resistor.
I'm able to successfully connect to my WiFi network and Blynk's cloud server, but am unable to get the LED to turn on or change color. The LED turned on for a little while when I was looking at code, which I have no idea why, but haven't been able to get it to turn on since.
Currently I am only driving 1 ws2812b LED.
Main.cpp:
#define BLYNK_PRINT Serial
#include <BlynkSimpleEsp8266.h>
#define FASTLED_ESP8266_RAW_PIN_ORDER
#include "FastLED.h"
#define NUM_LEDS1 60
#define LED_TYPE WS2812
#define COLOR_ORDER GRB
CRGB leds1[NUM_LEDS1];
char auth[] = "xxxxx";
char ssid[] = "xxx";
char pass[] = "xxxx";
#define PIN1 D2
int data=255;
int r,g,b;
void setup() {
Serial.begin(9600);
WiFi.begin(ssid, pass);
while (WiFi.status() != WL_CONNECTED) {
delay(500);
Serial.print(".");
}
Serial.println("");
Serial.println("WiFi connected");
Serial.println("IP address: ");
Serial.println(WiFi.localIP());
Blynk.begin(auth, ssid, pass);
Blynk.connect(3333);
while (Blynk.connect() == false) {
// Wait until connected
}
Serial.println("Connected to Blynk server");
FastLED.addLeds<LED_TYPE, PIN1, COLOR_ORDER>(leds1, NUM_LEDS1).setCorrection( TypicalLEDStrip );
}
void static1(int r, int g, int b, int brightness) {
FastLED.setBrightness(brightness);
for (int i = 0; i < NUM_LEDS1; i++) {
leds1[i] = CRGB(r, g, b);
}
FastLED.show();
}
BLYNK_WRITE(V3) {
r = param[0].asInt();
g = param[2].asInt();
b = param[2].asInt();
static1(r, g, b,data);
}
void loop() {
Blynk.run();
}
BLYNK_WRITE(V2) {
data = param.asInt();
static1(r, g, b, data);
}