#define BLYNK_PRINT Serial #define BLYNK_USE_DIRECT_CONNECT #include #include #include #include #include #define NUMPIXELS 11 // Number of LEDs in strip // Here's how to control the LEDs from any two pins: #define PIN 12 Adafruit_NeoPixel strip = Adafruit_NeoPixel(1, PIN, NEO_GRB + NEO_KHZ800); int ledR = 0; int ledG = 0; int ledB = 0; // You should get Auth Token in the Blynk App. char auth[] = "wx9LnliSfx8PR_jGGB-qs5lyzlai8Ir2"; void setup() { // Debug console Serial.begin(9600); Serial.println("Waiting for connections..."); Blynk.begin(auth); strip.begin(); // Initialize pins for output strip.setBrightness(30); strip.show(); } //ヴァーチャルピンV1 BLYNK_WRITE(V1) { ledR = param[0].asInt(); ledG = param[1].asInt(); ledB = param[2].asInt(); Serial.print( "ledR: "); Serial.print(ledR); Serial.print( " ledG: "); Serial.print(ledG); Serial.print( " ledB: "); Serial.println(ledB); //LED点灯 for(int i=0;i