Created
March 7, 2016 20:30
-
-
Save nilsonpessim/64c8d05837f1f48c791a to your computer and use it in GitHub Desktop.
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
#include <SoftwareSerial.h> | |
SoftwareSerial Bluetooth (10, 11); | |
int led = 13; | |
void setup(){ | |
Bluetooth.begin(9600); | |
pinMode(led,OUTPUT); | |
} | |
void loop(){ | |
char caracter = Bluetooth.read(); | |
if (caracter == '1') { | |
digitalWrite(led,HIGH); | |
} | |
if (caracter == '2') { | |
digitalWrite(led,LOW); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment