Phone Controlled RBG LED Lights




Introduction: Phone Controlled RBG LED Lights

A simple phone controlled RBG LED light. It communicates over bluetooth. All you need is an RBG LED, 3 resistors, a bluetooth module (like HC-05), arduino board and a mobile phone with bluetooth.

Wiring details and as well as links to the app here ->­ic=148853.msg1408773#msg140877­3

Step 1: Wiring Details

Here is wiring. Make sure you double check your the datasheet of the bluetooth module that you have. You just need to connect VCC, ground and TX pin on the module to 5V+, GND and RX pin on the arduino board. Some modules are only 3.3V tolerant so make sure you READ THE DAMN datasheet first ;-)

Step 2: Arduino Code

Here is arduino code - it's a slightly modified version of an example sketch that comes with arduino IDE - the one that relies on parseInt funtion.

Note that I used baud rate of 19200 because that's the default rate for my bluetooth module. It usually takes less time to just change it in arduino sketch rather than use AT commands to change baud rate of the module so READ THE DAMN DATASHEET and check what's the default baud rate of your module. Also note that the module has to be working as 
master so if it does not work check if yours is set as master.

anyway hte code is below ->

// pins for the LED:
const int redPin = 9;
const int greenPin = 10;
const int bluePin = 11;

void setup() {
  // initialize serial:
  // make the pins outputs:
  pinMode(redPin, OUTPUT);
  pinMode(greenPin, OUTPUT);
  pinMode(bluePin, OUTPUT);


void loop() {
  // if there's any serial available, read it:
  while (Serial.available() > 0) {

    // look for the next valid integer in the incoming serial stream:
    int red = Serial.parseInt();
    // do it again:
    int green = Serial.parseInt();
    // do it again:
    int blue = Serial.parseInt();

    // look for the newline. That's the end of your
    // sentence:
    if ( == '\n') {
      // constrain the values to 0 - 255 and invert
      // if you're using a common-cathode LED, just use "constrain(color, 0, 255);"
      red = 255 - constrain(red, 0, 255);
      green = 255 - constrain(green, 0, 255);
      blue = 255 - constrain(blue, 0, 255);

      // fade the red, green, and blue legs of the LED:
      analogWrite(redPin, red);
      analogWrite(greenPin, green);
      analogWrite(bluePin, blue);

      // print the three numbers in one string as hexadecimal:


Step 3: Android App

Here you can download both the app and the source file that you can upload into app inventor to modify it >
the app has .apk extension
the source file has .zip extension

TROUBLESHOOTING of this project and your own modified versions of the app.
If something does not work read the entire instructable and the datasheet of your module again. Make sure TX pin on the module is connected to RX pin on arduino board. Make sure you're powering the module with voltage it needs.

If you still can't work this out get a bluetooth dongle if your desktop/laptop doesn't have inbuilt bluetooth, and download putty (or just use serial monitor that comes with arduino IDE). First, connect the phone to the computer, open putty and see what the app sends when you move sliders. Then test the other half of the project - connect from the computer (using bluetooth of course) to the module and again open putty/serial monitor. Enter commands manually, make sure it sends a newline at the end of each command and see if the aruduino board responds. These two procedure should explain a lot and help you find out whether the phone/app is the problem or the arduino + BTmodule.

Microcontroller Contest

Participated in the
Microcontroller Contest

1 Person Made This Project!


  • Puzzles Speed Challenge

    Puzzles Speed Challenge
  • "Can't Touch This" Family Contest

    "Can't Touch This" Family Contest
  • CNC Contest 2020

    CNC Contest 2020



6 years ago on Introduction

Nevermind i messed up, i just used 3 different leds )) , do you have sketch for individual Led brightness control ? thanks again