what you need:
- little speaker (optional but cool)
- twitter developer account (sorry, but necessary since the recent API update of twitter, they cancelled basic auth)
(-some dependencies for the python script, mainly the tweepy package)
by the way, the code is flexible so can search for whatever words you want, so you can easily turn the tweiger counter into a yolo-meter or check for hurricanes...
Step 1: Coding-up
in the same folder as the python script create a text file called auth.txt where you OAuth data:
1st line: consumer key
2nd line: consumer secret
3rd line: access token
4th line: acess token secret
it will be read in by the script to connect the tweiger-counter
Step 2: Wiring-up
Step 3: Suit up
I just went to the locale tabacco shop, got an empty cigar box (shrinked it down a little since it was a bit oversized) and made a hand I mounted to the servo.
Step 4: Starting-up
connect your arduino, equip it with the sketch.
right click the python script and press edit with idle.
then just press F5 to start the script
your tweiger-counter is now online. you can also watch the console where the tweets will be printed out
commandline & customization
if you want to search for other keywords, you can either change the code or just start the script from the command line with the words as commandline arguments:
user@computer c/tweiger_counter/ $ python tweiger_counter.py keyword1 keyword2 ... maximum
you can pass as many keywords as you want. the normalization argument lets you define for which number of tweets per minute the maximum will be reached. by that you can scale your counter.
os & port issues
the script should automatically detect which operating system you run and try to connect to the arduino on the standard port ("COM4" for windows and "/dev/ttyACM0" for linux). if you can't connect, make sure you are using the right port.