Hi, im student and i want to get some help for my project
the problem like this
temp<29C until temp <35C; the bulb ON
if temperature>35C until temperature >29C ; the bulb will OFF
anyone hv some idea to solve this?
Printable View
Hi, im student and i want to get some help for my project
the problem like this
temp<29C until temp <35C; the bulb ON
if temperature>35C until temperature >29C ; the bulb will OFF
anyone hv some idea to solve this?
That seems to make little sense.
It sounds like a bulb (heater) will turn on at any temp less than 29 deg,
and stay on until temp is over 35 degrees?
Code:
var byte temp = 29
var bit bulb = 0
cycle:
(check temperature here)
if bulb = 0 then
if temp < 29 then
bulb = 1
endif
else
if temp > 35 then
bulb = 0
endif
endif
goto cycle