Created
August 5, 2015 14:41
-
-
Save michaelsarduino/d316a114a42edd579835 to your computer and use it in GitHub Desktop.
This file contains hidden or 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> | |
SoftwareSerial bluetooth(2, 3); | |
void setup() { | |
bluetooth.begin(9600); | |
pinMode(13, OUTPUT); | |
} | |
void loop() { | |
if(bluetooth.available() > 0) | |
{ | |
int status_led = bluetooth.read(); | |
if(status_led == 49) | |
{ | |
digitalWrite(13, HIGH); | |
} | |
if(status_led == 48) | |
{ | |
digitalWrite(13, LOW); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment