Skip to content

Instantly share code, notes, and snippets.

@anoochit
Created September 7, 2014 00:17
Show Gist options
  • Select an option

  • Save anoochit/6f1d8c2d009a3a64e5b9 to your computer and use it in GitHub Desktop.

Select an option

Save anoochit/6f1d8c2d009a3a64e5b9 to your computer and use it in GitHub Desktop.
always read data from bluetooth
char BYTE;
void setup() {
Serial.begin(9600);
}
void loop() {
while (!Serial.available()); // stay here so long as COM port is empty
BYTE = Serial.read(); // read next available byte
Serial.print(BYTE);
delay(50);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment