Trying to get push button code and how to involve it with servos

Hi! I need help with a school project. I need code for a push button (which I've never used before) and how when the button is pressed, a servo moves for a certain amount of time. Thanks!

Get an Arduino and a button. Find the simple example in the Arduino examples for a button. Read the code to find which pin to wire the button to (and ground). Upload the code to the Arduino and try it out.

Thanks! I found the code and was able to find out. The code for it is down below. The thing is, I couldn’t find anymore code to add the servos in too.

Button.ino (1.13 KB)