Wrote new Serial topic
This commit is contained in:
parent
45d4caf595
commit
af91622dda
28
docs/reference/serial/write-number.md
Normal file
28
docs/reference/serial/write-number.md
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
# Serial Write Number
|
||||||
|
|
||||||
|
Write a number to the [serial](/device/serial) port.
|
||||||
|
|
||||||
|
```sig
|
||||||
|
serial.writeNumber(0);
|
||||||
|
```
|
||||||
|
|
||||||
|
### Parameters
|
||||||
|
|
||||||
|
* `number` is the [number](/reference/types/number) to write to the serial port
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
This program repeatedly writes a 10-digit number to the serial port.
|
||||||
|
|
||||||
|
```blocks
|
||||||
|
basic.forever(() => {
|
||||||
|
serial.writeNumber(1234567890);
|
||||||
|
basic.pause(5000);
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
|
### See also
|
||||||
|
|
||||||
|
[serial](/device/serial),
|
||||||
|
[serial write value](/reference/serial/write-value),
|
||||||
|
[serial write line](/reference/serial/write-line)
|
Loading…
Reference in New Issue
Block a user