ianmclinden / PiXel

Make NeoPixels react to Twitter trends

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

Order from OSH Park

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

## Enable PiXel @ start
if ! ps ax | grep -v grep | grep python > /dev/null; then
        screen -d -m -S PiXel bash -c 'cd $PIXEL_PATH/PiXel/ && sudo python main.py'
fi

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

  • done

About

Make NeoPixels react to Twitter trends

License:MIT License


Languages

Language:Python 100.0%