Working with a Micro Servo

Working with a Micro Servo © GPL3+

This project demonstrates the use of a micro servo.

  • 571 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

Breadboard Diagram
Make Connections as shown in the figure.
Servo hmgbkdxu4z

Comments

Similar projects you might like

All About Servo Motors and Servo Motor Tester

Project tutorial by robocircuits

  • 479 views
  • 0 comments
  • 6 respects

Bluetooth Controlled Servo

Project tutorial by JANAK13

  • 9,392 views
  • 17 comments
  • 36 respects

Obstacles Avoiding Robot With Servo Motor

Project tutorial by Sora JY

  • 9,455 views
  • 3 comments
  • 26 respects

Micro Soldering Station

Project tutorial by Paulo Bruckmann

  • 15,737 views
  • 13 comments
  • 48 respects

Using Serial Monitor to Control Servo Motor

Project tutorial by Kub_Luk

  • 7,998 views
  • 9 comments
  • 36 respects

Servo WormGear

Project tutorial by Brijesh Singh

  • 2,985 views
  • 3 comments
  • 9 respects
Add projectSign up / Login