Added code

Used Some source from Weather and Accelerometer demo apps.