Skip to content

Instantly share code, notes, and snippets.

@takesako
Created May 18, 2019 06:43
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save takesako/6c85871b258b9974402195d64d99dca7 to your computer and use it in GitHub Desktop.
Save takesako/6c85871b258b9974402195d64d99dca7 to your computer and use it in GitHub Desktop.
sample program
#include "DigiKeyboard.h"
#include <avr/pgmspace.h>
const uint8_t RTC[] PROGMEM = "Recruit Technologies Co., Ltd. ";
const uint8_t ATL[] PROGMEM = "Advanced Technology Lab. ";
#define KEY_ENTER 0x28
#define KEY_CAPSLOCK 0x39
// https://gist.github.com/MightyPork/6da26e382a7ad91b5496ee55fdc73db2
void println(const uint8_t *s) {
uint8_t a, i;
i = 0;
do {
a = pgm_read_byte(s + i++);
DigiKeyboard.write(a);
} while (a);
DigiKeyboard.sendKeyStroke(KEY_ENTER);
}
void setup() {
DigiKeyboard.sendKeyStroke(0);
pinMode(1, OUTPUT);
}
void loop() {
println(RTC);
println(ATL);
delay(500);
DigiKeyboard.sendKeyStroke(KEY_CAPSLOCK, MOD_SHIFT_LEFT);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment