Created
March 13, 2024 14:14
-
-
Save noobmobile/a0372ef39ab89a25d18d54a180136ffa to your computer and use it in GitHub Desktop.
Tarefa de computação física, SOS em código morse no Arduino
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
void setup() { | |
pinMode(13, OUTPUT); | |
} | |
void loop() { | |
piscadaCurta(); | |
piscadaCurta(); | |
piscadaCurta(); | |
piscadaLonga(); | |
piscadaLonga(); | |
piscadaLonga(); | |
piscadaCurta(); | |
piscadaCurta(); | |
piscadaCurta(); | |
} | |
void piscadaCurta() { | |
digitalWrite(13, 1); | |
delay(500); | |
digitalWrite(13, 0); | |
delay(500); | |
} | |
void piscadaLonga() { | |
digitalWrite(13, 1); | |
delay(2000); | |
digitalWrite(13, 0); | |
delay(500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment