Skip to content

Instantly share code, notes, and snippets.

@noobmobile
Created March 13, 2024 14:14
Show Gist options
  • Save noobmobile/a0372ef39ab89a25d18d54a180136ffa to your computer and use it in GitHub Desktop.
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
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