Reference for Wiring version 0027+ If you have a previous version, use the reference includede with your software. If see any errors or have any comments, let us know.
Class | Serial |
||||
---|---|---|---|---|---|
Name | begin() |
||||
Examples | int val; void setup() { Serial1.begin(9600); // Start serial Serial at 9600 baud } void loop() { if( Serial1.available() > 0 ) // if data is available to read { val = Serial1.read(); // read it and store it in 'val' } analogWrite(0, val); } int val; void setup() { Serial1.begin(115200); // Start serial Serial1 at 115200 baud } void loop() { if( Serial1.available() > 0 ) // if data is available to read { val = Serial1.read(); // read it and store it in 'val' } analogWrite(0, val); } |
||||
Description | The Wiring serial library allows for easily reading and writing data to external machines. The serial port is a nine pin I/O port that exists on most PCs and can be emulated through USB on Macintosh with the Keyspan USB Serial Adaptor. The begin(rate) method must be placed in the setup() method. | ||||
Syntax | serial.begin(rate) |
||||
Parameters |
|
||||
Returns | None | ||||
Usage | Application |