Example code for TI SensorTag http://goo.gl/w10bP0