Building the "Servo" example included within the Arduino

/* Sweep
by BARRAGAN <http://barraganstudio.com>
This example code is in the public domain.

modified 8 Nov 2013
by Scott Fitzgerald
http://www.arduino.cc/en/Tutorial/Sweep
*/

#include <Servo.h>

Servo myservo; // create servo object to control a servo
// twelve servo objects can be created on most boards

int pos = 0; // variable to store the servo position

void setup() {
myservo.attach(9); // attaches the servo on pin 9 to the servo object
}

void loop() {
for (pos = 0; pos <= 90; pos += 1) { // goes from 0 degrees to 90 degrees
// in steps of 1 degree
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(5); // waits 15ms for the servo to reach the position
}
for (pos = 90; pos >= 0; pos -= 1) { // goes from 90 degrees to 0 degrees
myservo.write(pos); // tell servo to go to position in variable 'pos'
delay(5); // waits 5ms for the servo to reach the position
}
}

Login to post a comment...

JEFke 2 months, 1 week ago

YEET

alumnoeso 2 months, 2 weeks ago

holaaaaa

alumnoeso 2 months, 2 weeks ago

fora auricularsssssssssssssssssssssssss

alumnoeso 2 months, 2 weeks ago

shell shokers

alumnoeso 2 months, 2 weeks ago

cullet de sant marti

alumnoeso 2 months, 2 weeks ago

coll brot

alumnoeso 2 months, 2 weeks ago

A

alumnoeso 2 months, 2 weeks ago

A

alumnoeso 2 months, 2 weeks ago

A

alumnoeso 2 months, 2 weeks ago

A

alumnoeso 2 months, 2 weeks ago

que te pasa a ti cabeza huevo

alumnoeso 2 months, 2 weeks ago

HIJO DE PUTA

alumnoeso 2 months, 2 weeks ago

iniesta mmv

alumnoeso 2 months, 2 weeks ago

CABEZON

alumnoeso 2 months, 2 weeks ago

GOL DE CABEZA

alumnoeso 2 months, 2 weeks ago

GOL DE CABEZA

alumnoeso 2 months, 2 weeks ago

GOL DE CABEZA

alumnoeso 2 months, 2 weeks ago

GOL DE CABEZA

alumnoeso 2 months, 2 weeks ago

GOL DE CABEZA

alumnoeso 2 months, 2 weeks ago

GOL DE CABEZA

alumnoeso 2 months, 2 weeks ago

mejor el de noriel

alumnoeso 2 months, 2 weeks ago

quieres que te haga el peinado de anuuel??

alumnoeso 2 months, 2 weeks ago

NOS VAMOS TODOS?

alumnoeso 2 months, 2 weeks ago

CABESA

alumnoeso 2 months, 2 weeks ago

CABEZON

alumnoeso 2 months, 2 weeks ago

CABEZON

alumnoeso 2 months, 2 weeks ago

CABEZON

alumnoeso 2 months, 2 weeks ago

CABEZON

alumnoeso 2 months, 2 weeks ago

CABEZON

alumnoeso 2 months, 2 weeks ago

CABEZON

alumnoeso 2 months, 2 weeks ago

CABEZON

alumnoeso 2 months, 2 weeks ago

CABEZON

alumnoeso 2 months, 2 weeks ago

quiero sexo

alumnoeso 2 months, 2 weeks ago

quiero sexo

alumnoeso 2 months, 2 weeks ago

quiero sexo

alumnoeso 2 months, 2 weeks ago

a la puta calle

alumnoeso 2 months, 2 weeks ago

a la puta calle

alumnoeso 2 months, 2 weeks ago

a la puta calle

alumnoeso 2 months, 2 weeks ago

a la puta calle

alumnoeso 2 months, 2 weeks ago

a la puta calle

alumnoeso 2 months, 2 weeks ago

a la puta calle

alumnoeso 2 months, 2 weeks ago

a la puta calle

alumnoeso 2 months, 2 weeks ago

a la puta calle

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

bebesitaa be be lo de nosotros es un secreto que nadie se entere

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

chimpaaaaaaaa

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

FORA AURICULARS

alumnoeso 2 months, 2 weeks ago

sms

alumnoeso 2 months, 2 weeks ago

ME CAGO EN DIOS

alumnoeso 2 months, 2 weeks ago

ME CAGO EN DIOS

alumnoeso 2 months, 2 weeks ago

ME CAGO EN DIOS

alumnoeso 2 months, 2 weeks ago

ME CAGO EN DIOS

alumnoeso 2 months, 2 weeks ago

vinga xavals

alumnoeso 2 months, 2 weeks ago

vinga xavals

alumnoeso 2 months, 2 weeks ago

no te vuelbo a avisar

alumnoeso 2 months, 2 weeks ago

no te vuelbo a avisar

alumnoeso 2 months, 2 weeks ago

tuuu d1

alumnoeso 2 months, 2 weeks ago

hijoo de puta

alumnoeso 2 months, 2 weeks ago

shell shokers

alumnoeso 2 months, 2 weeks ago

a la puta calle

alumnoeso 2 months, 2 weeks ago

chavales le hacemos alguna olla al profe?

alumnoeso 2 months, 2 weeks ago

rubennnn tanca el mobilll

alumnoeso 2 months, 2 weeks ago

farem coses novesss

alumnoeso 2 months, 2 weeks ago

fora cascus

alumnoeso 2 months, 2 weeks ago

profeeeeeee aixo es de dawns

alumnoeso 2 months, 2 weeks ago

tanca el joc

alumnoeso 2 months, 2 weeks ago

deixa els auriculars!

alumnoeso 2 months, 2 weeks ago

vaya puta mierda

alumnoeso 2 months, 2 weeks ago

fora movil

alumnoeso 2 months, 2 weeks ago

shiitt menuda mierdaaaaaaaaaaaaaaaaaa