- Displays Tweets and tweets per minute for US presidential candidates.
- Raspberry Pi establishes a connection to Twitter Streaming API via Tweepy.
- Tweets are received that include text which matches a series of words ("Biden" "Trump").
- There are two Arduinos connected to the Pi via I2C. One for the LED Matrix displays and one for the two stepper motor gauges.
- "Tweets per minute" is calculated and sent as bytes to the "stepper" Arduino via I2C.
- The Arduino then outputs a pulse for each microstep to a microstepping controller which is connected to two X27-168 instrumentation steppers which drive the gauge needles.
- Periodically the text of a tweet corresponding to a keyword (Biden or Trump) is sent to the "display" Arduino via I2C.
- The display Arduino sends the text over I2C to one of two corresponding MAX7219 8x32 LED matrices (blue for Biden, red for Trump).
- The corresponding tweet scrolls across each display.
- Attempt to classify tweets as "positive" or "negative" by comparison to lists of "positive" or "negative" words doesn't work very well. As a result, due to the nature of Twitter, the gauges might be best thought of as negative attention meters.
- Leftover unused variables and code fragments need to be cleaned up.
- I2C communications would benefit from more robust error checking and flow control. Periodic I2C errors exist.
- Scrolling text sometimes appears to be garbled or truncated.
- If too many I2C errors occur in succession, the Pi brute force reboots the Arduinos by cycling the power.
- Basic de-amateurization of the code.
- 1 x Raspberry Pi Model 3B+ w/ SD Card
- 1 x USB power supply for Raspberry Pi
- 2 x Arduino Pro Mini 5V/16Mhz
- 1 x SparkFun DC/DC Converter Breakout (BOB-09370)
- 1 x 1/2 Watt 1.3K ohm Carbon Comp Resistor
- 1 x 1/2/4 SOP28 SSOP28 TSSOP28 to DIP28 0.7" Header Spacing SMD Adapter PCB Board
- 1 x AX AX1201728SG SOP-28 Quad Microstepping Controller IC
- 2 x X27-168 Stepper Motors
- 1 x 2x uxcell Instrument Cluster Pointer Needle Set for HAVAL H2 (use small dia heat shrink on motor stems for friction fit)
- 1 x DAOKI MAX7219 Dot led Matrix MCU 8x32 LED Display Module for Arduino, Blue
- 1 x DAOKI MAX7219 Dot led Matrix MCU 8x32 LED Display Module for Arduino, Red
- 1 x Red LED
- 1 x 150 ohm resistor
- 1 x Blue LED
- 1 x 100 ohm resistor
- Misc shrink tubing
- Misc jumper wires
- 1 x Adafruit Pi T-Cobbler Plus w/ ribbon cable
- Spiral cable wrap
- Coobl Dupont Jumper Wire Male Pin Connectors 2.54mm
- 1 x BB400 Solderless Breadboard
- 1 x BB830 Solderless Breadboard