SURYATEJA
Published © Apache-2.0

BLUETOOTH CONTROL LEDs

This project uses android bluetooth for controlling LED

BeginnerFull instructions provided76,617
BLUETOOTH CONTROL LEDs

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Bluetooth Low Energy (BLE) Module (Generic)
×1

Software apps and online services

BlueMix
IBM BlueMix

Story

Read more

Custom parts and enclosures

BLUETOOTH CONTROLLED LEDs

Schematics

BLUETOOTH CONTROLLED LEDs

Code

Code for BLuetooth sensor HC-05

Plain text
void setup() {
Serial.begin(9600);
 pinMode(8, OUTPUT); // put your setup code here, to run once:
 }
 
void loop() {
  // put your main code here, to run repeatedly:
 if(Serial.available()>0)
   {     
      char data= Serial.read(); // reading the data received from the bluetooth module
      switch(data)
      {
        case 'a': digitalWrite(8, HIGH);break; // when a is pressed on the app on your smart phone
        case 'd': digitalWrite(8, LOW);break; // when d is pressed on the app on your smart phone
        default : break;
      }
      Serial.println(data);
   }
   delay(50);
}

Credits

SURYATEJA

SURYATEJA

18 projects • 59 followers

Comments