Serial::available()\ Serial \ Language (API) \ Wiring ALPHA 1.0
Author: Hernando Barragán
Description: Wiring is an electronic sketchbook and hardware electronics for developing ideas. It is a context for learning fundamentals of computer programming and prototyping with electronics within the context of the electronic arts.
Keywords: Wiring, Processing, Interactive Media, Electronic Arts, Programming, C, C++, Hernando Barragán

Search wiring.org.co:

Reference for Wiring version 0023+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Class | Serial
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
Returns | int
Usage | Application

Updated on November 02, 2009 12:13:06am PST