Skip to content

Instantly share code, notes, and snippets.

@serverhiccups
Created November 2, 2015 06:30
Show Gist options
  • Save serverhiccups/88c0f7ec2bb48e331f82 to your computer and use it in GitHub Desktop.
Save serverhiccups/88c0f7ec2bb48e331f82 to your computer and use it in GitHub Desktop.
A test piece of code
int incomingByte = 0; // for incoming serial data
void setup() {
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
int tonePin = 9;
}
void loop() {
// send data only when you receive data:
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();
incomingByte - 96;
incomingByte * 50000;
// say what you got:
Serial.print("I received: ");
Serial.println(incomingByte);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment