Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save michaelsarduino/9e9fe816ea733fda184222c031d7f82d to your computer and use it in GitHub Desktop.
Save michaelsarduino/9e9fe816ea733fda184222c031d7f82d to your computer and use it in GitHub Desktop.
#include <SoftSerial.h>
#include <TinyPinChange.h>
SoftSerial bluetooth(2, 3);
void setup() {
bluetooth.begin(9600);
pinMode(0, OUTPUT);
pinMode(1, OUTPUT);
}
void loop() {
if(bluetooth.available() > 0)
{
int status_led = bluetooth.read();
if(status_led == 49)
{
digitalWrite(0, HIGH);
digitalWrite(1, HIGH);
}
if(status_led == 48)
{
digitalWrite(0, LOW);
digitalWrite(1, LOW);
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment