python code to read sensors and send data to SQL database