Using the dfrobot interface Xbee USB Adapter (FTDI Ready) - DFRobot i wanted to test the combination xBee ==> LCD (I2C)
the program should display the xbee received characters on the LCD.
But thers nothing visible on the LCD.
The connected LCD is working (Tested with a different sketch) and the two used xBee's are communicating with each other (Tested with two x-ctu terminals.
#include <Wire.h>
#include <LiquidCrystal_I2C.h>
#include <SoftwareSerial.h>
#define rxPin 2
#define txPin 3
#define ledPin 13
SoftwareSerial xbee = SoftwareSerial(rxPin, txPin);
LiquidCrystal_I2C lcd(0x20,16,2); // set the LCD address to 0x20 for a 16 chars and 2 line display
void setup()
{
lcd.init(); // initialize the lcd
lcd.backlight();
pinMode(rxPin, INPUT);
pinMode(txPin, OUTPUT);
xbee.begin(19200);
Serial.begin(9600);
}
void loop()
{
// when characters arrive over the serial port...
if (Serial.available()) {
while (xbee.available() > 0) {
// display each character to the LCD
lcd.write(xbee.read());
}
}
}
Anny suggestions on how to get this running