blynk led strip code example

Example 1: blynk rgb led strip

/*************************************************************************
 * Title: Simple ESP-8266 Wifi RGB LED Strip Light Controller
 * File: esp8266_rgb_led_controller.ino
 * Author: James Eli
 * Date: 1/14/2018
 *
 * Blynk slider #1 (r) GPIO14
 * Blynk slider #2 (g) GPIO05
 * Blynk slider #3 (b) GPIO12
 * 
 * This program controls an RGB LED strip light. 
 * 
 * Notes:
 *  (1) Requires the following arduino libraries:
 *      ESP8266
 *  (2) Compiled with arduino ide 1.8.3
 *  (4) To place an ESP8266 into program mode, GPIO0 must be LOW during power up. 
 *  (5) Test Pads on PCB back:
 *        #1 – GND
 *        #2 – Pin #12 IO00
 *        TX – Pin #16 TX
 *        RX – Pin #15 RX
*************************************************************************/
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
 
// Blynk App authentication token, wifi ssid and password.
char auth[] = "***";
char ssid[] = "***";
char pass[] = "***";
 
// Esp8266 pins.
const int RED_PIN   = 14;
const int GREEN_PIN = 5;
const int BLUE_PIN  = 12;
 
void setup() {
  pinMode( RED_PIN, OUTPUT );
  pinMode( GREEN_PIN, OUTPUT );
  pinMode( BLUE_PIN, OUTPUT );
  Blynk.begin( auth, ssid, pass );
}
 
void loop() {
  Blynk.run();
}

Example 2: blynk rgb led strip

#define BLYNK_PRINT Serial


#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>

char auth[] = "********************************";

char ssid[] = "**********";
char pass[] = "*********";

void setup()
{
  Serial.begin(9600);

  Blynk.begin(auth, ssid, pass);
}

void loop()
{
  Blynk.run();
}

Tags:

Misc Example