Created
November 24, 2017 12:20
-
-
Save DzikuVx/7839042cda936b97be485a837724f39b to your computer and use it in GitHub Desktop.
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
include <HardwareSerial.h> | |
HardwareSerial MySerial(1); | |
void setup() { | |
MySerial.begin(9600, SERIAL_8N1, 16, 17); | |
} | |
void loop() { | |
while (MySerial.available() > 0) { | |
uint8_t byteFromSerial = MySerial.read(); | |
// Do something | |
} | |
//Write something like that | |
MySerial.write(rand(0, 255)); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment