Paso 4: Receptor Software:
#include < SoftwareSerial.h >
#include < LiquidCrystal.h >
LiquidCrystal lcd (12, 11, 5, 4, 3, 2);
#define BT_SERIAL_TX 6
#define BT_SERIAL_RX 7
SoftwareSerial BluetoothSerial(BT_SERIAL_TX, BT_SERIAL_RX);
char temp = ' ';
void setup()
{
Serial.Begin(9600);
LCD.Begin (16, 2);
LCD.Print ("la temperatura ambiente:");
BluetoothSerial.begin(9600);
}
void loop()
{
Si (BluetoothSerial.available() > 0)
{
Temp = BluetoothSerial.read();
lcd.setCursor (0, 1);
LCD.Print(Temp);
LCD.Print ("grado");
Delay(100);
}
}