I am pretty new to Arduino. For my first project I would like to control a motor with 2 switches. Imagine a motor with paddles that push marbles into a funnel attached to the top of a tube. I want the motor to run until the tube is full, then stay off until the level falls to a certain level. Similar to an automatic water tank fill.
Tube full = top and bottom switches both pushed = motor off
Tube partial full = top switch not pushed, bottom switch pushed = motor off
Tube empty= neither switch pushed = motor on
I know this is possible, but I’m not sure exactly how to do it. I’ve written a sketch(my first attempt), but I’m fairly certain it is completely messed up and won’t work. It compiles just fine and everything, but it seems over-complicated. Is anyone willing to look it over for me? I attached the .ino file just in case.
Thanks in advance for looking it over!
Case_Feeder.ino (4.8 KB)