'Authors: Matthew and Tom Fox 'Date: April 18, 2009 'Program name: SmartStat-Plus/08M source code 'Program version: 1.1 symbol K = W0 symbol ACHeat = B2 ACHeat = 0 'blink the LED at start up high 1 pause 1000 low 1 do 'AC Delay if pin3 = 1 and pin4 = 0 and ACHeat <> 1 then for K = 1 to 300 high 1 pause 500 low 1 pause 500 if pin3 = 0 then exit end if next K if pin3 = 1 then ACHeat = 1 high 1 high 2 end if end if 'Heat Delay if pin3 = 1 and pin4 = 1 and ACHeat <> 1 then for K = 1 to 40 high 1 pause 500 low 1 pause 500 if pin3 = 0 then exit end if next K if pin3 = 1 then high 1 high 2 ACHeat = 1 end if end if 'turn off AC or Heat if pin3 = 0 then ACHeat = 0 low 2 low 1 end if loop