Hi! I'm fairly new to Arduino and still trying to learn the ropes. I have a project where I am trying to mimic a hotel door, in that it will only allow 4 people in at a time. I want to be able to press a button, have the sweep function occur on a servo motor after the button press, and I want the program to count up (baseline of 0, maximum of 5). Once it reaches the 5th button press, I want the servo to NOT work. I'd also need ANOTHER button to "leave the room", aka subtract from the number that is being counted (as if someone had left the room).
I'm not sure exactly what codes would be best to use. I've been looking through examples but am having a hard time parsing what sorts of codes to use to create this system.
I'd really appreciate any help and if you have any questions, please let me know.