TweeToy by Raspberry pi using Python

I created a Toy which Talks somebody's tweets using Raspberry Pi.
This Toy catches object by distance sensor and then make sound (Tweet).
TweeToy by Raspberry pi using Python
The architecture is very simple. For getting Tweets, just using twitter api for python. And playing sound with “AquesTalk Pi” (free) which is created by Japanese software company. Unfortunately AquesTalk Pi only supports Japanese words so cant handle English and alphabet. Maybe “eSpeak” works for English, I haven't tested it.

– raspberry pi type B
– usb wifi adapter
– MCP3008(Analog-to-Digital Converter)
– sharp distance sensor (GP2Y0A02YK)
– small speaker
– Redbull

Program source and wiring on breadboard is based on “Analog Inputs for Raspberry Pi Using the MCP3008“.
Thanks Mikey Sklar.

Step 1: Enable sound

$ sudo nano /boot/config.txt
add “hdml_drive = 1” line and save (cntrl + O[enter]).
this enables sound out put to 3.5 mm jack. In case of connecting HDMI, HDMI is set as Sound output device so it's need to chenge.
Gain volume by up key. Default is a bit small

Step 2: Install Twitter API and related modules

install httplib module
$ wget
$ unzip
$ cd httplib2-0.8
$ sudo python installinstall simplejson module
$ git clone
$ cd simplejson
$ sudo python install

install oauth2 module
$ git clone
$ cd python-oauth2
$ sudo python install
TweeToy by Raspberry pi using Python Schemetic
install twitter module
$ git clone
$ cd python-twitter-master
$ sudo python build
$ sudo python install

About The Author

Ibrar Ayyub

I am an experienced technical writer holding a Master's degree in computer science from BZU Multan, Pakistan University. With a background spanning various industries, particularly in home automation and engineering, I have honed my skills in crafting clear and concise content. Proficient in leveraging infographics and diagrams, I strive to simplify complex concepts for readers. My strength lies in thorough research and presenting information in a structured and logical format.

Follow Us:

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top