Jun-24-2018, 12:17 PM
Snippsat,
Thank you so much, it works
Thank you!!
I can see why you are administrator
The next step is GPIO
REGARDS
Paul
Thank you so much, it works
#! bash/bin/python3 def read_sensor(sensorID): tempfile = open("/sys/bus/w1/devices/"+ sensorID +"/w1_slave") thetext = tempfile.read() tempfile.close() tempdata = thetext.split("\n") [1].split(" ")[9] temperature = float(tempdata[2:]) temp_sensor = temperature / 1000 return (temp_sensor)And:
from mySensorModule import read_sensor from mySensors import sensorsID import time # accessing a dictionary: dict_name[key] = value sID1 = sensorsID['solar_panel'] sID2 = sensorsID['cyl_bottom'] x = 5 while 1: read_sensor(sID1) + x > read_sensor(sID2) print("it's Hot!") time.sleep(1) else: print("Got it wrong again Dad")prints "it's hot"
Thank you!!

I can see why you are administrator

The next step is GPIO
REGARDS
Paul