update version 02

Version 02 : Writing sensor data to database
Version 01: Keep sensor data in variable