 |
 |
 |
Name |
|
beginSerial() |
 |
|
|
Examples |
|
int val;
void setup() {
beginSerial(); // Default start serial at 9600 baud
}
void loop() {
background(val);
}
void serialEvent() {
val = serial;
}
|
|
int val;
void setup() {
beginSerial(115200); // Start serial at 115200 baud
}
void loop() {
background(val);
}
void serialEvent() {
val = serial;
}
|
|
|
Description |
|
Update test 2. The Processing 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 first step is to select which serial port your device is physically attached to. Access the menu through: Sketch > Serial Port to make a selection. The beginSerial() method must be placed in the setup() method. The similar beginSerial(rate) method enables changing the data rate from the default 9600. |
 |
|
|
Syntax |
|
beginSerial()
beginSerial(rate)
|
 |
|
|
Parameters |
|
|
 |
|
|
Returns |
|
None |
 |
|
|
Usage |
|
Application |
 |
|
|
Related |
|
endSerial() serialWrite() serialEvent() serial |