Skip to main content

Blutooth Switch (Arduino)

 BLUTOOTH SWITCH (ARDUINO)

Hi, Using this we can control leds using Smart Phone via Blutooth. We can also control home appliances using Relay with it. For VideoCLICK HERE .

THING'S NEEDED

  1. Arduino UNO R3.
  2. HC - 05 Blutooth Module.
  3. Leds or Relay (For 240v).
  4. Breadboard.
  5. Jumper Wires.
  6. 9V Battery

CIRCUIT DIAGRAM

WIRING

ARDUINO TO BLUTOOTH MODULE

  • Connet the VCC of Blutooth Module to 5 + of Arduino.
  • Connect the GND of Blutooth Module to GND od Arduino.
  • Connect TX of Blutooth Module to RX  of Arduino.
  • Connect RX of Bultooth Module to TX of Rduino.
NOTE : REMOVE THE TX & RX CONNECTION OF BLUTOOTH MODULE BEFORE UPLOADING THE CODE (THE CODE WILL NOT BE UPLOADED IF DID REMOVED)

ARDUINO TO LEDS

  • Led 1 - Pin 13 of Arduino.
  • Led 2 - Pin 12 of Arduino.
  • Led 3 - Pin 11 of Arduino.
  • Led 4 - Pin 10 of Arduino.

APPLICATION IN PHONE

CODE


// Bluetooth switch
// scientist BENIELS LAB 

void setup() {
Serial.begin(9600);
    pinMode(13, OUTPUT);
    pinMode(12, OUTPUT);
    pinMode(11, OUTPUT);
    pinMode(10, OUTPUT);
    }

void loop() {
 
 if(Serial.available()>0)
   {     
      char data= Serial.read(); // reading the data received from the bluetooth module
      switch(data)
      {
        case '1':
        digitalWrite(13,HIGH);
            break; // when a is pressed on the app on your smart phone
        case '2': 
            digitalWrite(13,LOW);
            break; // when d is pressed on the app on your smart phone
        case '3': 
            digitalWrite(12,HIGH);
            break;   
        case '4': 
            digitalWrite(12, LOW);
            break;  
        case '5': 
            digitalWrite(11,HIGH);
            break;   
        case '6': 
            digitalWrite(11, LOW);
            break;    
        case '7': 
            digitalWrite(10,HIGH);
            break;   
        case '8': 
            digitalWrite(10, LOW);
            break;     
        case '9': 
            digitalWrite(13,HIGH);
            digitalWrite(12,HIGH);  
            digitalWrite(11,HIGH); 
            digitalWrite(10,HIGH);         
            break;     
        case '0': 
           digitalWrite(13,LOW);
           digitalWrite(12,LOW);  
           digitalWrite(11,LOW); 
           digitalWrite(10,LOW);         
            break;           
                         
            
        default : break;
      }
      Serial.println(data);
   }
   delay(50);
}
SUBSCRIBE TO "scientist BENIEL'S LAB" IN YOUTUBE FOR MORE ELECTRONIC'S & ROBOTIC'S PROJECTS.
THANK YOU

Comments

Popular posts from this blog

Arduno Clock

  Arduino Clock This is a clock using RTC Tiny with Arduino. Using this we can see time & date.  FOR VIDEO :

MQ-5 GAS LEAK DETECTOR

  MQ-5 GAS LEAK DETECTOR  This project is used to detect the gas leak and alert us that the gas is leaking. You can use it for your science projects. FOR VIDEO :