added xbee.c from https://athena.ecs.csus.edu/~bransone/pub/code/xbee.c