Introduction: Pretty Light

You can change the light of the RGB LED by using the smart phone

RGB LED have a 7 colours so this project makes a very cool light

Step 1: Components

-Arduino

-Breadboard

-Bluetooth module

- 2 RGB LED

-3 Resistor 250 ohm

- Cable Arduino

- Lap top to make programming of the Arduino and also to make the application

- Mobile to use the App

- Wires

-Plastic

Step 2: Frame

You will get plastic not very dark to can show the light

And you will design as you like cube or rectangle or a Cylindrical as I made I made it in a quite small Cylindrical

Step 3: Design the Circuit

you will connect the LED and the Bluetooth meduol as show in the photo Bluetooth meduol


Tx……………………….Pin 1

Rx…………………….....Pin 0


RGB LED

Green in Pin 11

Red in Pin 10

Blue in Pin 12

Step 4: App for Mobile

I used thunkable Website to make the app

http://app.thunkable.com

coz its very easy to make a app in this website and its like AppInvator In the app when you click in the buttons its just send a data by using the Bluetooth communication

Step 5: Programming of the Arduino

The Arduino receive data from the mobile by using the app via the Bluetooth

Like when receive a 2 make a Blue light

And when receive

7 else if (data == '7')

// Purple (turn red and blue on):

{ digitalWrite(10, HIGH);

digitalWrite(11, LOW);

digitalWrite(12, HIGH); }

Red and blue will turn on so will make a purple light

Code

#include 
SoftwareSerial mySerial(0, 1); // RX, TX
void setup()
{
  Serial.begin(9600);
  pinMode(10, OUTPUT);  //Red
  pinMode(11, OUTPUT);  //Grean
  pinMode(12, OUTPUT);  //Blue
}
char data = 0;
void loop()
{
  if (Serial.available() > 0)
  {
    data = Serial.read();
    delay(100);
    Serial.print(data);
    Serial.print("\n");
  }
  if (data == '1')
    // Red (turn just the red LED on):
  {
    digitalWrite(10, HIGH);
    digitalWrite(11, LOW);
    digitalWrite(12, LOW);
  }
  else if (data == '2')
    // Blue (turn just the blue LED on):
  {
    digitalWrite(10, LOW);
    digitalWrite(11, LOW);
    digitalWrite(12, HIGH);
  }
  else if (data == '3')
    // Green (turn just the green LED on):
  {
    digitalWrite(10, LOW);
    digitalWrite(11, HIGH);
    digitalWrite(12, LOW);
  }
  else if (data == '4')
    // Yellow (turn red and green on):
  {
    digitalWrite(10, HIGH);
    digitalWrite(11, HIGH);
    digitalWrite(12, LOW);
  }
  else if (data == '5')
    // White (turn all the LEDs on):
  {
    digitalWrite(10, HIGH);
    digitalWrite(11, HIGH);
    digitalWrite(12, HIGH);
  }
  else if (data == '6')
    // Cyan (turn green and blue on):
  {
    digitalWrite(10, LOW);
    digitalWrite(11, HIGH);
    digitalWrite(12, HIGH);
  }
  else if (data == '7')
    // Purple (turn red and blue on):
  {
    digitalWrite(10, HIGH);
    digitalWrite(11, LOW);
    digitalWrite(12, HIGH);
  }
  else
  {
    digitalWrite(10, LOW);
    digitalWrite(11, LOW);
    digitalWrite(12, LOW);
  }
}

Step 6: Finally Step

And in finally you will get a cool light by very cheap bell

Home Improvement Contest 2017

Participated in the
Home Improvement Contest 2017

Bluetooth Challenge

Participated in the
Bluetooth Challenge