I presented at the RubyConfIndia 2013 on the topic of Arduino + Ruby and had planned to show 2 Demo's to the attendees.
- A bubblino clone and
- A webpage controlling a Car.
Unfortunately, both of them stopped working just a day ago because of various reasons. And hence, we came up with a quick hack 'Sentimental Bulbs' which made it to the conference and luckily worked!
Here is how we built it.
What does sentimental bulbs do?
- It looks for a specific hash-tag on twitter, if the words in that are happy it turns on the green bulb else turns on the red bulb.
How does it work?
- A ruby script runs on the computer tracking tweets and when find a happy tweet sends a message to the Green bulb to light up.
Let's see what does it take to build this.
- 2 Bulbs - 1 Red , 1 Green
- A relay control board.
- Ruby Installed + Gem Dino.
- Single Strand Wires
- Holder for bulbs + plugs to put in mains.
- Pin no. 12 from Arduino to RL1 pin on Relay control Board
- Pin no. 13 from Arduino to RL2 pin on Relay control Board
- + of Relay to +5V on Arduino
- - of Relay to GND on Arduino
- Connect the cut wire for green bulb into RL1 and for red bulb into RL2