code to read data in from temperature sensors and store them in a postgres database