Last active
July 14, 2016 02:42
-
-
Save yeffrimic/3b733481a9f544290149a158597c32d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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