Last active
February 7, 2019 19:42
-
-
Save H3wastooshort/6f812d126e73797c2215ebcddf41d0d9 to your computer and use it in GitHub Desktop.
A sketch for the Digispark wich presses F1 evey 5 secs, to convince wired servers to boot.
This file contains hidden or 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
| #include "DigiKeyboard.h" | |
| void setup() { | |
| // put your setup code here, to run once: | |
| pinMode(1, OUTPUT); //LED on Model A | |
| pinMode(5, INPUT); | |
| digitalWrite(1, HIGH); | |
| DigiKeyboard.delay(100); | |
| digitalWrite(1, LOW); | |
| DigiKeyboard.delay(1000); | |
| } | |
| void loop() { | |
| // put your main code here, to run repeatedly: | |
| digitalWrite(1, HIGH); | |
| DigiKeyboard.sendKeyStroke(KEY_F1); | |
| digitalWrite(1, LOW); | |
| DigiKeyboard.delay(5000); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment