// Presses a key every once in a while on DigiSpark ATTINY85

/*
 Vorbereitung:
 udev rules für DigiSpark-Boards (https://startingelectronics.org/tutorials/arduino/digispark/digispark-linux-setup/)

 sudo nano /etc/udev/rules.d/49-micronucleus.rules

   SUBSYSTEMS=="usb", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666"
   KERNEL=="ttyACM*", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0753", MODE:="0666", ENV{ID_MM_DEVICE_IGNORE}="1"

 sudo udevadm control --reload-rules

 Upload: Erst Upload anklicken und dann auf Aufforderung zum Einstecken des Boards warten
 
*/


#include "DigiKeyboard.h"

const unsigned long waitTime = 300000; // 5 minutes

void setup() {
  pinMode(0, OUTPUT);      // LED on Model B
  pinMode(1, OUTPUT);      // LED on Model A   
}

void loop() {
  digitalWrite(1, HIGH);   // Turn the LED on
  delay(10);
  digitalWrite(1, LOW);    // Turn the LED off
  DigiKeyboard.sendKeyStroke(MOD_SHIFT_LEFT);
  delay(waitTime);
}
