Xbee3 ADC readings

Hello,

I am trying to read an ADC signal sent from my XBee3 to my IX15. The signal is coming from the Ultrasonic Distance Sensor from Seeed, and it uses the XBee SMT Grove Development board. I have the cable connected from the sensor to the AD3 port of the board. The io_configuration for line DIO3_AD3 is set to ADC (although that gets set to PWM, as shown by get_io_configuration). When I use the read_io_sample method for remote devices on my ix15, I get a value of 0, 1 or 2, regardless of what the actual distance should be. Is there something I’m missing? I can’t seem to find any guides about how to use something like this.

Sounds like you are using the wrong ADC / port. May I suggest you use port 1 with its ADC line instead.

That helped, I switched ports and got values of 1023 instead. I realize this is because the grove device provides voltages 3.3V-5V, not 0-3.3V which the ADC reading takes. Thanks for the help