Giter Club home page Giter Club logo

christmastree's Introduction

CoderDojo Scotland Twitter-lit Christmas Tree

A Twitter-responsive Christmas Tree (different coloured LEDs light up depending on what words are tweeted by people)

##Licence This work is licensed under an [Attribution-NonCommercial-ShareAlike 3.0 Unported (CC BY-NC-SA 3.0) License] (http://creativecommons.org/licenses/by-nc-sa/3.0/)

Author

Claire Quigley

Equipment

  • Raspberry Pi
  • Breadboard
  • 330 Ohm resistors
  • White LEDs
  • Coloured cellophane (e.g. from chocolate wrappers)
  • Green electrical tape
  • Male-to-female jumper wires
  • Small Christmas tree

Instructions

###Twitter stream

The setup of a Twitter connection (using Twython) on your Raspberry Pi is based on this tutorial by James Bruce: http://www.makeuseof.com/tag/how-to-build-a-raspberry-pi-twitter-bot/
(although our Christmas Tree program doesn't need to post to a Twitter account, it just reads the Twitter stream).

Christmas LEDs

Next, set your LEDs out on a breadboard and wire them to the GPIO pins on the Raspberry Pi as follows: alt-text

We used white LEDs with small sections of the cellophane wrappers from some chocolates placed over them and taped down with green electrical tape. (Obviously this may involve eating some chocolates; we can only apologise for the added difficulties in this project).

alt-text

Run the Code

Download christmastree.py to your Pi. To run the program, open an LXTerminal, navigate to where the program is and type

sudo python christmastree.py

Deck the Tree

Once you've got your LEDs working with your program you're ready to put the lights on your tree (or this would be a program called "christmasbreadboard.py" ;-) ).

Take each LED from the breadboard circuit and connect each leg to a longer wire (so that it can reach your tree) like this: alt-text

We didn't have very long jumper wires so joined together two shorter (male-to-female) wires). We also wrapped the jumper wires in green tape so that they weren't so obtrusive on the tree, but you might like to see your wires (a tech alternative to tinsel).

alt-text

Remix the Tree

Remember, you don't have to stick with our selection - edit christmastree.py to make your tree light up for your chosen words!

Here's a short video of the tree in action: Twitter tree video

christmastree's People

Contributors

alcluith avatar craig88 avatar

Stargazers

Samuel Bancroft avatar

Watchers

James Cloos avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.