I can ues my xbee on arduino uno very well.
but i canot use it on arduino yun for the same code.
// Analog input pin that the potentiometer is attached to
// value read from the pot
String val = "";
void setup() {
// initialize serial communications at 9600 bps:
Serial.begin(9600);
}
void loop() {
if(Serial.available()>0){
val+= char(Serial.read());
delay(100);
Serial.println(val);
Serial.flush();
val="";
}
}