Serial.Available History

Hide minor edits - Show changes to markup

May 31, 2010, at 07:27 PM by Equipo Traduccion -
Changed lines 21-22 from:

Retorna

to:

Devuelve

May 31, 2010, at 05:58 PM by Equipo Traduccion -
Changed line 64 from:
  // lle del puerto 1, envía al puerto 0:
to:
  // lee del puerto 1, envía al puerto 0:
May 31, 2010, at 05:58 PM by Equipo Traduccion -
May 31, 2010, at 05:57 PM by Equipo Traduccion -
Changed lines 48-49 from:

Arduino Mega ejemplo:

to:

Ejemplo Arduino Mega:

Changed line 58 from:
  // read from port 0, send to port 1:
to:
  // lee desde el puerto 0, envía al puerto 1:
Changed line 64 from:
  // read from port 1, send to port 0:
to:
  // lle del puerto 1, envía al puerto 0:
Changed line 73 from:

Ver también also

to:

Ver también:

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

Description

Get the number of bytes (characters) available for reading from the serial port. This is data that's already arrived and stored in the serial receive buffer (which holds 128 bytes).

Syntax

to:

Descripción

Devuelve el número de bytes (caracteres) disponibles para ser leidos por el puerto serie. Se refiere a datos ya recibidos y disponibles en el buffer de recepción del puerto (que tiene una capacidad de 128 bytes).

Sintaxis

Changed line 12 from:

Arduino Mega only: \\

to:

Sólo para Arduino Mega: \\

Changed lines 17-26 from:

Parameters

none

Returns

the number of bytes available to read

Example

to:

Parametros

ninguno

Retorna

el número de bytes disponibles para ser leídos

Ejemplo

Changed lines 28-29 from:

int incomingByte = 0; // for incoming serial data

to:

int incomingByte = 0; // para los datos de entrada serie

Changed line 31 from:
	Serial.begin(9600);	// opens serial port, sets data rate to 9600 bps
to:
	Serial.begin(9600);	// abre el puerto serie, establece la velocidad a 9600 bps
Changed line 36 from:
	// send data only when you receive data:
to:
	// envía datos solo cuando recibe datos:
Changed line 38 from:
		// read the incoming byte:
to:
		// lee el byte de entrada:
Changed lines 41-42 from:
		// say what you got:
		Serial.print("I received: ");
to:
		// muestra lo que tiene:
		Serial.print("He recibido: ");
Changed lines 48-49 from:

Arduino Mega example:

to:

Arduino Mega ejemplo:

Changed line 73 from:

See also

to:

Ver también also

February 01, 2010, at 05:14 PM by David A. Mellis -
Added lines 9-16:

Syntax

Serial.available()

Arduino Mega only:
Serial1.available()
Serial2.available()
Serial3.available()

February 01, 2010, at 05:10 PM by David A. Mellis -
Changed lines 1-2 from:

int Serial.available()

to:

Serial

available()

Changed lines 7-8 from:

Get the number of bytes (characters) available for reading over the serial port.

to:

Get the number of bytes (characters) available for reading from the serial port. This is data that's already arrived and stored in the serial receive buffer (which holds 128 bytes).

Changed lines 11-12 from:

None

to:

none

Changed lines 15-16 from:

The number of bytes are available to read in the serial buffer, or 0 if none are available. If any data has come in, Serial.available() will be greater than 0. The serial buffer can hold up to 128 bytes.

to:

the number of bytes available to read

Deleted line 65:
Changed lines 67-69 from:
to:
May 22, 2009, at 10:40 AM by David A. Mellis -
Deleted lines 62-66:

Note:

Serial.available has a documented bug in it in Arduino v.0007. This will be patched in v.0008, but see this thread if you wish to patch Serial.available in Arduino 0007.

May 21, 2009, at 11:22 PM by Tom Igoe -
Added lines 37-62:

Arduino Mega example:

void setup() {
  Serial.begin(9600);
  Serial1.begin(9600);

}

void loop() {
  // read from port 0, send to port 1:
  if (Serial.available()) {
    int inByte = Serial.read();
    Serial1.print(inByte, BYTE); 

  }
  // read from port 1, send to port 0:
  if (Serial1.available()) {
    int inByte = Serial1.read();
    Serial.print(inByte, BYTE); 
  }
}

April 18, 2007, at 09:05 AM by David A. Mellis - incoming serial buffer size is 128, not 64.
Changed lines 13-14 from:

The number of bytes are available to read in the serial buffer, or 0 if none are available. If any data has come in, Serial.available() will be greater than 0. The serial buffer can hold up to 64 bytes.

to:

The number of bytes are available to read in the serial buffer, or 0 if none are available. If any data has come in, Serial.available() will be greater than 0. The serial buffer can hold up to 128 bytes.

April 18, 2007, at 04:23 AM by Paul Badger -
Deleted line 35:
April 18, 2007, at 04:22 AM by Paul Badger -
Changed lines 40-42 from:

Serial.available has a documented bug in it in Arduino v.0007. This will be patched in v.0008, but see this thread if you wish to patch Serial.available

to:

Serial.available has a documented bug in it in Arduino v.0007. This will be patched in v.0008, but see this thread if you wish to patch Serial.available in Arduino 0007.

April 18, 2007, at 04:21 AM by Paul Badger -
Changed lines 40-44 from:

Serial.available has a documented bug in it in Arduino v.0007. This will be patched in v.0008, but see this thread if you wish to patch .0007.

patch Serial.available

to:

Serial.available has a documented bug in it in Arduino v.0007. This will be patched in v.0008, but see this thread if you wish to patch Serial.available

April 18, 2007, at 04:20 AM by Paul Badger -
Changed lines 42-45 from:

[[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1168309608

 | patch Serial.available]]

to:

patch Serial.available

April 18, 2007, at 04:19 AM by Paul Badger -
Changed lines 38-39 from:

Note: Serial.available has a documented bug in it in Arduino v.0007. This will be patched in v.0008, but see this thread if you wish to patch .0007.

to:

Note:

Serial.available has a documented bug in it in Arduino v.0007. This will be patched in v.0008, but see this thread if you wish to patch .0007.

April 18, 2007, at 04:19 AM by Paul Badger -
Changed lines 41-43 from:

| patch Serial.available() ]]

to:
 | patch Serial.available]]

April 18, 2007, at 04:17 AM by Paul Badger -
Changed lines 13-14 from:

how many bytes are available to read in the serial buffer, or 0 if there arent any. If any data has come in, Serial.available() will be greater than 0. The serial buffer can hold up to 64 bytes.

to:

The number of bytes are available to read in the serial buffer, or 0 if none are available. If any data has come in, Serial.available() will be greater than 0. The serial buffer can hold up to 64 bytes.

Changed lines 38-43 from:
to:

Note: Serial.available has a documented bug in it in Arduino v.0007. This will be patched in v.0008, but see this thread if you wish to patch .0007.

[[http://www.arduino.cc/cgi-bin/yabb2/YaBB.pl?num=1168309608 | patch Serial.available() ]]

March 27, 2006, at 08:57 PM by Tom Igoe -
Changed lines 40-42 from:
to:
March 27, 2006, at 08:26 PM by Tom Igoe -
Changed lines 1-2 from:

Serial.available()

to:

int Serial.available()

March 27, 2006, at 08:25 PM by Tom Igoe -
Changed lines 1-2 from:

Serial.available()

to:

Serial.available()

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

Serial.available()

March 27, 2006, at 08:24 PM by Tom Igoe -
Deleted lines 0-1:

int serialAvailable()

March 27, 2006, at 08:22 PM by Tom Igoe -
March 27, 2006, at 08:21 PM by Tom Igoe -
Added lines 1-43:

int serialAvailable()

Description

Get the number of bytes (characters) available for reading over the serial port.

Parameters

None

Returns

how many bytes are available to read in the serial buffer, or 0 if there arent any. If any data has come in, Serial.available() will be greater than 0. The serial buffer can hold up to 64 bytes.

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