hello friends :
i,m trying to send potentiometer data form arduino UNO to another arduino UNO using xbee S2"zigbee"
This is a send code :
int val;
void setup() {
Serial.begin(9600);
}
void loop() {
val= analogRead(A0);
Serial.println(val);
delay(10);
}
Reciver:
int PotData; // a variable to read incoming serial data into
void setup() {
// initialize serial communication:
Serial.begin(9600);
}
void loop() {
if (Serial.available() > 0)
{
PotData = Serial.read();
Serial.println(PotData);
}
}
this is my first using Xbee s2
what help that you suggest .
thanks