There are good API examples that come with the XBee library. I won't kid you, there is a learning curve, but it looks the worst from the foot of the hill and it pays off big time once you're up and through it. Start simple and slow. Seriously the examples are good. Just send "Hello world" or whatever. Be sure to get the
doc files for the library. The library is extensive, there is an object model to learn. That's how I learned though, mostly from the examples that come with the library and a fair amount of time in the doc files, which I continue to refer to. Oh and don't forget the XBee
product manual, I always have that near.
I'm the first to admit that I am a huge API-mode bigot, but once you're there, AT mode just seems super clunky. Having to send +++ then wait etc. etc. seems sooo inefficient. Being able to just code the destination address into a packet and send it is indispensable for multi-node networks. With AT mode, it would again require getting into command mode, changing the DH and DL parameters, etc. etc. Ugh!
I've used pulseIn() to measure the PWM signal, and it works, but again it seems like the hard way to do it. Have to dedicate an MCU pin and so forth. Seems much more straightforward to just ask the XBee and have it respond with the number!
OK I'm on a roll now. Sorry about that. Have fun, good luck!