jppostKW
Well-Known Member
I am building a temp controller for the new version of my keezer with a prelim thread here https://www.homebrewtalk.com/f51/keezer-build-prelim-156315/
I am planning on building a picaxe 08m based thermostat that will turn the comp on and off at a programed temp using a ssr and a Dallas 1wire dsb1280 i have been working on the code today. this is what i have so far it runs in the simulator but i dont know if i have any glaring problems or whether i can clean it up at all?
I am planning on building a picaxe 08m based thermostat that will turn the comp on and off at a programed temp using a ssr and a Dallas 1wire dsb1280 i have been working on the code today. this is what i have so far it runs in the simulator but i dont know if i have any glaring problems or whether i can clean it up at all?
Code:
symbol counter = b1
Symbol TempC_100 = W3
Symbol DevNum = W6
Symbol Temp_8 = B9
Symbol HighTrip = 66 '(42.8F) ' 6 + 60 - adjust as necessary
Symbol LowTrip = 64 '(39.2F) ' 4 + 60
low 0 'set unused pin
high 2 '(status LED on)
pause 600
low 2
Top:
high 2 ' read is in progress (power/activity light)
ReadTemp 1, Temp_8 ' read the high 8 bits
low 2
Temp_8 = Temp_8 + 60 ' to avoid negative numbers
If Temp_8 >= HighTrip Then OperateRelay
if Temp_8 < LowTrip then continue
continue:
If Temp_8 < LowTrip Then ReleaseRelay
' else
Goto SequenceDone
OperateRelay:
High 4
Goto SequenceDone
ReleaseRelay:
Low 4
Goto SequenceDone
SequenceDone:
Pause 500
GoTo Top