What will you make:
In this article, we will learn to control a RGB LED with your smartphone device, using a platform called Blynk. Blynk allows you to control Arduino, ESP8266, Raspberry Pi and other such boards through their iOS and Android apps. It provides an easy to use dashboard through which you can monitor various sensors and control actuators. If you are completely new to Blynk, checkout our Getting Started with Blynk guide.
What will you need:
For this project you will need:
// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth = "Your-Auth-Token";
// Your WiFi credentials.
// Set password to "" for open networks.
char ssid = "Your-Wifi-Name";
char pass = "Your-Wifi-Password";
// Debug console
Blynk.begin(auth, ssid, pass);
- Connect the components as shown in schematics.
- After creating a new project in Blynk, click on the button labeled “+” to open the Widget Box. Look for a widget called zeRGBa. Add it
- Change the zeRGBa Settings as shown below
- Copy the code above in your Arduino sketch, remember to replace the auth token, wifi name and password.
- Choose the appropriate board (NodeMCU 1.0) and port from Tools, and upload the code.
- After uploading, press the play button in your Blynk app, and you can now slide to different colors to control the LED.