Skip to content

Instantly share code, notes, and snippets.

@michaelsarduino
Created August 5, 2015 14:41
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michaelsarduino/d316a114a42edd579835 to your computer and use it in GitHub Desktop.
Save michaelsarduino/d316a114a42edd579835 to your computer and use it in GitHub Desktop.
#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