ali_jamil:
if i can store value on receiver , there will be no problem to display on lcd
i cannot display on lcd if i dont have the value
any help about that
When you receive the data, you put the data in a variable. If you want more specific help, post your code properly, using CODE tags.
this is the code i have done
by this code i can display the value of temp sensor on lcd ( transmitter ) after that it send it by zigbee to display the value on serial monitor
now i hope u can help to create a code for (receiver arduino ) to display the temp value on receiver lcd :~
// include the library code:
#include <LiquidCrystal.h>
#define Analog A0 //Analog output of Temperature Sensor Module connected to A0
#define LED 13 //LED at D13 pin
// initialize the library with the numbers of the interface pins
LiquidCrystal lcd(12, 11, 5, 4, 3, 2); //assign the LCD interface pin
//Global variable
int AnalogValue = 0; //to store analog value
int dat;
void setup() {
Serial.begin(9600);//Set Baud Rate to 9600 bps
//setup the input or output pin
pinMode(LED, OUTPUT);
pinMode(Digital, INPUT);
pinMode(Analog, INPUT);
digitalWrite(LED, LOW); //off LED
// set up the LCD's number of columns and rows:
lcd.begin(16, 2);
// Print a message to the LCD.
lcd.print("Temperat");
lcd.setCursor(0,1);
lcd.print("Sensor");
delay(1000); //delay for 1 second
lcd.clear();
lcd.print("AN:");
}
void loop() {
AnalogValue = analogRead(Analog);
dat=(500*AnalogValue)>>10;
//display analog value from temperature sensor
lcd.setCursor(3, 0); //set LCD cursor to be after AN:
lcd.print(dat); //display the ADC value from AO of temperature sensor, this is not temperature in degree Celsius
lcd.print(" ");
delay(500); //clear the previous printed value if have
Serial.print("Tep:"); //Display the temperature on Serial monitor
delay(2000);
Serial.print(dat);
delay(500);
Serial.print("C"); //Display the temperature on Serial monitor
delay(500);
}
so what do u think i should do for receiver code ?
i think there is function like serial.avaiable or seral.read i should use it ,,,, something like that
ali_jamil:
i think there is function like serial.avaiable or seral.read i should use it ,,,, something like that
Have you tried any of the simple example code that typically comes with the hardware? This helps you verify that the hardware is working and gives you an idea on how to use it.
You take a ten bit number into a sixteen bit variable, multiply it by nearly a nine bit number, and then shift down ten bits?
I think I can see that going quite badly.