Having trouble to drive Servo motor with Arduino Uno SMD? Get perfect solution now...

Having trouble to drive Servo motor with Arduino Uno SMD? Get perfect solution now…

This entry is part 9 of 9 in the series Arduino Tips & Tricks

I was wondering that why my following code works fine on Arduino Uno R3 (DIP) to drive Servo motor but not on Arduino Uno SMD!

Actually it is a simple and basic code to drive servo motor with Arduino Uno SMD, but doesn't work! Almost everyone must be facing this problem.

 #include<Servo.h>
 Servo myservomotor;
 void setup()
 {
   myservomotor.attach(3);
 }
 void loop()
 {
   myservomotor.write(0);
   delay(1000);
   myservomotor.write(45);
   delay(1000);
   myservomotor.write(90);
   delay(1000);
 }

I did lots of permutations and combinations while working on this simplest project of Servo motor with Arduino.

But no luck! When I tried a lot I finally got the solution...!

Signup or Login to view remaining content. It's Completely Free!
Share on your network!
Dattaraj Vidyasagar
Dattaraj Vidyasagar

Author on this website. He is veteran of Core Electronics since last 36+ years. ATL Mentor of Change, Niti Ayog, Govt. of India, Google Certified Educator, International Robotics Trainer and author of 18 books on electronics, robotics, programming languages and web designing... ➤➤

Leave a Reply

Your email address will not be published. Required fields are marked *