# Can I directly read an analog sensor data from the Xbee's ADC?

I've posted this on the main StackOverflow and was suggested to post this here:

By rule of thumb, I've searched at least 10 different sources for my question before coming here.

My question is: if I have a Raspberry Pi that is connected via UART communication to an Xbee with a connected analog sensor (say IR distance sensor), can I read the sensor data directly from the Xbee on the UART communication?

The only sources I can find only address an Xbee collecting the sensor data and then sending it over the RF signal to another Xbee. None of the sources seem to explicitly address the Xbee acting as an ADC for my Raspberry Pi target.

• I don't see why you should not be able to do it. The Xbee reads the ADC, and sends the data to your Raspberry Pi over the UART channel. Of course, you need the appropriate software on both, the Raspberry Pi and the Xbee, to accomplish it. Oct 27, 2017 at 8:34

Example (Transparent Mode):