Bonzo,
Try searching xbee here in the forum, You should find plenty of code. You may need to change some for firmware changes and different pin layouts.
Also have a look at http://examples.digi.com/ it has a lot of good examples of things that you can do with xbees
Chuck