Hackster is hosting Hackster Holidays, Ep. 5: Livestream & Giveaway Drawing. Watch previous episodes or stream live on Friday!Stream Hackster Holidays, Ep. 5 on Friday!
Techatronic
Published

Smart phone control Light

Light Control by smartphone

IntermediateFull instructions provided211
Smart phone control Light

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Relay Module (Generic)
×1
HC-05 Bluetooth Module
HC-05 Bluetooth Module
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

phone control light schematic

yes

Code

phone control light code

C/C++
void setup() {
  // put your setup code here, to run once:
Serial.begin(9600);
pinMode(7, OUTPUT);
digitalWrite(7, HIGH);
}

void loop() {
  // put your main code here, to run repeatedly:
if(Serial.available()>0)

{
  
  char m= Serial.read();

  if(m=='A')
  {
digitalWrite(7, HIGH);
    
    }
  else
  {
    
    digitalWrite(7, LOW);
    
    }



  
  }
}

Credits

Techatronic

Techatronic

72 projects • 127 followers
Electronic engineer

Comments