Created
September 4, 2014 01:16
-
-
Save gfreire57/1e182cbee0041e99b34d 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
/* | |
Projeto Blink Simples | |
---------------------------------------------------------------------------- | |
Arduino by BR | |
--- www.arduinobybr.blogspot.com --- | |
---------------------------------------------------------------------------- | |
*/ | |
// Variável do tipo int que nomeia o pino 13 do Arduino como "led". | |
int led = 13; | |
// SETUP - Função que roda somente uma vez, após o botão RESET ser pressionado. | |
void setup() { | |
// Define o pino "led" como de SAÍDA. | |
pinMode(led, OUTPUT); | |
} | |
// LOOP - Função que roda infinitamente. | |
void loop() { | |
digitalWrite(led, HIGH); // Liga o led | |
delay(1000); // Espera 1000ms (1 segundo)) | |
digitalWrite(led, LOW); // Desliga o led | |
delay(1000); // Espera 1000ms (1 segundo)) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment