This is an old revision of the document!
/*
* Prueba del enlace bluetooth.
* Usando Software serial library
*/
#include <SoftwareSerial.h>
SoftwareSerial mySerial(11, 12); // RX, TX
void setup() {
// Open serial communications and wait for port to open:
Serial.begin(9600);
while (!Serial) {
; // wait for serial port to connect. Needed for native USB port only
}
Serial.println("Hola buenas noches!");
// set the data rate for the SoftwareSerial port
mySerial.begin(9600);
mySerial.println("Hola, mundo?");
}
void loop() { // run over and over
if (mySerial.available()) {
Serial.write(mySerial.read());
}
if (Serial.available()) {
mySerial.write(Serial.read());
}
}