2016-04-16 01:36:31 +02:00
|
|
|
# Serial
|
|
|
|
|
2016-05-05 20:16:14 +02:00
|
|
|
Reading and writing data over a serial connection.
|
2016-04-16 01:36:31 +02:00
|
|
|
|
|
|
|
```cards
|
|
|
|
serial.writeLine("");
|
2016-05-19 22:56:24 +02:00
|
|
|
serial.writeNumber(0);
|
2016-08-10 11:51:55 +02:00
|
|
|
serial.writeValue("x", 0);
|
2016-05-19 22:56:24 +02:00
|
|
|
serial.writeString("");
|
2017-01-10 19:26:44 +01:00
|
|
|
serial.readUntil(",");
|
2016-05-19 22:56:24 +02:00
|
|
|
serial.readLine();
|
2017-01-10 19:26:44 +01:00
|
|
|
serial.readString();
|
2016-05-27 17:55:40 +02:00
|
|
|
serial.redirect(SerialPin.P0, SerialPin.P0, BaudRate.BaudRate115200);
|
2017-01-10 19:26:44 +01:00
|
|
|
serial.onDataReceived(",", () => {})
|
2016-04-16 01:36:31 +02:00
|
|
|
```
|
2016-08-08 22:08:15 +02:00
|
|
|
|
|
|
|
### See Also
|
|
|
|
|
|
|
|
[writeLine](/reference/serial/write-line), [writeNumber](/reference/serial/write-number), [writeValue](/reference/serial/write-value), [writeString](/reference/serial/write-string), [readLine](/reference/serial/read-line), [redirect](/reference/serial/redirect-to)
|