Hello!
I’m trying to implement Blynk into my NeoPixel Project, but no Pixel lights up… I’m sure they’re working. Are there probaply compatibility issues?
I tried the code but instead of the neopixel i set an digital output to high, which worked.
//BLINK SETUP
#define BLYNK_USE_DIRECT_CONNECT
#include <SoftwareSerial.h>
SoftwareSerial DebugSerial(0, 1); // RX, TX
#define BLYNK_PRINT DebugSerial
#include <BlynkSimpleSerialBLE.h>
char auth[] = "9****2";
//NEOPIXEL SETUP
#include <Adafruit_NeoPixel.h>
#ifdef __AVR__
#include <avr/power.h>
#endif
#define PIN 6
Adafruit_NeoPixel strip = Adafruit_NeoPixel(24, PIN, NEO_GRB + NEO_KHZ800);
void setup()
{
DebugSerial.begin(9600);
Serial.begin(9600);
Blynk.begin(Serial, auth);
strip.begin();
strip.show();
strip.setPixelColor(1, (strip.Color(0, 255, 255)));
strip.show();
delay(500);
strip.setPixelColor(1, (strip.Color(0, 0, 0)));
strip.show();
}
void loop()
{
Blynk.run();
}
BLYNK_WRITE(V3)
{
int pindata = param.asInt();
if(pindata==1)
{
strip.setPixelColor(1, (strip.Color(0, 255, 255)));
strip.show();
}
else
{
strip.setPixelColor(1, (strip.Color(0, 0, 0)));
strip.show();
}
}