my code

Utilizando el led incorporado en la placa Arduino (D13) editamos un programa que lo haga parpadear

Snippet options

Download: Download snippet as leccion-01.txt.
Copy snippet: For this you need a free my code account.
Embed code : You will find the embed code for this snippet at the end of the page, if you want to embed it into a website or a blog!

/* ============================================
                   Hola Mundo
Enciende un LED por un segundo y lo apaga por el mismo tiempo

     Bloque principal de configuracion
void setup() {              // Se ejecuta cada vez que el Arduino se inicia

  pinMode(13, OUTPUT);      // Inicializa el pin 13 como una salida
                            // La placa Arduino incluye un led en el pin 13

      Bloque principal de programa cíclica

void loop() {               // Esta función se repite indefinidamente
                            //// mientras el Arduino este energizado 
  digitalWrite(13, HIGH);   // Enciende el LED
  delay(1000);              // Temporiza un segundo (1s = 1000ms)
  digitalWrite(13, LOW);    // Apaga el LED
  delay(1000);              // Temporiza un segundo (1s = 1000ms)

}                           // Fin del programa                           // Fin del programa

Create a free my code account now.

my code is a free service, which allows you to save and manage code snippes of any kind and programming language. We provide many advantages for your daily work with code-snippets, also for your teamwork. Give it a try!

Find out more and register now

You can customize the height of iFrame-Codes as needed! You can find more infos in our API Reference for iframe Embeds.