I am creating a project with Arduino Uno and some other parts such as:
- Mg996r servo1 (connected to a elevator system)
- Mg996r servo2 (connected to a rotating tap)
- a 4 channel relay that is connected to 4 vacuum pumps
- Momentary switch x4
The problem I am having is I need the following actions to happen in this order:
button activated(1-4) -> servo1 activated for a certain amount of rotations -> servo2 activated for around 70 degrees -> pump is activated(1-4, depending on the button I chose) -> servo 2 activated back to 0 degrees -> servo1 activated for a certain number of rotations.
Another problem on how to activate different parts of the code depending on the button you pressed (same code except a different pump will fire).
I expected to be able to control the program through buttons (press a button, certain part of program is activated).