Reference for Wiring version 1.0 Build 0100+ If you have a previous version, use the reference included with your software. If see any errors or have any comments, let us know.
Class | Serial |
||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Name | write() |
||||||||||
Examples | int data = 0; void setup() { Serial.begin(); } void loop() { data = analogRead(0); data = data / 4; // write the value stored in // the variable data to the serial port Serial.write(data); } |
||||||||||
Description | The write() method writes a single byte to the serial port. This is often helpful for looking at the data a program is producing or to write data to other devices connected to the serial port. | ||||||||||
Syntax | serial.write(data) serial.write(str) serial.write(buf,len) |
||||||||||
Parameters |
|
||||||||||
Returns | None | ||||||||||
Usage | Application |