Instructables
Picture of the tweiger counter
The following steps will enable you to build your own tweiger-counter! It searches in current twitter messages sent around the globe for the words like nuclear, calculates a sliding window average and pushes it to the arduino that will click for every incoming tweet like an original Geiger counter and will steer a servo as revmeter showing the current nuclear related posts on twitter. So the next time the twitter-verse is flooded by such tweets due to a new catastrophe you will be warned by an alarm of your tweiger-counter.

what you need:
- arduino
- servo
- 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...
 
Remove these adsRemove these ads by Signing Up

Step 1: Coding-up

Picture of coding-up
get the code for the python script & the arduino sketch from github:
https://github.com/leftbigtoe/tweiger_counter

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

Picture of wiring-up
here is how you wire everything to the arduino. make sure you use the same pins or adapt the code.

Step 3: Suit up

Picture of suit up
IMGP0485.JPG
to make your tweiger counter look nice, just grab some box to put it in and add a nice hand and scale. no exact instructions here, but maybe some insipration:
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.
Ezava27 months ago
and yet no one notices the vaultboy on the Tweiger counter
leftbigtoe (author) 11 months ago
hmmm, that's weird, what python are you running? anyway, try throwing in some extra parantheses and bringing it all on one line:
((self.wpm / self.maxWPM) * self.available_degrees) if (self.wpm < self.maxWPM) else self.available_degrees
if that doesn't fix it, it would be nice if you could post the exact error message here ;-)
have fun with the tweiger counter!
ScimanJones11 months ago
This is an awesome project and one of the most creative with an Arduino. I am a bit of a n00b but I successfully installed and wired everythinge and even put the twitter dev keys in the text file as stated. I don't understand Python really but ran the script using Idle and get a syntax error on the "if" part of the script here:

tmp = (self.wpm / self.maxWPM) * self.available_degrees \
if self.wpm < self.maxWPM else self.available_degrees

I know this is not much to go on but I'm not a programmer and not sure what else to try. Thanks for any suggestions.
pabhilash1 year ago
Great project! Is there any way i can replace the Servo with an RGB LED?
leftbigtoe (author)  pabhilash1 year ago
sure, should actually be pretty easy, the way you control the colour of the rgb led is pretty much the same as driving the servo. the only thing you have to do is to get the mapping right (and of course adding some resistors to not kill the led). I also thought about using an analog voltmeter to get even closer to a real geigercounter look
I could finally get down to revising it and played around with making it blink RED if the world is happy. It works! thanks :D now to modify it further...
And what do i need the developer account for? How do i execute in Linux(mint)?
leftbigtoe (author)  pabhilash1 year ago
should work fine on linux, we tested it on win7 and ubuntu 12.04LTS
just make sure you use the right port for the arduino
you need the developer account to access the twitter api. it's a bit of a hassle, but unfortunately there is no way around it since they updated to api 1.1
just sign in with your normal account here and register a dummy app
https://dev.twitter.com/user/login?destination=home
Nice. I could totally use this for a project that's been on my backlog for ages.
Nerko-erko1 year ago
This is the coolest twitter related thing ever!
Fantastically awesome graphics. Those just made my day!