 #include <DS3231.h>
 #include <SPI.h>
 #include <SD.h>
+#include <sha1.h>
 
 #define BUTTON_PIN 42
 #define SD_PIN 4
 #define KEY_FILE "key.txt"
+#define INTERVAL 30
+#define TOKEN_LENGTH 6
 
 DS3231 rtc(SDA, SCL);
-String key = "";
+uint8_t key[20];
 int previousButtonState = HIGH;
 
 // Gets a UNIX timestamp from the RTC

  }

  return Serial.parseInt();
}

// Prompts to set the time on the RTC

    Serial.println("SD card has no key.txt");
    return;
  }
  String keyString = "";
  while (keyFile.available()) {
    char ch = keyFile.read();
    if (ch == ' ' || ch == '\n') continue;
    keyString.concat(ch);
  }
  keyFile.close();
  uint8_t keyText[33];
  keyString.toCharArray((char*)keyText, 33);
  base32_decode(keyText, key, 20);

  // Set up the keyboard
  Keyboard.begin();
