init: pause 1000 serout 0, N2400,(253,9,"00:02:00 ") pause 1000 setint %00000001,$0000001 ;this program reads the inputs and outputs them to the outputs main: pause 1000 inp0: readadc 0,b0 ;this reads the potentiometer if b0<100 then inp1 sound 2, (50,50) inp1: readtemp 1,b1 ; this reads digital temp probe 1 if b1<22 then inp2 sound 2, (200,50) inp2: readtemp 2,b2 ; this reads digital temp probe 2 if b2<22 then inp3 sound 2,(800,50) inp3: let b3=pins ;let pins=pins ; read all digital inputs to outputs inp4: readadc 4,b4 ; if switch is down this is Light Dependent Resistor LDR debug b0 count 3, 5000, w4 ;count pulses on input 3 for five seconds into variable w4 pause 1000 serout 0,N2400,(254,1) ; go to start of line 1 pause 1000 serout 0,N2400,(#b0," ",#B1," ",#B2," ",#b3," ",#b4) ;output both temperatures pause 1000 serout 0,N2400, (0) ; update time in line 2 pause 1000 high 1 ;flash all the outputsone at a time pause 500 low 1 high 2 pause 500 low 2 high 3 pause 500 low 3 high 4 pause 500 low 4 high 5 pause 500 low 5 goto inp0 interrupt: ;this gets run every 2 minutes play 2, 0 ;play happy birthday ;on port 2 setint %00000001,$0000001 set up for next interupt