DIY Twitter Flagpole

by sofianhw in Circuits > Microcontrollers

2240 Views, 13 Favorites, 0 Comments

DIY Twitter Flagpole

sofian-hadiwijaya-bendera.JPG
timing-belt.JPG
intel-edison.JPG
stepper-motor.JPG
uln2803a-depan.JPG

below are the items I used for it:

  • Intel Edison
  • ULN2803a
  • Stepper Motor
  • Timing Belt 3D printer
  • Stand for camera
  • Broomstick
  • Cables Tie

Assemble the Flagpole

terikat-atas.JPG
terikat-bawah.JPG

Followed by attaching the camera stand and stepper motor on the broomstick using a cable tie. Making sure the timing belt is not too tight

Assemble ULN, Stepper Motor, and Intel Edison

scheme-uln-arduino-stepper.jpg
uln-depan.JPG
uln-samping.JPG
Screen Shot 2015-09-03 at 9.35.46 AM.png

Follow the scheme. Next we will turn the pulley. Here is the code I wrote in Python. countFlagSteps.py

Just download the code and execute it in terminal just simply "python countFlagSteps.py"

When the flag has reached the top, press ‘Ctrl + C’ to interrupt the program, then the program will output how many rounds it takes to reach the top. When all the steps is considered a success, now we will connect to twitter.

Connect to Twitter

twitter-hackathon-merdeka.png
Screen Shot 2015-09-03 at 9.30.50 AM.png

Before starting it we better make the twitter application first. We will utilise the API Streaming to get the number of tweets in real-time. Here is the code. countTweets.py and also we have to prepare token_key.txt from twitter

Now lets test the code we made is working or not

Run the code "python countTweets.py -oauth token_key.txt [word_tracking]". In picture I wanna flag will go up triggered by word "garudaku" from public twitter timeline. So I just type "python countTweets.py -oauth token_key.txt garudaku"

if somebody tweet "garudaku" it will print how much tweet and the flag will go up.

Testing

kerekan-bendera-diy.JPG
DIY - kerekan bendera merah putih (flagpole)

Above is the video that has been fast forwarded because originally it took 2 hours to make this work.

Source