ciao
mi inserisco in questa discussione per sottoporre il problema che stò avendo con 2 moduli xbee pro serie 2, stando al datasheet dovrei avere 1500 m di range all'esterno, me ne servono 500 m, ma non raggiungo neanche 200 m all'aperto, sono presenti ostacoli rappresentati da piante, possibile che questo faccia decadere il range così tanto, voi avete fatto esperienza
stefano
vi posto i codici che sto usando
TX
void setup()
{
Serial.begin(9600);
delay(1000);
}
void loop()
{
for (int i=0; i <= 255; i++)
{
// Serial.write(i);
Serial.println(i,DEC);
delay(1000);
}
}
RX
/*
modulo ricevitore xbee RX
An example of using the Arduino board+xbee to receive data from the
computer another arduino board+xbee
This example code is in the public domain.
This sketch prints i dati ricevuti to the LCD
The circuit:
* LCD RS pin to digital pin 12
* LCD Enable pin to digital pin 11
* LCD D4 pin to digital pin 5
* LCD D5 pin to digital pin 4
* LCD D6 pin to digital pin 3
* LCD D7 pin to digital pin 2
* LCD R/W pin to ground
* 10K resistor:
* ends to +5V and ground
* wiper to LCD VO pin (pin 3)
*/
#include <LiquidCrystal.h> // include the library code
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); // initialize the library with the numbers of the interface pins
int incomingByte=0;
void setup()
{
lcd.begin(16, 2); // set up the LCD's number of columns and rows:
Serial.begin(9600); // initialize serial communication:
lcd.clear();
delay(2000);
lcd.print("pronto");
}
void loop()
{
if (Serial.available()) // when characters arrive over the serial port...
{
delay(100); // wait a bit for the entire message to arrive
lcd.clear();
while(Serial.available() > 0) // see if there's incoming serial data:
{
incomingByte=Serial.read();
Serial.println(incomingByte,BYTE);
//lcd.setCursor(0,1);
lcd.write(incomingByte);
//Serial.flush();
//delay(50);
}
}
}