Working with a Micro Servo

Working with a Micro Servo © GPL3+

This project demonstrates the use of a micro servo.

  • 10,709 views
  • 1 comment
  • 9 respects

Components and supplies

Apps and online services

About this project

This Project Demonstrates the use of Micro Servo with Arduino.

Working with Micro Servo

Code

Code: Micro ServoArduino
This program instruct the Servo to rotate smoothly from 0 to 120 degrees
#include <Servo.h>

int i = 0;

int j = 0;

int k = 0;

Servo servo_3;

void setup()
{
  servo_3.attach(3);

}

void loop()
{
  for (i = 0; i <= 120; i += 1) {
    servo_3.write(i);
    delay(50); // Wait for 50 millisecond(s)
  }
  for (k = 120; k >= 0; k -= 1) {
    servo_3.write(k);
    delay(50); // Wait for 50 millisecond(s)
  }
}

Schematics

Circuit Diagram
Working with micro servo motor qhp7mnzfit
Schematic Diagram
Working with micro servo motor 5dupbzskis
Breadboard Diagram
Make Connections as shown in the figure.
Working with micro servo motor xucy3jwveg

Comments

Similar projects you might like

All About Servo Motors and Servo Motor Tester

Project tutorial by RoboCircuits

  • 8,080 views
  • 1 comment
  • 15 respects

Working with Shift Register

by SUMAN BARGAV R

  • 10,131 views
  • 4 comments
  • 10 respects

Servo Motor Control with Remote

Project showcase by Alfa

  • 26,050 views
  • 3 comments
  • 40 respects

Servo Motor Interface with Arduino Uno

by Akshay Joseph

  • 21,740 views
  • 7 comments
  • 29 respects

Bluetooth Controlled Servo

Project tutorial by JANAK13

  • 51,180 views
  • 27 comments
  • 68 respects

Using Serial Monitor to Control Servo Motor

Project tutorial by Kub_Luk

  • 41,966 views
  • 13 comments
  • 44 respects
Add projectSign up / Login