There are two demo code in this project, both of them are about a button and a servo, the theory are the same, the faster button you pressed, the more quickly the servo move.
And the two project is based on Arduino UNO board.
Base on the button fast project, I made another project, that named candy machine, press the button until to a limit, the candy will flow out. The machine is just as the below picture shows.
And of course: