PiXel (Pi Pixel)
Make NeoPixels react to Twitter trends
Reacting to live tweets
Reacting to a special hashtag
Overview
- PiXel runs on a Raspberry Pi, and triggers LED animations based on current Twitter trends.
- For every tweet in the last 5 seconds that matches one of the user supplied keywords, PiXel flashes a random LED on the strip.
- If nearly the same number of tweets as pixels are found, then a random special animation is triggered
- If barely any tweets are found, then the pixels glow dimly
- If a user supplied special keyword or author is found, then a specific special animation is triggered.
- A toggle button can be added to cycle the array between the Standby/OFF, Twitter, and Glow states
Hardware Requirements
Alternatively, Order and Assemble a NeoPixel Shield
Dependencies
RPi.GPIO
- Should be preinstalled in newer Raspbian
rpi_ws281x
- Follow library installation instructions
Python Twitter
- Install with
$ pip install python-twitter
or follow the link and install manually.
Setup
Queries
PiXel uses 3 query types. For information about formatting, see Twitter Search API documentation. All three queries are included in the q
field of a Twitter Search call.
- QUERY_KEYWORDS: These keywords trigger a single flash.
- QUERY_SPECIALS: These keywords trigger a special animation.
- QUERY_FROM_USERS: If a tweet was written by this user a special animation is triggered.
Author
Ian McLinden, 2018