Created
February 9, 2016 22:02
-
-
Save GiovanniBalestrieri/3e940cec9067acab388d to your computer and use it in GitHub Desktop.
This file contains hidden or 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() | |
{ | |
Serial.begin(115200); | |
} | |
void loop() | |
{ | |
SerialRoutine(); | |
} | |
void SerialRoutine() | |
{ | |
//Read from usb serial to bluetooth | |
if(Serial.available()) | |
{ | |
char modeS = Serial.read(); | |
if (modeS == 'a') | |
{ | |
Serial.println(" TakeOff "); | |
} | |
if (modeS == 'L') | |
{ | |
Serial.println(" Land "); | |
} | |
if (modeS == 'p') | |
{ | |
Serial.println(" Pid "); | |
} | |
if (modeS == 't') | |
{ | |
Serial.println("o,12,1,-4,"); | |
} | |
if (modeS == 's') | |
{ | |
Serial.println("c,p,"); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment