Created
March 3, 2018 18:15
-
-
Save iotguider/256b76a30553315012d2be84426d8f7f to your computer and use it in GitHub Desktop.
Code for interfacing servo motor with Arduino
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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