Fortunately, some kind folks have already made a nice library that we can use with the XBees on the arduino. The library is available on github.
Contributing authors:
Created by kluong on 2016/03/15 10:00.