Created
November 7, 2015 12:18
-
-
Save harryf/0ec619e41040df1c30b8 to your computer and use it in GitHub Desktop.
Provides a random insult in German to anyone who presses the button
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Requirements: http://www.techwillsaveus.com/shop/diy-kits/diy-gamer-kit-arduino/ | |
*/ | |
#include <Gamer.h> | |
Gamer gamer; | |
String insults[10] = { | |
"Schlampe", | |
"Idiot!", | |
"Angeber", | |
"Furz", | |
"Arschgeige", | |
"Wixxer", | |
"Sitzpinkler", | |
"Streber", | |
"Weichei", | |
"Schattenparker" | |
}; | |
int iNum = 0; | |
void setup() { | |
// Start up Gamer. | |
gamer.begin(); | |
randomSeed(gamer.ldrValue()); | |
} | |
void loop() { | |
if(gamer.isPressed(START)) { | |
iNum = random(0, 9); | |
gamer.toggleLED(); | |
gamer.playTone(140 + (iNum*5)); | |
gamer.printString(insults[iNum]); | |
gamer.stopTone(); | |
gamer.toggleLED(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment