Pages: 1 [2]   Go Down
Author Topic: Implementing a compressor start delay for fridge control  (Read 2449 times)
0 Members and 1 Guest are viewing this topic.
New Jersey
Online Online
Faraday Member
**
Karma: 70
Posts: 3732
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

This would be a good candidate for a state machine - there are plenty of examples in the forums. However, you probably don't want to rejig your entire sketch just for this change.

So, replace the if that implements "ALL OFF" with two separate ifs. One checks that heater is on and temp > setpoint and turns it off. The other handles the fridge.
Logged

0
Offline Offline
Jr. Member
**
Karma: 0
Posts: 71
Arduino rocks
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

thankyou, i might investigate state machines all the same, might work out tidier in the end
Logged

Pages: 1 [2]   Go Up
Jump to: