XBee library adapted for Spark