Akshay Joseph
Published © GPL3+

Servo Motor Interface with Arduino Uno

In this article we discuss about how to Servo motor interface with Arduino Uno

BeginnerProtip4,843
Servo Motor Interface with Arduino Uno

Things used in this project

Hardware components

Arduino UNO & Genuino UNO
Arduino UNO & Genuino UNO
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1
UTSOURCE Electronic Parts
UTSOURCE Electronic Parts
×1
Jumper wires (generic)
Jumper wires (generic)
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Schematics

Arduino Uno with one Servo Motor

Code

Arduino Uno with Servo Motor

Arduino
Connect the servo signal pin to Arduino Pin 3
#include<Servo.h>
Servo Myservo;
int pos;
void setup()
{
Myservo.attach(3);
}

void loop()
{
  
  
for(pos=0;pos<=180;pos++){
Myservo.write(pos);
delay(15);
}
  delay(1000);
  
  for(pos=180;pos>=0;pos--){
Myservo.write(pos);
delay(15);
}
  delay(1000);
  
}

Credits

Akshay Joseph

Akshay Joseph

22 projects • 58 followers
B.Sc. Electronics Student at Govt. College Tanur

Comments