Write a number to the serial port.
serial.writeNumber(0);
value
is the number to write to the serial portThis program repeatedly writes a 10-digit number to the serial port.
basic.forever(() => {
serial.writeNumber(1234567890);
basic.pause(5000);
});
If you use the led.plotBarGraph
function, it writes the number
being plotted to the serial port too.
basic.forever(() => {
led.plotBarGraph(input.lightLevel(), 255)
basic.pause(10000);
})