Control servo using button


#1

hi,
i want to control my servo using pushbutton, but i’ve a problem with the code. anyone help me please ?? thanks


#2

sure! just paste your code here using “```cpp” in the beginning and “`` `” in the end.
and we will try to help you.

thing["Servo_Button"]<<[](pson in){
myservo.write(in?180:0);
}