Re: Servo controlled by Button


I have quite a similar project that I am struggling with. I'm completely new to Arduino and would like to make a circuit that uses two servos that are controlled by a push button. When the button is pressed the first time, the servo will move up about 45 degrees and when the button is pressed a second time it will move back to its original position. I'm trying to accomplish this while at the same time using the least amount of space I possibly can as the circuit will be placed inside of a costume I'm working on and I require maximum space. If anyone can please help me with this I would greatly appreciate it. Thank you for your time and have a great day.

I've suggested to the mod that this be split to a new thread.

Apart from that, welcome and good luck.

If anyone can please help me with this

Help means "you go first"- not being funny, but it works best if you post your code so far, explaining what's working and not working, then you'll get help to fix it.

Also need clarity: you talk of 2x servos but then only move "the" servo. Do they both move together or what?

Have you worked through the examples here and in the IDE File > Examples? There are a couple of servo ones, and you also need to look at the state change detect one to see how to treat button pushes.

@KyleFel22, please do not hijack.