Android Controlled RGB LED Using Arduino





Introduction: Android Controlled RGB LED Using Arduino

About: I am an electrical student living at chennai i love electronics very much.

Hai to everyone in the post iam going show how to control the RGB LED using android with arduino and HC-05 Bluetooth module.

I searched in web there is lot of techniques to control the RGB LED. But this is the method which is very simple and easy.

In this method the color of LED is controlled by using the android application which is freeware you can download it from google play store.


Arduino uno or any arduino clone. (atmega 328)

1.HC-05 Bluetooth Module


3.Android mobile

Step 2: RGB LED

I used here is RGB LED you can also use a normal THD(Through Hole Device)LED.before choosing the LED be careful whether it is common anode type or common i used is common anode type. which means the R,Gand B terminals is connected to PWM pins and the final terminal is connected to vcc 5v in arduino. I soldered the RGB LED in the pref board so it is easy to connect to arduino.


connection is made by based on the type of the LED you use. I used here is common anode type common pin is connected to +5 vcc.

RGB LED CONNECTION (Only pin 3,5,6,9,10,11 are PWM pins)

Pin 3 of arduino is connected to red pin of RGB LED.

Pin 5 is arduino connected to green pin of RGB LED.

Pin 6 of arduino is connected to blue pin of RGB LED.

HC-05 Bluetooth module connection

Pin vcc is connected to +5 or +3 based on your module.

Pin gnd is connected to arduino gnd pin.

Pin Txd is connected to arduino pin 11.

Pinn Rxd is connected to arduino pin 12.


Download the color LED controller application from the google play store.

Click Here To Download

The application sends the information to HC-05 Bluetooth module then the module send the data to the arduino then then the color is varied by PWM pins in arduino.


Download the program and upload it to arduino. If you bought common anode type upload the rgb_led_ca for common cathode use rgb_led_cc

The difference between the two program is.For common cathode the program sends positive value to PWM pins.

analogWrite(PIN_RED, (255+R.toInt()));
analogWrite(PIN_GREEN, (255+G.toInt()));

analogWrite(PIN_BLUE, (255+B.toInt()));

For common anode type

analogWrite(PIN_RED, (255-R.toInt()));
analogWrite(PIN_GREEN, (255-G.toInt()));

analogWrite(PIN_BLUE, (255-B.toInt()));

Step 6: VIDEO

NOTE: Don't upload while bluetooth module connected to arduino. disconnect the module before uploading and connect it back after uploading the program.



    • Oil Contest

      Oil Contest
    • Make it Move Contest

      Make it Move Contest
    • Clocks Contest

      Clocks Contest

    We have a be nice policy.
    Please be positive and constructive.




    Hello Sir, I am Ain and I am doing my project which is using your apps as a references. I got the references and doing the same instructions that u given in your blogspot. but it doesn't works. Please help me sir. I want to know if my connection between bluetooth HC-05 to arduino UNO and also the connection to the breadboard is correct or not. If u got this message, please kindly reply. I am waiting for your response.Thanks you sir.

    R - pin 3

    CA - 5V

    G - pin 5

    B - pin 6

    Bluetooth HC - 05

    RX - pin 12

    TX - pin 11

    GND - gnd

    color led control.jpg
    2 replies

    First check LED you used is common ANODE LED or common CATHODE LED

    mine too not work..... i tried anode common and cathode common... sae not work

    thank you,

    i made it with Arduino's Uno, nano, mega but i want to make it with Arduino micro. please tell me how can i make it becouse arduino imicro dont have 11,12 pin for RX,TX

    Hello, thank you for the great code!!! But for me the colors were wrong and i needed to delete "255+" at the last three lines like this one:

    analogWrite(PIN_BLUE, (255+B.toInt()));

    to get :

    analogWrite(PIN_BLUE, (B.toInt()));

    which part of the code ?