how to control servo motor with a push button Arduino













YOUR LINK HERE:


http://youtube.com/watch?v=zKALyCyfv5E



#include (use angled brackets)Servo.h(use angled brackets) • Servo Myservo; • int pos=0; • void setup() • { • pinMode(2,INPUT); • Myservo.attach(3); • } • void loop() • { • if(digitalRead(2)==LOW){ • Myservo.write(180); • } • else • • Myservo.write(0); • }

#############################









Content Report
Youtor.org / YTube video Downloader © 2025

created by www.youtor.org