Skip to content

Instantly share code, notes, and snippets.

@AbhishekGhosh
Created November 3, 2015 05:06
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Save AbhishekGhosh/dc182158fe50a4c87d5c to your computer and use it in GitHub Desktop.
Servo Motor Arduino (Basic)
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