Xbee Api connection

Have you tried to set the sensor XBee to sample and send the data automatically? You can set up which pins to sample and at what rate you want them sampled.

wade