You are on page 1of 6

How to use Arduino. Quick Guide.

LuTec Costa Rica, 2012


Step 1( Paso 1) Primera Descargar la Arduino IDLE: http://arduino.cc/en/Main/Software First Download Arduino IDLE: http://arduino.cc/en/Main/Software

Step 2(Paso 2): Open the Arduino Folder and execute the program Abra la carpeta de arduino y ejecute el programa

Step 3(Paso 3): Then copy de code into de program. Copy the code from the .txt that a I send, is better, but if you didnt have it down here is the code. Code: //By Edward Uma;a Williams, LuTec, Costa Rica 2012 #include <Servo.h>

Servo myservo; // create servo object to control a servo // a maximum of eight servo objects can be created

int pos = 0; // variable to store the servo position int estado = 0; // se utiliza para que el servo solo se mueva una vez. void setup() { myservo.attach(9); // attaches the servo on pin 9 to the servo object pinMode(13, OUTPUT); }

void loop() { if(estado==0){ for(pos = 0; pos < 90; pos += 1) // goes from 0 degrees to 180 degrees { // in steps of 1 degree

myservo.write(pos); delay(15);

// tell servo to go to position in variable 'pos' // waits 15ms for the servo to reach the position

} myservo.detach();

delay(1000);

myservo.attach(9); for(pos = 120; pos < 180; pos += 1) // goes from 0 degrees to 180 degrees { // in steps of 1 degree myservo.write(pos); delay(15); digitalWrite(13,HIGH); // tell servo to go to position in variable 'pos' // waits 15ms for the servo to reach the position

digitalWrite(13,LOW); myservo.detach();

estado=1;

} }

Step 4(Paso 4) Now connect the arduinos cable. To the computer. Ahora conecte el cable del arduino. A la computadora.

Step 5(Paso 5) When the cable is connected, press the Load bottom at the top of the screen. Cuando el cable est conectado, presione el botn de Cargar en la parte de arriba de la pantalla

Step 6(Paso 6) Now you should watch the next message at the screen. Ahora deberan ver el siguiente en la pantalla.

If you have some problems with this step, you must follow the step 4 of this tutorial: Instala los drivers http://arduino.cc/es/Guide/Windows

Step 7(Paso 7) When you are ready. Connect the servo to the arduino. Like this picture. Make sure that the yellow cable( could be white) is connected to the 9 pin. The black cable to the GND pin. And the red cable to the 5V pin.