Control lights on Christmas tree via Arduino, Android, and Bluetooth!

Picture of Control lights on Christmas tree via Arduino, Android, and Bluetooth!
Alrighty, this is my first Instructable and I am pretty excited about it. I got the idea for this project from a combination of these 2 Instructables...

The basic concept was to make a way to control the lights on my Christmas tree this year, but after the Christmas season it can still be used as a remote controlled power strip (I must say that is pretty cool). I got this idea because I was recently introduced to the Arduino and immediately saw the endless possibilities it possesses. I love programming, and learning for that matter, so this was a great project to tackle.
Remove these adsRemove these ads by Signing Up

Step 1: The Materials

Picture of The Materials
A List of Materials
Arduino UNO R3 - $30 Sparkfun -
Bluetooth Serial Adapter - $10 eBay - 
5v Relay Shield - $7 eBay -
A phone with Android
Jumper Wires (for the Arduino)
Wire (for the outlets )

(These pieces are NOT needed, but i used them to test the project)
4 LEDs
Four 100 ohm resistors

Step 2: The Android Application

Picture of The Android Application
The project reads a 'byte' of data that is sent from a phone running an Android app, and interprets it to do specific things. I used a lot of similarities from the Android app bwrussell used in his Bluetooth Controlled Projector Screen (he did a great job on that 'ible btw, there is a link to it up there ^ and a little blurb about him in the next step). So I used the App Inventor from MIT, it's really freaking cool, and surprisingly easy to use.

The block editor is where the magic happens though, when making the app, make sure that each button that you make sends a different 'byte'. As you can see in my block editor, each color button send a different number (i.e. 1-8). Our Arduino will be receiving this specific 'byte' and will turn certain pins on and off based on what it receives. Be sure to use a simple bluetooth app to find your module's address so you can pair your device to the module. Enter that number into the block editor 
sogseal made it!1 year ago

very nice, definitely going to find use for this! im still learning on how to sketch, so half of the sketch im really hazed on whats going on

20140214_194919 [1600x1200].jpg
3tuxedo (author)  sogseal1 year ago

Thanks so much. Which part of the code is confusing? I'd be more than happy to explain it.

I actually got it down after watching some tutorials on youtube, i mean i understand as i read it which is nice for me. Now im trying to figure out when my LED is on or off, to control brightness (PWM). i had it before but couldnt made android send text to adjust it, i believe that BT uses to send byte not text to work with PWM. Thanks man for the reply, waiting for more tuts , cheers

bwrussell2 years ago
Very well done, both on the project and the write-up. Great to see it in action!