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 | available() |
||
| Examples | int val; void setup() { Serial.begin(9600); } void loop() { if ( Serial.available() > 0) { val = Serial.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 |
|
||
| Returns | int | ||
| Usage | Application |

