Skip to content

Instantly share code, notes, and snippets.

@mkalkbrenner
Last active October 4, 2020 07:29
Show Gist options
  • Save mkalkbrenner/9455d389173dd191a8ade07667417266 to your computer and use it in GitHub Desktop.
Save mkalkbrenner/9455d389173dd191a8ade07667417266 to your computer and use it in GitHub Desktop.
Read PIN2DMD serial events
void setup() {
// put your setup code here, to run once:
Serial1.begin(57600);
Serial.begin(115200);
Serial.println("Ready.");
}
void loop() {
if (Serial1.available()) {
Serial.println("Received:");
byte in = Serial1.read();
Serial.print("Hex: 0x"); Serial.println(in, HEX);
Serial.print("Dec: "); Serial.println(in, DEC);
Serial.println();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment