Created
October 1, 2019 03:33
-
-
Save daniel7byte/11a2473405471a0a06e0cae6d61c2eaf 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
// the setup function runs once when you press reset or power the board | |
void setup() { | |
Serial.begin(9600); | |
// initialize digital pin LED_BUILTIN as an output. | |
pinMode(LED_BUILTIN, OUTPUT); // LED_BUILTIN / 13 | |
digitalWrite(LED_BUILTIN, HIGH); | |
delay(2000); | |
Serial.println("HOLA MUNDO"); | |
} | |
// the loop function runs over and over again forever | |
void loop() { | |
digitalWrite(LED_BUILTIN, LOW); // turn the LED on (HIGH is the voltage level) / 0 | |
Serial.println("APAGADO"); | |
delay(500); | |
encender(LED_BUILTIN); // turn the LED off by making the voltage LOW / 1 | |
Serial.println("ENCENDIDO"); | |
delay(500); | |
} | |
void encender(int numero_pin){ | |
digitalWrite(numero_pin, HIGH); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment