Skip to content

Instantly share code, notes, and snippets.

@yeffrimic
Last active July 14, 2016 02:42
Show Gist options
  • Save yeffrimic/3b733481a9f544290149a158597c32d9 to your computer and use it in GitHub Desktop.
Save yeffrimic/3b733481a9f544290149a158597c32d9 to your computer and use it in GitHub Desktop.
#include <SoftwareSerial.h>;
#define TX 0
#define RX 1
#define Led 2
SoftwareSerial BT(RX,TX);
void setup(){
BT.begin(9600);
}
void loop(){
while(BT.available()>0){
char data = BT.read();
if(data=='H'){
digitalWrite(Led,HIGH);
}
if(data=='L'){
digitalWrite(Led,LOW);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment