29de28a738
* support for serial write numbers * moving down the list * formatting * fixing example typo
746 B
746 B
Serial Write Numbers
Write an array of numbers to the serial port.
serial.writeNumbers([0, 1, 2]);
Parameters
values
is the array of number to write to the serial port
Example: one two three
This program repeatedly writes a 3-number array to the serial port.
basic.forever(() => {
serial.writeNumbers([1, 2, 3]);
basic.pause(5000);
});
Example: plot temperature and light
serial.writeLine("temp,light")
basic.forever(() => {
serial.writeNumbers([input.temperature(), input.lightLevel()])
})