I'm working on a robotic gripper which has two servos. I want to use a Wii Nunchuck to move those servos. I want to move one servo by pressing a button on the Nunchuck ( i don't care if it's the Z or the C button), and I want to move the other servo with the X axis of the joystick. For the first servo, I need it to rotate 180º while the button is pressed, and return to the original position when you stop pressing the button. How would you do that? Thanks!
Pd: sorry for my bad english :P
What I have tried:
I've tried lots of codes online, but i havn't found any code that uses a button to move a servo