This is my Christmas Lights iPhone Controller hack to be used with GE G-35 LED Christmas lights, an RFduino development board and the âRFduino ColorWheelâ iPhone App.
Below is a 4 min demo of my new programmed Christmas light patterns.
You can do this hack yourself by following the below instructions, however, if you donât want to hack this together yourself you can buy a similar product called iTwinkle [1] .
Products needed for this hack:
One or more sets of GE G-35 Color Effects LED Christmas lights. Any bulb count and style will work once you set the bulb count in your sketch.  This hack should work with any GE G-35 LED light set but your mileage may vary, no promises from me! If you see 3 wires (5v, ground, data) going to each and every bulb in series with such lights this hack should work.
RFD90101 RFduino 2pc Dev Kit containing:
1 RFD22102 RFduino DIP
1 RFD22121 USB Shield for RFduino
You can support my blog and order from my Amazon Store or order from Mouser at a better price.
[2] [3] [4]
An iPhone or other device that can run the âRFduino Colorwheel [5] â app.
Software needed for this hack:
You have to use Arduino 1.5 IDE or newer [6] . If  you currently have the Arduino IDE  you must start this setup with the IDE application closed.
If needed, install the ftdi USB driver [7] for your computer system.
You must download the latest RFduino hardware plug-in and libraries [8] Â from Github. Click the âDownload ZIPâ button on the right side of this Githup page.
Unzip and copy this downloaded âRFduinoâ folder into this relative folder on your computer for the current version of the Arduino IDE you are using. I was using arduino-1.5.8 so my relative path was âC:(???)arduino-1.5.8hardwarearduinoRFduinoâ
You will need my library:
Download my library  and install following arduino.cc standard library add-on instructions [9] .
You will need my sketch:
Download my Christmas program sketch . Unzip and put these in your Arduino sketch folder with your other other Arduino sketches. My relative folder on my PC was âC:(???)DocumentsArduinoToddFun_GE_G35_XmasLightsToddFun_GE_G35_XmasLights.inoâ
To control the RFduino from your iPhone or other device using bluetooth you need to install the âRFduino ColorWheel [10] â app or similar app that can send RGB color codes to the RFduino.
FYI: My library and sketch are based on this Instructables [11]  and on MEOâs library [12] but with heavy modifications. Per MEO, his library is based on Mike Tsaoâs âsowbugâ library [13] which used original code by Paul Martis [14] . DO NOT USE the G35Arduino library or samples sketches from the Instructables posting, they were a good start but will not work for controlling a Christmas light display.
Construction:
Wire up the G-35 lights as noted in my video.
Â
In the video I solder a short jumper directly to the 5v USB connector on the PCB.
Many will find the fine solder job too delicate. I recommend chopping the female end off a cheap USB extension cable and tying the 5v and ground wires from the chopped USB cable end to the GE G35 power brickâs 5v and ground wires. Then it is much easier to plug in and you only need to connect the one data wire. Using either of these wiring methods you donât need batteries or a 2nd power brick to power the 3v RFduino because the USB Shield for RFduino has a 5v to 3v regulator and you will be getting 5v for the RFduino from the lightâs 5v power supply.
For my Christmas sample sketches you will use ground and GPIO(6) on the RFduino. Any ground point will work.
Programming the RFdunio:
Plug in your RFduino to a USB port on your computer then start up the Arduino IDE 1.5 or newer version. Pick the RFdunio board from the <<Tools/Boards>> menu option. Pick the correct com port the RFduion is connected on from the <<Tools/Port>> menu option.
Open my Christmas sample sketch from the <<File/Sketchbook/ToddFun_GE_G35_XmasLights>> menu option. You may have to edit the sketches before uploading to have the correct light count: #define LIGHT_COUNT (50). Then click the Upload button to upload the sketch to your RFduino. When done programming, remove the RFduino from your computer and connect to the lights as seen in my video.
Using the program:
From your iPhone start the RFdunio ColorWheel app. You DONâT need to pair your iPhone with the RFduino using your iPhone bluetooth settings. If the RFduino is close by, powered up, wired to some GE G-35 lights as noted in my video and running my sample sketch you should see one bluetooth signal named ToddFun. Simply tap the signal displayed to start communicating with the RFduino over the bluetooth connection and change your Christmas light colors and patterns.
I have 25 Christmas patterns programmed which can be selected by setting the r,g,b color sliders to zero then tap the number box for just the ârâ slider to bring up your keypad. Enter program numbers (1-25) as the ârâ color to switch between the 25 programmed patters. Or just tap any spot on the color wheel to set a fixed color. Entering r,g,b = 0,0,0 starts a demo program cycling one time through all programmed patterns showing each pattern for 10 seconds. When finished with the demo cycle mode it will revert back to the saved cycle duration period and continue cycling.
Users can toggle a lock mode on or off by entering r,g,b = 55,55,55. You can program your own lock code in the sketch so long as the first number is greater than your program count. Upon changing the lock mode all current features are saved including lock mode, cycle duration, cycle mode and current color or pattern. Entering r,g,b = 55,55,56 will save all current features including lock mode, cycle duration, cycle mode and current color or pattern. Entering r,g,b = 55,55,57 initiates program mode. When in program mode the next 3 numbers entered for r,g,b sets the standard cycle time in hours, minutes, seconds accumulative. So if you enter 55,55,57 followed by 0,2,30 you will have a 2 minute and 30 second cycle time. Upon changing the cycle duration the cycle mode is enabled and all current features are saved including lock mode, cycle duration, cycle mode and current color or pattern. Standard cycle mode can be started at any time by entering 255,255,255. If the u ser enters anything other than 0,0,0 or 255,255,255 and is not entering one of the interactive modes above then cycle mode is cancelled. This mode change is NOT auto saved so a reboot or watchdog reset will revert to the saved settings in micro-controllerâs flash page.
You can see my Christmas program pattern picks in âToddFun_Programs.cppâ library file. (see Readme.md for full list of choices).
1: Christmas Switching â" Snoopyâs house in âA Charlie Brown Christmasâ
2: Christmas Twinkle â" Purple Orange Green
3: Christmas Switching â" Red Green
4: Candy Cane Wave
5: Green Phasing
6: Red & Green Chasing
7: Red to Green Dither
8: Red, Green & Blue Chasing
9: Red, White & Green Chasing
10: Red, Green, Blue & Yellow Chasing
11: Red, Cyan, Green, Magenta, Blue & Yellow Chasing
12: White Twinkle
13: Christmas Starlight
14: Cold White Icicle â" Slow Pulse
15: Slow Pulse
16: Full Rainbow
17: Full Rainbow Interlaced
18: Autumn Rainbow
19: Colour Wheel Smooth
20: Always Changing
21: Blue Phasing
22: Green to Blue Dither
23: Blue Wave
24: Subtly Changing Pastels
25: Elaineâs Christmas Twink le
Extra:
There are other patterns in the ToddFun_GE_G35_XmasLights_Library files you could add-in, remove or alter to use for any season. Just change the program listing, ProgramCount and switch-case statement in the âProgram.cppâ and âProgram.hâ files. You could also create and add your own new library pattern program files!
If you also want to share your lights with others in your neighborhood feel free to post my public instruction document (PDF) .
LINK to my old Review And Teardown of G35 LED Christmas Lights.
LINK to my old Simple Parallel Sync Hack for the G35 LED Christmas Lights.
Some important links:
http://www.rfduino.com/
http://www.rfduino.com/product/rfd22102-rfduino-dip/
http://www.youtube.com/user/OpenSourceRF/videos
http://www.kickstarter.com/projects/1608192864/rfduino-iphon e-bluetooth-40-arduino-compatible-boa
https://github.com/MarkEMarkEMark/G35-MEO-Programs
https://github.com/sowbug/G35Arduino
http://www.digitalmisery.com/2011/11/ge-color-effects-arduino-library/ [15] [16] [17] [18] [19] [20] [21]
Thanks for joining.
Have fun!
www.ToddFun.com
Links
- ^ iTwinkle (astore.amazon.com)
- ^ RFD90101 RFduino 2pc Dev Kit (astore.amazon.com)
- ^ my Amaz on Store (astore.amazon.com)
- ^ Mouser (www.mouser.com)
- ^ RFduino Colorwheel (itunes.apple.com)
- ^ Arduino 1.5Â IDE or newer (arduino.cc)
- ^ ftdi USB driver (www.ftdichip.com)
- ^ RFduino hardware plug-in and libraries (github.com)
- ^ standard library add-on instructions (arduino.cc)
- ^ RFduino ColorWheel (itunes.apple.com)
- ^ Instructables (www.instructables.com)
- ^ MEOâs library (github.com)
- ^ âsowbugâ library (github.com)
- ^ Paul Martis (www.digitalmisery.com)
- ^ http://www.rfduino.com/ (www.rfduino.com)
- ^ http://www.rfduino.com/product/rfd22102-rfduino-dip/ (www.rfduino.com)
- ^ http://www.youtube.com/user/OpenSourceRF/videos (www.youtube.com)
- ^ http://www.kickstarter.com/projects/1608192864/rfduino-iphone-bluetooth-40-arduino-compatible-boa (www.kickstarter.com)
- ^ https://github.com/MarkEMarkEMark/G35-MEO-Programs (github.com)
- ^ https://github.com/sowbug/G35Arduino (github.com)
- ^ http://www.digitalmisery.com/2011/11/ge-color -effects-arduino-library/ (www.digitalmisery.com)
No comments:
Post a Comment