Created
March 1, 2018 06:37
-
-
Save esmarr58/985a8402cd51ed95e27e9cac0eadad2d to your computer and use it in GitHub Desktop.
This file contains 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> | |
int angulo = 0; | |
Servo motor1; //Agregar un objeto servo | |
void setup() { | |
motor1.attach(3); | |
} | |
void loop() { | |
motor1.write(angulo); | |
delay(100); | |
angulo++; | |
if(angulo>180) angulo = 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment