Skip to content

Instantly share code, notes, and snippets.

@H3wastooshort
Last active February 7, 2019 19:42
Show Gist options
  • Save H3wastooshort/6f812d126e73797c2215ebcddf41d0d9 to your computer and use it in GitHub Desktop.
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.
#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