mirror of
https://github.com/digistump/DigistumpArduino.git
synced 2025-09-17 17:32:25 -07:00
Initial import of support files for all Digistump boards - Digispark, Pro, DigiX - including libraries, examples, tools, and other support files for the Arduino IDE
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
#include "DigiKeyboard.h"
|
||||
|
||||
void setup() {
|
||||
// don't need to set anything up to use DigiKeyboard
|
||||
}
|
||||
|
||||
|
||||
void loop() {
|
||||
// this is generally not necessary but with some older systems it seems to
|
||||
// prevent missing the first character after a delay:
|
||||
DigiKeyboard.sendKeyStroke(0);
|
||||
|
||||
// Type out this string letter by letter on the computer (assumes US-style
|
||||
// keyboard)
|
||||
DigiKeyboard.println("Hello Digispark!");
|
||||
|
||||
// It's better to use DigiKeyboard.delay() over the regular Arduino delay()
|
||||
// if doing keyboard stuff because it keeps talking to the computer to make
|
||||
// sure the computer knows the keyboard is alive and connected
|
||||
DigiKeyboard.delay(5000);
|
||||
}
|
Reference in New Issue
Block a user