Isaac Nolt
Published © LGPL

How to Control a Servo

A quick project of how to control a servo.

BeginnerProtip30 minutes1,085
How to Control a Servo

Things used in this project

Hardware components

Arduino UNO
Arduino UNO
×1
Male/Male Jumper Wires
×1
SG90 Micro-servo motor
SG90 Micro-servo motor
×1

Software apps and online services

Arduino IDE
Arduino IDE

Story

Read more

Code

servo control

C/C++
copy and paste it onto the IDE.
#include <Servo.h>
Servo myservo;

void setup() {
  myservo.attach(7);
}

void loop() {
  myservo.write(180);
  delay(5000);
  myservo.write(0);
  delay(5000);

}

Credits

Isaac Nolt
5 projects • 3 followers
I'm at home and currently breathing. Check out my Youtube channel and subscribe at https://www.youtube.com/channel/UCRFGSJgj24tFT080VDW1hLw/
Contact

Comments

Please log in or sign up to comment.