@@ -0,0 +1,972 @@
+# (c) Jay Janarthanan 2015.%0A%0A# http://jay.appavate.com%0A%0A# You can use the code below freely under a GNU license.%0A%0A %0A%0Aimport os, glob, time, sys, datetime%0A%0A %0A%0A#initiate the temperature sensor in Parasitic mode%0A%0Aos.system('sudo modprobe w1-gpio pullup=1')%0A%0Aos.system('sudo modprobe w1-therm strong_pullup=1')%0A%0A %0A%0A#set up the location of the sensor in the system%0A%0Adevice_folder = glob.glob('/sys/bus/w1/devices/28*')%0A%0Adevice_file = %5Bdevice_folder%5B0%5D + '/w1_slave'%5D%0A%0A %0A%0Adef read_temp():%0A%0A    f = open(device_file%5B0%5D, 'r')%0A%0A    line = f.readline()%0A%0A    crc = line.rsplit(' ',1)%0A%0A    crc = crc%5B1%5D.replace('%5Cn', '')%0A%0A    if crc=='YES':%0A%0A      line = f.readline() %0A%0A      mytemp = line.rsplit('t=',1)%0A%0A    else:%0A%0A      mytemp = 99999%0A%0A    f.close()%0A%0A    %0A%0A    return int(mytemp%5B1%5D)%0A%0A    %0A%0A %0A%0Awhile True:%0A%0A    temp = read_temp() %0A%0A    print(temp)%0A%0A    if(temp == %2299999%22 or temp == %2285000%22):%0A%0A        print(%22ERROR: Please check your sensor%22)%0A%0A    time.sleep(1) #wait 1 minutes%0A%0A %0A%0A

Create temp.py