In this simple tutorial we will learn how to control the RGB LED Random color with a 433MHz RF Remote control and Arduino and how to turn it ON & OFF.
Watch the Video!
Step 1: What You Will Need
- Arduino UNO (or any other Arduino)
- Jumper wires
- RGB LED Module
- 433 MHz RF module
- Visuino program: Download Visuino
Step 2: The Circuit
- Connect Remote pin [VCC] to Arduino pin [5V]
- Connect Remote pin [GND] to Arduino pin [GND]
- Connect Remote pin [D0] to Arduino digital pin [4]
- Connect Remote pin [D1] to Arduino digital pin [5]
- Connect RGB LED pin [+] to Arduino pin [5V]
- Connect RGB LED pin [R] to Arduino digital pin [6]
- Connect RGB LED pin [G] to Arduino digital pin [10]
- Connect RGB LED pin [B] to Arduino digital pin [9]
Note: some RGB LED modules have pin (-) instead of pin (+) in that case you connect it to the Arduino pin [GND]
Step 3: Start Visuino, and Select the Arduino UNO Board Type
The Visuino: https://www.visuino.eu also needs to be installed. Download Free version or register for a Free Trial.
Start Visuino as shown in the first picture Click on the "Tools" button on the Arduino component (Picture 1) in Visuino When the dialog appears, select "Arduino UNO" as shown on Picture 2
Step 4: In Visuino Add,Set & Connect Components
- Add "Random Color" component
- Add "Color Value" component
- Add "Color Multi-Source Merger" component
- Add "RGB LED" component
- Connect Arduino digital Out pin[4] to "ColorValue1" pin [Clock] , this will be used to turn the LED Off
- Connect Arduino digital Out pin[5] to "RandomColor1" pin [Clock] , this will be used to set the random color on the LED
- Connect "RandomColor1" pin [Out] to "ColorMultiMerger1" pin [0]
- Connect "ColorValue1" pin [Out] to "ColorMultiMerger1" pin [1]
- Connect "ColorMultiMerger1" pin [Out] to "LED1" pin [In]
- Connect "LED1" pin[Red] to Arduino Digital-Analog PWM pin[6]
- Connect "LED1" pin[Green] to Arduino Digital-Analog PWM pin[10]
- Connect "LED1" pin[Blue] to Arduino Digital-Analog PWM pin[9]
Note: If the LED is not shining then Select "LED1" and in the properties window set "Inverted" to True
Step 5: Generate, Compile, and Upload the Arduino Code
In Visuino, at the bottom click on the "Build" Tab, make sure the correct port is selected, then click on the "Compile/Build and Upload" button.
Step 6: Play
If you power the Arduino module, and press the button "A" on the Remote the LED will Turn ON and a random color will shine, If you press the button "B" on the Remote the LED will turn off.
Congratulations! You have completed your project with Visuino. Also attached is the Visuino project, that I created for this Tutorial, you can download it and open it in Visuino: https://www.visuino.eu
Comments