Serial.Read History

Hide minor edits - Show changes to markup

May 31, 2010, at 07:20 PM by Equipo Traduccion -
Changed lines 5-9 from:

Description

Reads incoming serial data.

Syntax

to:

Descripción

Lee los datos entrantes del puerto serie.

Sintaxis

Changed line 12 from:

Arduino Mega only: \\

to:

Solamente en Arduino Mega: \\

Changed lines 17-26 from:

Parameters

None

Returns

the first byte of incoming serial data available (or -1 if no data is available) - int

Example

to:

Parámetros

Ninguno

Devuelve

el primer byte disponible recibido por el puerto serie (devuelve -1 si no hay datos disponibles) - int

Ejemplo

Changed lines 28-29 from:

int incomingByte = 0; // for incoming serial data

to:

int incomingByte = 0; // para el byte leido

Changed line 31 from:
	Serial.begin(9600);	// opens serial port, sets data rate to 9600 bps
to:
	Serial.begin(9600);	// abre el puerto serie a 9600 bps
Changed line 36 from:
	// send data only when you receive data:
to:
	// envia datos solamente cuando recibe datos
Changed line 38 from:
		// read the incoming byte:
to:
		// lee el byte entrante:
Changed lines 41-42 from:
		// say what you got:
		Serial.print("I received: ");
to:
		// dice lo que ha recibido:
		Serial.print("He recibido: ");
Changed line 49 from:

See also

to:

Ver también

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:

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:
Changed lines 46-49 from:
to:
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:
to:
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 Home

Share