Created
November 3, 2015 05:06
Servo Motor Arduino (Basic)
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
int servopin = 4; | |
int pulse = 1500; | |
void setup () | |
{ | |
pinMode(servopin, OUTPUT); | |
Serial.begin(9600); | |
} | |
void loop() | |
{ | |
digitalWrite(servopin, HIGH); | |
delayMicroseconds(pulse); | |
digitalWrite(servopin, LOW); | |
delay(20); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment