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.

[materials]
– 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.
$alsamixer
Gain volume by up key. Default is a bit small

Step 2: Install Twitter API and related modules

install httplib module
$ wget https://httplib2.googlecode.com/files/httplib2-0.8.zip
$ unzip httplib2-0.8.zip
$ cd httplib2-0.8
$ sudo python setup.py installinstall simplejson module
$ git clone https://github.com/simplejson/simplejson
$ cd simplejson
$ sudo python setup.py install

install oauth2 module
$ git clone https://github.com/simplegeo/python-oauth2
$ cd python-oauth2
$ sudo python setup.py install
TweeToy by Raspberry pi using Python Schemetic
install twitter module
$ git clone https://github.com/bear/python-twitter
$ cd python-twitter-master
$ sudo python setup.py build
$ sudo python setup.py install

About The Author

Scroll to Top
Read previous post:
How to build a People Counter with Raspberry Pi and Ubidots Circuit
How to build a People Counter with Raspberry Pi and Ubidots

In this simple project, we'll use a motion sensor to detect if an object is passing in front of our...

Close