Skip to main content

Posts

Showing posts from December, 2015

Controlling the Servo Motor Using Potentiometer - Arduino

Hi, Today, we will try to control servo motors using potentiometer. And for doing these we will use Arduino as a micro controller. First of all we need some components for doing this job, here the list of needs :  Arduino Servo Motor Potentiometer Jumper Cables Stabilizing the servo motor also important, because of the changing of the angel sould seen by us. Other hand, we will examine  the potentiometer movement effect to servo motor. We can continue with connection:  For my code, connections would be as shown above. If you change the code - for digital  and analog pins- you can change connections depending on your code. After these connections, we can continue with Arduino code. In this code, we are using Servo.h library of Arduino, after the adding this library to our code we should determine our pins. One of them is in analog pins, second one is in digital pins. We are using analog pin for reading the resistance value of potentiometer, for