Search wiring.org.co:

Reference for Wiring version 0024+. 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 | SoftwareSerial
Name | ### read()
Examples |
    #include "SoftwareSerial.h"

    int val;
    SoftwareSerial port = SoftwareSerial(8, 9);

    void setup() {
      pinMode(8, INPUT);   // rx pin
      pinMode(9, OUTPUT);  // tx pin
      port.begin(9600);    // Start serial Serial at 9600 baud
    }

    void loop() {
      val = port.read();   // read a value and echo it
      port.print(val);
    }
Description | Returns a number between 0 and 255 for the next byte that's waiting in the buffer. Returns -1 if there is no byte.
Syntax |
    serial.read()
Parameters |
serial | The software serial port variable
Returns | int
Usage | Application

Updated on November 01, 2009 08:55:59am PST