Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- void setup() {
- char byteRead[1];
- Serial.begin(115200);
- Serial.setTimeout(100);
- int numBytes = 0;
- Serial.println("Please enter a character (100ms timeout)");
- while (!Serial.available());
- numBytes = Serial.readBytes(byteRead, 1);
- Serial.print("|"); Serial.print(byteRead[0]); Serial.print("| Number of bytes read: "); Serial.print(numBytes);
- }
- void loop() {
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement