Total newbie to Arduino coding but like many I have an idea that I'd like to implement but I can't figure out if an Arduino is totally necessary and if so what the coding for it will be.
The vision: pretty simple really. I want a micro switch, that activates once a container lid is opened, which then triggers a 5v pump to run for a set amount of time. Let's say 5 seconds. The pump turns off and won't activate again until the lid is opened again. Closing the lid will not activate anything.
The question: is an Arduino necessary? Can I run the pump straight off the board? Is an "if, then" expression the best way to go about coding this?
Again total noob here so any help is appreciated.