Xbee Pro XSC

ok, regardless if your using a button or not, if you want to send data from the master to the slave you need to Serial.Write it otherwise the slave will get the wrong data.

also that -49 is just (-'0'), there is no incoming data so data = data-'0'; is going to produce -49 everytime.