DIY project: Using RGB LED with Blynk

by May 15, 2020arduino uno projects

We already have talked about using Blynk with Arduino. In this tutorial, we will make a DIY project using RGB LED with Blynk. We will also control the intensity of it using some special widgets in Blynk.

Contents: RGB LED with Blynk

Introduction

We have made many projects comprising the wireless communication. We use Bluetooth module, Wifi etc. With this project, we can do so by using Blynk. As explained in the introductory blog of Blynk, we need to give internet to the board. In this tutorial I will be using the serial communication. However, we can also use different ways like Wifi, Ethernet etc.

Materials Required

  • RGB LED
  • Arduino Uno
  • Breadboard
  • Jumper wires
  • A mobile phone with Blynk app

Circuit and Explanation

As seen above, the circuit is not different from the normal setup excluding the setup. However, you need to be careful whether you are using Common anode LED or Common Cathode. The LED which I have used is the Common Anode, which means the common pin is the (+) pin. So we need to work in the Active Low.

Circuit

Arduino Code

The code can be opened from the Examples present in the Blynk library. Since we are using the serial communication, so I have used the Arduino_serial_USB example from it. Below is the code.

#define BLYNK_PRINT DebugSerial
#include <SoftwareSerial.h>
SoftwareSerial DebugSerial(2, 3); // RX, TX

#include <BlynkSimpleStream.h>

// You should get Auth Token in the Blynk App.
// Go to the Project Settings (nut icon).
char auth[] = "YourAuthToken";  // set your authentication token here


void setup()
{
  // Debug console
  DebugSerial.begin(9600);

  // Blynk will work through Serial
  // Do not read or write this serial manually in your sketch
  Serial.begin(9600);
  Blynk.begin(Serial, auth);
}

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

Adding Widgets in Blynk

Now, we have stepped into the main task of adding the widgets in the App. First of all, make a new project as in the image as shown.

The first appearance

Click on the + sign at the top right corner and add three buttons for the same as shown.Now press any button and you ll see the following options as shown.

In the PIN option, you need to set the digital pin you are going to use. Since we are using the Common anode LED, so we will also write 1 at the starting and 0 at the end. Then change the MODE to SWITCH. You can also add a slider if you want to change the intensity of the color. Add three different buttons. Here, I have also used a slider for green light. You can also change the label of the button.

Configuration

This is how the final layout will look like. However, you can change the positions of the widgets.

Final layout

Finally running the project

Now, we are done with the setup, so it is the time for the final run. For this, first upload the code to the Arduino UNO. I am using serial setup for setting the internet to the board. So i have selected the same option in the connectivity section of the APP. After uploading the code, click on the play button on the top rightmost button of the app.

You will see a similar scenario. Everything is successfully set. The last option which we are using is the running of the blynk.ser file under the scripts section of the Blynk library. Go there and run it. Make sure you see the correct COM port there. Now enter the same COM port and press enter. Now, you are completely done with the process. It’s time to observe!

Start using your buttons present in the app. Use the slider too. I hope you were able to complete this project on RGB LED with Blynk. Feel free to comment and post your doubts too. Happy Learning!

The real connection!
The final working!

Creating a multiplication Skill in Alexa using python

Written By Anmol Punetha

Hey, I am Anmol. I am a tech blogger and an electronics engineering student at the same time. As you're reading my blog, you are getting a generous amount of information in simpler words. Hope it's of use. Thank you for visiting. Keep reading!

RELATED POSTS

Using a Seven Segment Display with Arduino

Using a Seven Segment Display with Arduino

Let's learn how to configure a SSD (Seven segment display) with Arduino. You will also learn to make the counter using a single SSD. Contents: IntroductionMaterials RequiredCircuitArduino CodeCode Explanation 1. Introduction The Seven Segment Display has basically 10...

Using Stepper motors with Arduino

In this tutorial, you will learn to configure the stepper motors with the Arduino Uno. https://iot4beginners.com/arduino-uno-a-basic-introduction/ Contents: IntroductionMaterials requiredHardware ExplanationThe circuitArduino CodeA DIY Project's idea 1. Introduction...

DIY Project: Arduino controlled Bluetooth Car

DIY Project: Arduino controlled Bluetooth Car

Let's make a wireless Arduino Controlled Bluetooth car. Contents: IntroductionMaterials RequiredIntegrating the Chassis kitArduino CodeThe Circuit and it's ExplanationConfiguring the Mobile ApplicationThe Final Run 1. Introduction Hey everyone, today we are going to...

How to use Ultrasonic Sensor with Arduino?

How to use Ultrasonic Sensor with Arduino?

Introduction Ultrasonic sensors work by emitting sound waves at a frequency too high for humans to hear. They then wait for the sound to be reflected back, calculating distance based on the time required.  Since ultrasonic waves can reflect off a glass or liquid...

How to use a Servo motor with Arduino?

How to use a Servo motor with Arduino?

Introduction A Servo Motor is a small device that has an output shaft. This shaft can be positioned to specific angular positions by sending the servo a coded signal. As long as the coded signal exists on the input line, the servo will maintain the angular position of...

Using IR sensor with Arduino Uno

Using IR sensor with Arduino Uno

Introduction An  IR (Infrared sensor)is an electronic device, that emits in order to sense some aspects of the surroundings. An IR sensor can measure the heat of an object as well as detects the motion. The emitter is simply an IR LED( Light Emitting Diode) and...

Blinking a LED using Arduino Uno

Blinking a LED using Arduino Uno

Blinking a LED is the most basic project in the Arduino. You basically make some easy connections, write the code and upload it in the Arduino. With that, you can control the blinking rate, the duration for which it was glowing and lot more. To know how to install the...

VIDEOS – FOLLOW US ON YOUTUBE

EXPLORE OUR IOT PROJECTS

IoT Smart Gardening System – ESP8266, MQTT, Adafruit IO

Gardening is always a very calming pastime. However, our gardens' plants may not always receive the care they require due to our active lifestyles. What if we could remotely keep an eye on their health and provide them with the attention they require? In this article,...

How to Simulate IoT projects using Cisco Packet Tracer

In this tutorial, let's learn how to simulate the IoT project using the Cisco packet tracer. As an example, we shall build a simple Home Automation project to control and monitor devices. Introduction Firstly, let's quickly look at the overview of the software. Packet...

All you need to know about integrating NodeMCU with Ubidots over MQTT

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

All you need to know about integrating NodeMCU with Ubidots over Https

In this tutorial, let's discuss Integrating NodeMCU and Ubidots IoT platform. As an illustration, we shall interface the DHT11 sensor to monitor temperature and Humidity. Additionally, an led bulb is controlled using the dashboard. Besides, the implementation will be...

How to design a Wireless Blind Stick using nRF24L01 Module?

Introduction Let's learn to design a low-cost wireless blind stick using the nRF24L01 transceiver module. So the complete project is divided into the transmitter part and receiver part. Thus, the Transmitter part consists of an Arduino Nano microcontroller, ultrasonic...

Sending Temperature data to ThingSpeak Cloud and Visualize

In this article, we are going to learn “How to send temperature data to ThingSpeak Cloud?”. We can then visualize the temperature data uploaded to ThingSpeak Cloud anywhere in the world. But "What is ThingSpeak?” ThingSpeak is an open-source IoT platform that allows...

Amaze your friend with latest tricks of Raspberry Pi and Firebase

Introduction to our Raspberry Pi and Firebase trick Let me introduce you to the latest trick of Raspberry Pi and Firebase we'll be using to fool them. It begins with a small circuit to connect a temperature sensor and an Infrared sensor with Raspberry Pi. The circuit...

How to implement Machine Learning on IoT based Data?

Introduction The industrial scope for the convergence of the Internet of Things(IoT) and Machine learning(ML) is wide and informative. IoT renders an enormous amount of data from various sensors. On the other hand, ML opens up insight hidden in the acquired data....

Smart Display Board based on IoT and Google Firebase

Introduction In this tutorial, we are going to build a Smart Display Board based on IoT and Google Firebase by using NodeMCU8266 (or you can even use NodeMCU32) and LCD. Generally, in shops, hotels, offices, railway stations, notice/ display boards are used. They are...

Smart Gardening System – GO GREEN Project

Automation of farm activities can transform agricultural domain from being manual into a dynamic field to yield higher production with less human intervention. The project Green is developed to manage farms using modern information and communication technologies....