Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save iotguider/256b76a30553315012d2be84426d8f7f to your computer and use it in GitHub Desktop.
Save iotguider/256b76a30553315012d2be84426d8f7f to your computer and use it in GitHub Desktop.
Code for interfacing servo motor with Arduino
#include <Servo.h>
// Create a servo object
Servo servo;
void setup() {
Servo1.attach(8); //Attaches servo to digital pin 8
}
void loop(){
// Make servo go to 90 degrees
servo.write(90);
delay(1000);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment