Serial.Read History

Hide minor edits - Show changes to output

January 30, 2012, at 05:14 PM by Scott Fitzgerald -
Changed line 27 from:
[@
to:
(:source lang=arduino:)
Changed lines 47-48 from:
@]
to:
(:sourceend:)
Changed lines 50-52 from:
* [[(Reference.)Serial.available]]()
* [[(Reference.)Serial.flush]]()
* [[(Reference.)Serial.peek]]()
to:
(:include Reference/SerialSeeAlsoIncludes:)\\
November 04, 2011, at 06:00 PM by Scott Fitzgerald -
Changed lines 7-8 from:
Reads incoming serial data.
to:
Reads incoming serial data. read() inherits from the [[Reference/Stream]] utility class.
Changed lines 53-54 from:

to:
* [[/Reference/StreamRead | Stream.read]]()
December 05, 2010, at 12:48 AM by David A. Mellis -
Changed lines 52-53 from:

to:
* [[(Reference.)Serial.peek]]()

February 01, 2010, at 05:15 PM by David A. Mellis -
Changed lines 10-11 from:
Serial.()
to:
Serial.read()
Changed lines 13-16 from:
Serial1.() \\
Serial2.() \\
Serial3.()
to:
Serial1.read() \\
Serial2.read() \\
Serial3.read()
February 01, 2010, at 05:14 PM by David A. Mellis -
Changed lines 10-11 from:
Serial.read()
to:
Serial.()

''Arduino Mega only:'' \\
Serial1.() \\
Serial2.() \\
Serial3.()
February 01, 2010, at 05:12 PM by David A. Mellis -
Changed lines 1-2 from:
!!int Serial.read()
to:
[[Reference/Serial]]

!!read()
Added lines 9-11:
!!!!Syntax
Serial.read()
Changed lines 18-19 from:
the first byte of incoming serial data available (or -1 if no data is available) ''int''
to:
the first byte of incoming serial data available (or -1 if no data is available) - ''int''
Deleted line 44:
* [[(Reference.)Serial.begin]](speed)
Changed lines 46-49 from:
* [[(Reference.)Serial.print]](data)
* [[(Reference.)Serial.println]](data)

to:
* [[(Reference.)Serial.flush]]()

February 25, 2008, at 05:28 PM by David A. Mellis -
Changed lines 13-14 from:
an int, the first byte of inocming serial data available (or -1 if no data is available).
to:
the first byte of incoming serial data available (or -1 if no data is available) ''int''
December 19, 2006, at 05:24 PM by David A. Mellis -
Added lines 1-2:
!!int Serial.read()
March 28, 2006, at 11:15 AM by David A. Mellis - Added info about -1 return value when no data available.
Changed lines 11-12 from:
an int, the first byte of inocming serial data available.
to:
an int, the first byte of inocming serial data available (or -1 if no data is available).
March 27, 2006, at 08:57 PM by Tom Igoe -
Changed lines 38-41 from:
*[[(Reference.)Serial.available]]
*[[(Reference.)Serial.begin]]

to:
* [[(Reference.)Serial.begin]](speed)
* [[(Reference.)Serial.available]]()
* [[(Reference.)Serial.print]](data)
* [[(Reference.)Serial.println]](data)

March 27, 2006, at 08:24 PM by Tom Igoe -
Added lines 1-42:
!!!!Description

Reads incoming serial data.

!!!Parameters

None

!!!!Returns

an int, the first byte of inocming serial data available.

!!!Example

[@
int incomingByte = 0; // for incoming serial data

void setup() {
Serial.begin(9600); // opens serial port, sets data rate to 9600 bps
}

void loop() {

// send data only when you receive data:
if (Serial.available() > 0) {
// read the incoming byte:
incomingByte = Serial.read();

// say what you got:
Serial.print("I received: ");
Serial.println(incomingByte, DEC);
}
}

@]

!!!!See also
*[[(Reference.)Serial.available]]
*[[(Reference.)Serial.begin]]


[[Reference.HomePage | Reference Home]]

Share