How to acquire data from certain pin of UNO using xbee?

Hi, folks I’m playing with xbee on arduino uno. Now I'm confused with how I can set to acquire data (digital or analog) from certain pin of uno. I know the principles of how xbee transmit data. If you can help me answer the question above, I will appreciate it. Best regards Jingbo

The XBee can't get data from the Arduino. The Arduino has to send data to the XBee. That is done using the TX and RX pins of the XBee.

Specifically, what is the Arduino supposed to tell the XBee? The state/value of which pins? In binary or ASCII? What is the XBee supposed to do with the data?

Hi, PaulS, Thanks for your kind reply. I want to use soil moisture sensor to measure soil water content. Now I connect arduino with xbee, sd card and sensor. Thus the Arduino is supposed to send soil water content which is the value of analog pin in ASCII to xbee. Then the xbee communicates with another xbee which send data to the second arduino to record in sd card. How can I work it out? Sometimes I also use one arduino to acquire digital and analog data at the same time. For this reason, What should I do? Best regards Jingbo

Thus the Arduino is supposed to send soil water content which is the value of analog pin in ASCII to xbee.

So, what is the problem? Serial.print() or Serial.println().