Skip to content

Instantly share code, notes, and snippets.

@harryf
Created November 7, 2015 12:18
Show Gist options
  • Save harryf/0ec619e41040df1c30b8 to your computer and use it in GitHub Desktop.
Save harryf/0ec619e41040df1c30b8 to your computer and use it in GitHub Desktop.
Provides a random insult in German to anyone who presses the button
/*
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