Skip to content

Instantly share code, notes, and snippets.

@YaseenTwati
Last active December 11, 2018 16:04
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 YaseenTwati/df7b48dcc5695e2863081ca916a0b074 to your computer and use it in GitHub Desktop.
Save YaseenTwati/df7b48dcc5695e2863081ca916a0b074 to your computer and use it in GitHub Desktop.
Blinking a LED with Bluetooth
void setup()
{
pinMode(6, OUTPUT);
Serial.begin(9600);
}
void loop()
{
char r = Serial.read();
if(r == 'o')
{
digitalWrite(6, HIGH);
}
else if (r == 'f')
{
digitalWrite(6, LOW);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment