/* Announcements Sends a home key press, followed by 7 right arrow key presses to the computer, and flashes an LED connected to digital pin 1 each time. This allows an announcement period for LibreOffice Impress slide shows Start your slide show in LibreOffice Impress, or PowerPoint and then insert the DigiSpark to create the announcements slide show When you are ready for your service, or presentation, just pull the DigiSpark. The circuit (Digispark): - Built-in LED attached from pin 1 to ground - Change this if you are using the other version of the DigiSpark created 2018-06-16 by Art G. Granzeier III <http://www.granzeier.com> This example code is in the public domain.*/#include <DigiKeyboard.h>// constants won't change. They're used here to set pin numbers:const int ledPin = 1; // the number of the LED pinvoid setup() { // initialize the LED pin as an output: pinMode(ledPin, OUTPUT); // this is generally not necessary but with some older systems it seems to // prevent missing the first character after a delay: DigiKeyboard.sendKeyStroke(0); DigiKeyboard.sendKeyStroke(74); // Send HOME key stroke to start slide show at the beginning // DigiKeyboard.sendKeyStroke(0);}void loop() { for (int i=0; i < 7; i++) { // This limit to i will be the number of slides that you want repeated for announcements DigiKeyboard.sendKeyStroke(79); // Send the right arrow key stroke to advance to the next slide digitalWrite(ledPin, 1); DigiKeyboard.delay(500); digitalWrite(ledPin,0); // DigiKeyboard.sendKeyStroke(0); DigiKeyboard.delay(5000); // Pause for 5 seconds so audience may read announcement } DigiKeyboard.sendKeyStroke(74); // Send HOME key stroke to start slide show over digitalWrite(ledPin, 1); DigiKeyboard.delay(500); digitalWrite(ledPin,0); // DigiKeyboard.sendKeyStroke(0); DigiKeyboard.delay(5000); // Pause for 5 seconds so audience may read first announcement}