Using my new Arduino Leonardo revived within the last hour, from those awfully nice people at oomlout I have created an automatic buzz word generator designed to enliven any report. When inspiration is flagging just reach for a push button connected between pin 2 and ground and the clever little Leonardo injected a phrase to pep up your words.
// Buzz phrase generator - Mike Cook May 2012
// For the Arduino Leonardo
// Ground pin 2 for a buzz word phrase to be typed in directly into your report
// add extra words in before the "0"
String word1[] = { "integrated ", "synchronised ", "responsive ", "parallel ", "balanced ", "total ", "functional ", "user friendly "
"optimal ", "compatible ","new ", "64-bit ","synergetic ","*"};
String word2[] = { "managerial ", "organisational ", "monitored ", "reciprocal ", "digital ", "logistical ", "transitional ",
"incremental ", "fifth generational ", "lifestyle ", "aspirational ", "*"};
String word3[] = { "policy ", "options ", "flexibility ", "capability ", "mobility ", "programming ", "concept ", "time phase ",
"projection ", "hardware ", "software ", "contingency ","*" };
int numberOfWords1=0,numberOfWords2=0,numberOfWords3 =0;
void setup() {
// make pin 2 an input and turn on the
// pullup resistor so it goes high unless
// connected to ground:
pinMode(2, INPUT_PULLUP);
Keyboard.begin();
// find out how many words are in each array
while(word1[numberOfWords1] != "*") numberOfWords1++;
numberOfWords1--; // to make random number call correct
while(word1[numberOfWords2] != "*") numberOfWords2++;
numberOfWords2--;
while(word1[numberOfWords3] != "*") numberOfWords3++;
numberOfWords3--;
}
void loop(){
while(digitalRead(2) == HIGH) {
// do nothing until pin 2 goes low
delay(50);
random(0,100); // just keep the random number ticking over
}
delay(100);
Keyboard.print(word1[random(0,numberOfWords1)]);
Keyboard.print(word2[random(0,numberOfWords2)]);
Keyboard.print(word3[random(0,numberOfWords3)]);
// do nothing:
while(digitalRead(2) == LOW);
delay(100);
while(digitalRead(2) == LOW); // get rid of any bounce
delay(100);
}
To add your own words just add them to the array definitions at the start of the sketch. You can even bastardise the spelling if you are American.