Last active
August 29, 2015 14:12
-
-
Save 5shekel/cadf0a5d4677a98a7f8c to your computer and use it in GitHub Desktop.
fresh prince prose injector
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
/***fresh prince injector***/ | |
/* | |
we are running this on an ATtami dev board http://telavivmakers.org/ATtami | |
based on digispark keyboard library example code https://github.com/digistump/DigistumpArduino/blob/master/hardware/digistump/avr/libraries/DigisparkKeyboard/examples/Keyboard/Keyboard.ino | |
and all this possible beaucse of V-USB ! http://www.obdev.at/products/vusb/projects.html | |
this code basicly makes the ATtiny85 identfiy as a keyboard and will inject | |
select prose onto user text boxs (when in focus) | |
add CTRL+S for extra LOLS | |
NOTE: | |
FOR SOME REASON THE ATtami GOES INTO BOOT CYCLE IF I ADD MORE THEN ONE LINE TO THE ARRAY | |
NEEDS TO SEE WHATS UP, THAT WHY I COMMENT THE REST OF THE LYRICS :( | |
*/ | |
#include "DigiKeyboard.h" | |
//source lyrics from goog | |
// used this to format lyrics for (under javascript escapes) http://rishida.net/tools/conversion/ | |
// and this for formating in NP++ , search and replace http://i.imgur.com/yQN6NJD.jpg | |
char* myStrings[] = { | |
"Now, this is the story all about how\nMy life got flipped-turned upside down\nAnd I\'d like to take a minute, just sit right there\nI\'ll tell you how I became the prince of a town called Bel Air" | |
}; | |
/* | |
, | |
"In West Philadelphia, born and raised\nOn the playground is where I spent most of my days\nChillin\' out, maxin\', relaxin\' all cool\nAnd all shootin\' some B-ball outside of the school" | |
, | |
"When a couple of guys who were up to no good\nStarted makin\' trouble in my neighborhood\nI got in one little fight and my mom got scared\nAnd said, \"You\'re movin\' with your aunty and uncle in Bel Air\"" | |
, | |
"I begged and pleaded with her the other day\nBut she packed my suitcase and sent me on my way\nShe gave me a kiss and then she gave me my ticket\nI put my Walkman on and said, \"I might as well kick it!\"" | |
, | |
"First class, yo this is bad\nDrinkin\' orange juice out of a champagne glass\nIs this what the people of Bel Air are livin\' like\nHmmm, this might be alright" | |
, | |
"But wait, I hear they\'re prissy, bourgeois and all that\nIs this the type of place that they should send this cool cat?\nI don\'t think so, I\'ll see when I get there\nI hope they\'re prepared for the prince of Bel Air" | |
, | |
"Well, uh, the plane landed and when I came out\nThere was a dude look like a cop standin\' wavin\' my name out\nI ain\'t tryin\' to get arrested yet, I just got here\nI sprang with the quickness like lightning, disappeared" | |
, | |
"I whistled for a cab and when it came near\nThe license plate said fresh and had a dice in the mirror\nIf anything I could say that this cab was rare\nBut I thought, nah forget it, yo home to Bel Air" | |
, | |
"I pulled up to the house about seven or eight\nAnd I yelled to the cabby, \"Yo homes, smell you later\"\nLooked at my kingdom, I was finally there\nTo sit on my throne as the prince of Bel Air" | |
}; | |
*/ | |
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 a rnadom verse from the lyrics | |
// limit to number of verses held in array | |
DigiKeyboard.println(myStrings[random(8)]); | |
DigiKeyboard.println(myStrings[0]); | |
// 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 | |
// play with this values for extra LOLs | |
DigiKeyboard.delay(random(5000)+1500); | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment