Working with a Micro Servo

Working with a Micro Servo © GPL3+

This project demonstrates the use of a micro servo.

  • 801 views
  • 0 comments
  • 8 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

  • 2,280 views
  • 1 comment
  • 8 respects

Working with Shift Register

by SBR

  • 3,558 views
  • 2 comments
  • 8 respects

Servo Motor Control with Remote

Project showcase by Electronic Clinic

  • 3,623 views
  • 1 comment
  • 19 respects

Bluetooth Controlled Servo

Project tutorial by JANAK13

  • 20,495 views
  • 21 comments
  • 44 respects

Obstacles Avoiding Robot With Servo Motor

Project tutorial by Sora JY

  • 11,753 views
  • 3 comments
  • 28 respects

Servo Motor Artwork

Project tutorial by Doug Domke

  • 9,659 views
  • 20 comments
  • 65 respects
Add projectSign up / Login