The Wiring 1.0 _ALPHA_ Reference is a work in progress.
If you see any errors or have any comments, please write to: hbarragan [at] uniandes.edu.co
Name
available()
Examples
int val;
void setup() {
Serial1.begin(9600);
}
void loop() {
if( Serial1.available() > 0) {
val = Serial1.read();
}
// Set the analog output pin 0 to the value in val
analogWrite(0, val);
}
Description
Returns the number of bytes available.
Syntax
serial.available()
Parameters
serial
The hardware serial port, it can be Serial or Serial1