Last active
December 11, 2018 16:04
-
-
Save YaseenTwati/df7b48dcc5695e2863081ca916a0b074 to your computer and use it in GitHub Desktop.
Blinking a LED with Bluetooth
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
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