Python/Raspberry Pi: ILoveTwitterLamp

Arguably the most ridiculous thing I’ve ever created, but people get a kick out of it (myself included). Coded in Python.

Twitter Controlled Lamp

Twitter Controlled Lamp

ILoveTwitterLamp is a mains powered lamp that is controlled by the phrase “I love lamp” being sent to my Twitter account (note: It’s not enabled at the moment due to one misbehaving friend who shall rename anonymous for now! :D). It’s a fun way of linking the virtual world to the physical world.

Components:

  • Raspberry Pi hooked up to a breadboard via PiCobbler
  • Hooked up to a relay board capable of handling mains power.
  • Main powered lamp
  • On the breadboard there’s a momentary microswitch which resets the system (i.e. light off), waiting for any new tweets.
  • Too much spare time

Software:

On the Raspberry Pi are some Python scripts for getting data from the Twitter API, whenever the phrase “I love lamp” is detected in either my home feed, direct message or mentions the relay board is triggered into action (via the GPIO pins) and my desk lamp turns itself on.

Python Code here:
https://github.com/craigfortune/ILoveTwitterLamp

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s