Debian Codegraph @

examples/serial/arduino/ckserial.ino

raw
1 char bytes[1024];
2
3 void setup()
4 {
5 // start serial port at 9600 bps and wait for port to open:
6 Serial.begin(9600);
7 }
8
9 void loop()
10 {
11 int nRead = Serial.readBytesUntil('\n', bytes, 1024);
12 if(nRead > 0)
13 Serial.println("bar");
14 }