this TIMER is disabled and/or has not expiredĠ, 500ul, ENABLED/DISABLED, YES/NO //.Time. If (TimerFlag = ENABLED & millis() - Time >= Interval) is this TIMER enabled and has this TIMER expired ? fuction to check if the TIMER is enabled and check if the TIMER has expired Unsigned long Interval //delay time in ms which we are looking forīool TimerFlag //is the TIMER enabled ? ENABLED/DISABLEDīool Restart //restart this TIMER ? YES/NO Unsigned long Time //when the TIMER started See if you can work your way through the sketch.Īsk questions if you don't fully understand things.Ĭlosing a switch on pin #2 starts pump action. I'm really passive and don't want to argue with this guy for weeks over it and i'm also too ignorant about it all to be able to back up my argument for using millis. I also want the LCD to continue to display sensor data during flooding and draining phases. And is insanely accurate which I don't really need either. Is this possible? From what I read it just changes a state, not necessarily calling up another function. From searching this forum and reading stuff online, It doesn't seem to be what I need.Ĭan I get some confirmation on this? I think his idea would be during the day time hours, the interrupt would trigger the pumping time, then stop after 15 mins and then when a couple hours passed for draining, would trigger again. He introduced this idea on Friday to me and was really weirdly insistent. One of the tutors who has been helping me out reckons I should use Interrupts, but it is so esoteric to me just looking at the code. I was planning on going with millis because delay shuts everything off. The water level will kill the pump if there's no water to keep it submerged. During pumping, the heater turns off, peristaltic dosing pumps are off, and water level sensor is still checking if there is water in the main reservoir, every 5 seconds. My idea for the auto function (which I'm still figuring out) is when activated from the menu, it runs through a function which will turn the water pump on for 15 mins, maybe 3 times a day depending on which plants, then be off and overnight with only the water heater going, and maybe a nutrient peristaltic pump. So far I have been working on the manual aspects with an LCD screen, buttons, sensors (temp, EC, water level). There is an LCD display which will have manual options (turn pump on/off, turn heater on/off, etc) then an auto function can be called to start the hydro set up for however long that might be, say 6 weeks. I'm working on a very simple ebb and flow hydroponics set up. Just started learning Arduino in the last few months. I'm studying power systems engineering (technician) but doing some fun stuff on the side. Obviously new to Arduino and programming in general.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |