Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //arduino serial echo example
- char inByte = 0; // incoming serial byte
- void setup()
- {
- // start serial port at 9600 bps:
- Serial.begin(9600);
- }
- void loop()
- {
- // if we get a valid byte:
- if (Serial.available() > 0)
- {
- // get incoming byte:
- inByte = Serial.read();
- // send incoming byte back to serial:
- Serial.print(inByte);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement