how to send analog value from xbee to another xbee displayd on 20x4lcd?

Hello there well im trying to send a analog value from my arduino to another and display that value to a lcd.so what i have is:
Transmitter:
temp sensor on analog pin to arduino duemilanove > xbee shield > V1 xbee
Receiver:
V1 xbee > xbee shield > arduino mega > Serial 20x4LCD
i can get the value sending from transmitter to a usb xbee adaptor board to the coms but not to the arduino with LCD
i will find my code i have and put itup later when i finish work>>>>>>

i will find my code i have and put itup later when i finish work

Then, maybe we can help you.

Depending on what else you have to do, you may not need the Arduino at the transmitter end. The Xbee already has an A/D converter built right in.

Don

This is my code its not the best but its a start
Tansmiter

int sensorPin = 0;
int sensorValue = 0;

void setup() {
  Serial.begin(9600);    	
  Serial.println(" ");  	
  pinMode(sensorPin, INPUT);
}

void loop() {
  
  int sensorValue = analogRead(sensorPin);
  Serial.print(sensorValue);
  delay(1000); 
  }
}

Reciver

#include <Wire.h> 
#include <LiquidCrystal_I2C.h>

LiquidCrystal_I2C lcd(0x27,20,21);

void setup()
{
  lcd.init();                      
  lcd.backlight();
  lcd.begin(20, 4);
  lcd.setCursor(6, 1);
  lcd.print("WELCOME");
  delay(3000); 
  lcd.clear();
  Serial.begin(9600);   
}

void loop()
        
  if (Serial.available()){ 
     char getData = Serial.read();  
     lcd.setCursor(0, 1);
     lcd.print("DEC");
   }
}

and i do want a arduino at the recivcer

Hey guys!!!!i have got 4 XBEE S2 modules.I have changed the parameters of XBEE using XCTU such that it read the analog voltage from AD1 pin for every one second(it will be sleeping in rest of the time),and transmits the same to API coordinator XBEE.Both XBEEs are doing their jobs, and they are doing it fine.But when i try to upload new parameters in to XBEE using XCTU, a new window pops up saying "Unable to communicate with modem".i used libelium shield, Arduino 2560 to establish connection between XCTU,XBEE.

Friends i have tried to troubleshoot it using a lot of methods, trust me i have been checking on net scinde seven days.I can't assume any hardware problem because the same problem repeated with 3 XBEEs.Now i have 3 XBEEs which doesn't work properly.

My boss wants some immediate results.Plz guys i need some real help here!!!!!

thanks very much in advance.

hay i just had an xbee that was new and it always came up with the Unable to communicate with modem" message on the XCTU program. i was using an arduino duemilanove with no chip init > xbee shield > V1 xbee could not get it working but my other 2 xbees worked great so i tryed the usb adapter board still the message came up so i put a pumper wire on the xbee pins rest and GND and it WORKED.
The program it read was not the defult so i programd the same as my others so now i have 3 working xbees :slight_smile:

Tansmiter

  Serial.print(sensorValue);

This converts the value to a string, like "780", and sends it to the serial port.

Reciver

  if (Serial.available()){ 
     char getData = Serial.read();  
     lcd.setCursor(0, 1);
     lcd.print("DEC");
   }

This reads one character from the serial port, displays something else on the LCD, and throws the serial data away.

Well, OK, if that's what you want. Hardly seems reasonable to me, but, what do I know. It's not my project.

Thanks ok well im new to the xbee thing so any help would be great what would you do to send anaglog to a reciver and display that onto a LCD

I came up with this lastnite for a DHT temperatur humidity Sensorfor the transmitter it works realy good tansmiting to xbee usb adapter board to com window but how to get that to display onto Arduino and LCD Reciver Code not sure on?
And sending An H or L from the com turns led13 on and off that works.
is there a better way on doing this for the reciver. Can anyone help me on the reciver code for lcd display im not getting much luck :astonished: :cold_sweat:

#include "DHT.h"
#include <Wire.h> 

#define DHTPIN 2     // what pin we're connected to

#define DHTTYPE DHT11   // DHT 11 

DHT dht(DHTPIN, DHTTYPE);

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

void loop() {
  
  // Reading temperature or humidity takes about 250 milliseconds!
  // Sensor readings may also be up to 2 seconds 'old' (its a very slow sensor)
  float h = dht.readHumidity();
  float t = dht.readTemperature();

    Serial.println(" ");
    Serial.println(" ");
    Serial.println("XBEE NETWORK SERVER");
    Serial.println("ONLINE: OK");
    Serial.println(" ");
    Serial.print("Humidity:"); 
    Serial.print(h);
    Serial.print(" %");
    Serial.println(" ");
    Serial.print("Temp:"); 
    Serial.print(t);
    Serial.print(" C");
    Serial.println(" ");
    delay(3000); 
    
    
   while(Serial.available()){  //is there anything to read?
	char getData = Serial.read();  //if yes, read it

	if(getData == 'h'){
  	  digitalWrite(13, HIGH);
          Serial.println("LED ON");
          
	}else if(getData == 'l'){
  	  digitalWrite(13, LOW);
          Serial.println("LED OFF");
        }  
  }
}