In this tutorial we will going to control the LED using keys of your keyboard via serial communication, sending a command from the PC to the Arduino using the Serial Monitor in the Arduino IDE. This project is also introduces how we manipulate the text string.

Parts Required

Arduino UNO/MEGA/PRO/MINI
3x LED Any Color
3x 220 Ohms Resistor
Jumper Wires
Solder-less Breadboard

Wiring the LED to the Arduino

Traffic-Light-with-Arduino2

The Sketch Code

After you upload the code you need to open the serial monitor and type the value of each LED if you type R255 Brightness will be High the same thing with other LED here is the example > R200 | G250 | B150 here is another example > enter R127, G100, B255 and you will get a nice purplish color. If you type R0, G0 B0 all 3 LED will be off.

Controlling your RGB LED Using Serial Communication
Facebooktwitterredditpinterestmail
Tagged on:         

JLCPCBPCBgogoPCBway4pcb

Leave a Reply

Your email address will not be published. Required fields are marked *