GitHunt
YA

yasserkabbout/tweeLights

Controlling Holiday Lights by a Twitter voting System API and a Raspberry Pi - IoT

Codacy Badge

๐Ÿ˜€ Welcome to tweeLights!

Each year, in living rooms and home-goods stores across the country the same battle unfolds: White or multi-colored lights? The battles are contentious with husbands and wives, neighbors and colleagues pitted against each other and searching for compromise.

In addition, this issue becomes bigger when major stores like Amazon, want to attract their customers during holidays. The choice of light colors may affect the customer's decision to visit or not to visit the store!

In order to solve this issue, and to have some fun, we decided to implement a system that controls the holiday lights' color by analyzing the social feeds and posts on twitter. Scroll down to learn how this project works!

Installation

๐Ÿ”ง What will you need?

  • Raspberry pi 3 or 2
  • Bread Board
  • Jumper Cables
  • 3 LED of different colors (Yellow, Green, and Red)
  • Computer to code ๐Ÿ˜ธ

๐Ÿ˜ต How to configure it?

First, before we continue, you should have Raspberry Pi 3 Model B/B+ or a Raspberry Pi 2.

  1. Get a micro SD card of at least 8GB.
  2. Download the Raspbian image from the raspberry piโ€™s website and copy its content to the SD card.
  3. Insert the SD card within the raspberry pi 3.
  4. Connect the HDMI cable of your raspberry pi 3 to any suitable screen.
  5. Power the raspberry pi by plugging in the USB cable.
  6. Follow the steps to install the Raspbian system.
  7. Once the installation is done, connect to the internet through wifi or ethernet.
  8. Download the tweeLights.py python script on your raspberry pi 3.
  9. Insert the credentials of your twitter account through a txt file and name it โ€œconfig.txtโ€ and place within the same directory of tweeLights.py
consumer_key: [your key]
consumer_secret: [your secret]
access_token: [your access token]
access_token_secret: [your access token secret]
  1. Install tweepy by pip install tweepy
  2. Run the Python script python tweeLights.py after having the LEDs connected as mentioned within the section below.
  3. The system will be working now

๐Ÿš€Raspberry Pi and LED connections

The pins used in this project are the Ground pin, GPIO 14, GPIO 15, and GPIO 18.

  • GPIO 14 โ†’ Yellow LED
  • GPIO 15 โ†’ Green LED
  • GPIO 18 โ†’ Red LED
  • The anode part of the LED will be connected to the ground pin.

๐ŸŽ“ Read More!

โ“ 1. Project Description

๐Ÿ“Š 2. Project Requirements

๐ŸŽจ 3. System Design

๐ŸŽฏ 4. Project Plan

๐Ÿ’ฐ 5. Project Market Analysis

๐Ÿš€ 6. Project Complexity Analysis

๐Ÿ„ 7. Team SWOT Analysis

๐Ÿ“‘ 8. Git Cheat Sheet

๐Ÿ’ป We are live! Click here

๐Ÿ’ก Help us improve!

  1. A template is provided if you would like to submit a Feature Request issue. Feature Request
  2. A template is provided if you would like to submit a Bug Report issue. Bug Report

๐Ÿ“ Releases

You can reach the first and second working prototypes (v1.0 and v1.1) by clicking here

๐Ÿ‘Œ Contributing

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Commit your changes: git commit -am 'Add some feature'
  4. Push to the branch: git push origin my-new-feature
  5. Submit a pull request :D

โ™ฅ๏ธ Credits

Credit goes to Yasser El Kabbout & Professor Dr. Suzan รœskรผdarlฤฑ from Bogaziรงi University.

๐Ÿ˜‡ License

Nah! Don't worry about this :D feel free to use and edit the software.