Skip to content

Instantly share code, notes, and snippets.

@lvidarte lvidarte/sketch.ino
Created Dec 26, 2014

Embed
What would you like to do?
Mini Servo sg90
#include <Servo.h>
#define SERVO_PIN 9
Servo myServo;
byte i;
void setup()
{
Serial.begin(57600);
myServo.attach(SERVO_PIN);
}
void loop()
{
while (Serial.available() > 0) {
i = Serial.read();
myServo.write(i);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.