LaserTweet - Twitter Projecting Laser Show
by nothinglabs in Circuits > Lasers
19450 Views, 41 Favorites, 0 Comments
LaserTweet - Twitter Projecting Laser Show
This laser show constantly scans Twitter for hashtags (or any other string) of your choice - and then displays them using a bright green laser.
Here's a demo video:
Tweets are "pushed" to an Arduino via USB cable from a computer running a Python script.
You can easily modify the script to display anything you like! (stock ticker, news headlines, free disk space, etc.)
This project is built upon my "Arduino Laser Show with Full XY Control" Instructable:
https://www.instructables.com/id/Arduino-Laser-Show-with-Full-XY-Control/
It's fairly easy to put together (figure an afternoon) - and is built with parts you can most likely get locally (it uses audio speakers to aim the laser).
You'll also need a computer connected to the internet (this project has been tested on both Windows 7 and Mac OS/X Lion - Linux should also work).
Once you've built the laser show itself - making it display tweets is just a matter of some software. Figure an hour or so to get it working.
This entire project can be built for around $50 (not including the cost of an Arduino and computer).
Here's a demo video:
Tweets are "pushed" to an Arduino via USB cable from a computer running a Python script.
You can easily modify the script to display anything you like! (stock ticker, news headlines, free disk space, etc.)
This project is built upon my "Arduino Laser Show with Full XY Control" Instructable:
https://www.instructables.com/id/Arduino-Laser-Show-with-Full-XY-Control/
It's fairly easy to put together (figure an afternoon) - and is built with parts you can most likely get locally (it uses audio speakers to aim the laser).
You'll also need a computer connected to the internet (this project has been tested on both Windows 7 and Mac OS/X Lion - Linux should also work).
Once you've built the laser show itself - making it display tweets is just a matter of some software. Figure an hour or so to get it working.
This entire project can be built for around $50 (not including the cost of an Arduino and computer).
Go Build the Laser Show
First step is easy - go build the Arduino Laser Show with Full XY Control project:
https://www.instructables.com/id/Arduino-Laser-Show-with-Full-XY-Control/
Step 31 details how to upgrade to a green laser.
Then come back here. No need to rush - I'll wait.
https://www.instructables.com/id/Arduino-Laser-Show-with-Full-XY-Control/
Step 31 details how to upgrade to a green laser.
Then come back here. No need to rush - I'll wait.
How the Software Works
This diagram shows how the Python script and Arduino code interact.
All communications are done over the USB port (which emulates a serial port at 9600bps).
All communications are done over the USB port (which emulates a serial port at 9600bps).
Install Software
You'll need to install some software on your computer to run the scripts.
The exact process will vary somewhat depending on your OS.
If you haven't installed Python modules before - it might seem a bit intimidating at first. Just follow the instructions provided on the various sites below - and it should just be tedious - not difficult.
Tip for Windows users - when running Python - you may need to enter its full path - such as c:\python27\python
If you install everything listed below in order - you shouldn't run into any dependency issues.
Install Python (tested with v2.7.3)
http://www.python.org/getit/releases/2.7/
Install Python Setup Tools (tested with 0.6c11 for python 2.7)
http://pypi.python.org/pypi/setuptools/
Install Pyserial (tested with v2.6)
http://pyserial.sourceforge.net/pyserial.html#installation
Install Simplejson (tested with v2.6)
http://cheeseshop.python.org/pypi/simplejson
Install httplib2 (tested with v2.0.7.4)
http://code.google.com/p/httplib2/
Install Oauth2 (tested with build 211)
http://github.com/simplegeo/python-oauth2
Install Python Twitter Module (tested with v0.8.2)
http://code.google.com/p/python-twitter/
And that's it!
The exact process will vary somewhat depending on your OS.
If you haven't installed Python modules before - it might seem a bit intimidating at first. Just follow the instructions provided on the various sites below - and it should just be tedious - not difficult.
Tip for Windows users - when running Python - you may need to enter its full path - such as c:\python27\python
If you install everything listed below in order - you shouldn't run into any dependency issues.
Install Python (tested with v2.7.3)
http://www.python.org/getit/releases/2.7/
Install Python Setup Tools (tested with 0.6c11 for python 2.7)
http://pypi.python.org/pypi/setuptools/
Install Pyserial (tested with v2.6)
http://pyserial.sourceforge.net/pyserial.html#installation
Install Simplejson (tested with v2.6)
http://cheeseshop.python.org/pypi/simplejson
Install httplib2 (tested with v2.0.7.4)
http://code.google.com/p/httplib2/
Install Oauth2 (tested with build 211)
http://github.com/simplegeo/python-oauth2
Install Python Twitter Module (tested with v0.8.2)
http://code.google.com/p/python-twitter/
And that's it!
Update Laser Show Arduino Code
You can get the updated Arduino code from this link:
https://github.com/nothinglabs/lasershow/tree/master/lasertweet
Download it - and then upload it to your Arduino.
In addition to the code that supports serial communications - it also supports a few new characters commonly used with Twitter.
One other new feature - if fast_marque is set to true - text will scroll by at 2x the normal speed. This can be nice when displaying a large number of tweets.
https://github.com/nothinglabs/lasershow/tree/master/lasertweet
Download it - and then upload it to your Arduino.
In addition to the code that supports serial communications - it also supports a few new characters commonly used with Twitter.
One other new feature - if fast_marque is set to true - text will scroll by at 2x the normal speed. This can be nice when displaying a large number of tweets.
Download Python Script
The Python script is also available from GitHub (tweet.py):
https://github.com/nothinglabs/lasershow/tree/master/lasertweet
https://github.com/nothinglabs/lasershow/tree/master/lasertweet
Modify Python Script
You'll need to make a few minor tweaks to the code to get things working.
ser = serial.Serial('COM7', 9600)
Change the com port number to whichever your Arduino is on (you can check this from the Arduino software under the Tools menu)
For Mac / Linux this will look something more like "/dev/tty.usbserial-A700e1B5"
searchString = "INSTRUCTABLES"
You get the idea. This searches for any tweet with the specified characters (put a '#' before it if you just want hashtags proper).
tweetsToGet = 20
The number of tweets to fetch each loop.
filterRetweets = True
This tells the script to not display retweets (they can get spammy).
ser = serial.Serial('COM7', 9600)
Change the com port number to whichever your Arduino is on (you can check this from the Arduino software under the Tools menu)
For Mac / Linux this will look something more like "/dev/tty.usbserial-A700e1B5"
searchString = "INSTRUCTABLES"
You get the idea. This searches for any tweet with the specified characters (put a '#' before it if you just want hashtags proper).
tweetsToGet = 20
The number of tweets to fetch each loop.
filterRetweets = True
This tells the script to not display retweets (they can get spammy).
Run the Script (let the Lasering Begin!)
Run the Python script - and the laser show should come to life!
Hack This Project!
You can easily tweak the Python script to make the laser display any information from the internet or your computer.
Here's some ideas:
Laser RSS reader
Laser karoke lyrics
Laser alarm clock
Laser server monitor
Hack this project!
If you build this project (especially if you do something new with it) - post in the comments and I'll add a link to the instructable.
Have fun!
-Rich
www.nothinglabs.com
Here's some ideas:
Laser RSS reader
Laser karoke lyrics
Laser alarm clock
Laser server monitor
Hack this project!
If you build this project (especially if you do something new with it) - post in the comments and I'll add a link to the instructable.
Have fun!
-Rich
www.nothinglabs.com