1 ' 2 ' This program is to be used with the temperature sensor circuit shown in the 3 ' Primer Applications Manual. 4 ' 10 INTEGER X,TEMP,BASETMP,ANALOG,MAXANL,LOWTEMP,HITEMP 20 REAL DEGREE 30 X = KEY :! get any stray key that might have been pressed 40 MAXANL=ADCIN(0) 50 PRINT "Turn VR1 until value stops increasing, then press a key "; MAXANL 60 IF KEY = 0 THEN GOTO 40 :! loop until a key is pressed 70 PRINT "Enter the present room temperature" 80 INPUT BASETMP 90 PRINT "Enter the low limit temperature where you want the LEDs to turn on." 100 INPUT LOWTEMP 110 PRINT "Enter the high limit temperature where you want the LEDs to turn off." 120 INPUT HITEMP 130 ANALOG=MAXANL - ADCIN(0) 140 DEGREE=ANALOG * 1.232 150 TEMP = BASETMP + DEGREE 160 IF TEMP >= HITEMP THEN PTAOUT $FF 170 IF TEMP < LOWTEMP THEN PTAOUT 0 180 PRINT TEMP 190 GOTO 130