Hello all, I am a newbie this is only my 3rd sketch. I try doing the research but I have a TBI and am just not as quick on the uptake as I used to be. Basically I am controlling a night light, a fan with external thermostat and a relay to override the thermostat. If it is low light and the LASER sensor is broken I want the light to come on for 10 mins. If it is above 80° (external thermostat) and the Laser sensor is broken it will turn on a fan. If it is below 80° and a button is pressed it will fire a relay that will override the thermostat for 10 mins. This sketch compiles but does not work, I need help fixing it. I have tried working with mills() timers with no luck. I have added to the sketch’s comments where I would like to add mills() timers. You will also notice the reference to LASER Mosfets in the sketch comments, I can’t figure out how to do multiple things with a single input so help here too if possible. It’s not like I haven’t tried, this is the 10th attempt at this sketch, I just can’t get it. THANKS FOR YOUR HELP, Mike…
I find it very hard to make sense of long paragraphs. This style is much clearer (for me at least)
Basically I am controlling a night light, a fan with external thermostat and a relay to override the thermostat.
If it is low light and the LASER sensor is broken I want the light to come on for 10 mins.
If it is above 80° (external thermostat) and the Laser sensor is broken it will turn on a fan.
If it is below 80° and a button is pressed it will fire a relay that will override the thermostat for 10 mins.
I have had a quick look at your code. It is very poorly formatted so I can't quickly make any sense of it. Use the Auto-Format option in the Arduino IDE and post the tidied up version.
Thank all you for your help. The sketch is working now. Here is a copy of the finished sketch. If anyone sees anything else to improve it let me know…Thanks again, Mike Now