Last active
October 4, 2020 07:29
-
-
Save mkalkbrenner/9455d389173dd191a8ade07667417266 to your computer and use it in GitHub Desktop.
Read PIN2DMD serial events
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
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