Internet Controlled Holiday Display using a PINK
The inspiration for this project started after seeing a Web Enabled Christmas Tree on MakeZine.com.
Credit too to EFX-TEK·for the inspiration behind the "Fireflies" code.
The BoE is designed to run 8 channels of "fireflies" via a ULN2803 connected to P0-P7, and 12 additional channels of hard-switched AC lighting via three RC-4 modules. In addition there is a an LCD for debugging and of course the PINK module. Code structure uses all but 5 bytes of program memory!
Construction-wise, have not really got as far as I would like, but I can purchase 24V and 240VAC lights for the UK quite cheaply - plan to hack a 24V Icicle set to run the "fireflies" via the Darlington driver (conveniently, they are wired in a series-parallel arrangement, with 10 x 2.4V bulbs in a sub-string). The RC-4s will be in a waterproof enclosure with IP44-rated connectors for outdoor use; these will control 12 identical sets of 240VAC strings.
Having the necessary bits around me, I decided to have a bash at it, using a BS2IC on a BoE and a Parallax Internet Netburner Kit (PINK).
Getting to grips with the PINK has been a challenge, but I think the end result is worth it. I can now control the BS2 via a simple HTML Radio Buttons interface.
Picture·and code attached. Feel free to use it for inspiration for your own holiday display. Obviously heed any warnings regarding mains AC electricity!!! Apologies for the quality of the image - was using my cellphone's camera!!
Next step of the project is to build into an enclosure ready for the November/December holiday season; maybe Santa will be kind enough to bring me a Prop-2.....
Best of Luck
Bottle
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
B.·· ;-)
There are 10 types of people in the world - those who can count in binary, and those who can't...
Credit too to EFX-TEK·for the inspiration behind the "Fireflies" code.
The BoE is designed to run 8 channels of "fireflies" via a ULN2803 connected to P0-P7, and 12 additional channels of hard-switched AC lighting via three RC-4 modules. In addition there is a an LCD for debugging and of course the PINK module. Code structure uses all but 5 bytes of program memory!
Construction-wise, have not really got as far as I would like, but I can purchase 24V and 240VAC lights for the UK quite cheaply - plan to hack a 24V Icicle set to run the "fireflies" via the Darlington driver (conveniently, they are wired in a series-parallel arrangement, with 10 x 2.4V bulbs in a sub-string). The RC-4s will be in a waterproof enclosure with IP44-rated connectors for outdoor use; these will control 12 identical sets of 240VAC strings.
' -----[noparse][[/noparse] Program Description ]--------------------------------------------- ' ' Several influences in this program; mostly Jon Williams' Fireflies and RC-4 ' test code, with BS2 syntax. Also of use was Scott Edwards' LCD code, which ' has been updated for the Milford Instruments LCD package (#6-140 & #6-201). ' Finally, Parallax's PINK application notes have been expanded upon. ' ' Inspiration from Makezine.com - Web Enabled Xmas Tree ' ' Originally designed to run "Fireflies" sequence on up to 8 connected lamps ' via O/C stage (PWM) and an additional 12 AC channels hard-switched via RC-4. ' Expanded interface with Internet capability utilising the PINK module and a ' serial LCD (for debugging purposes). ' ' The PINK module hosts the target webpage - radio buttons select an action, ' and the "Go" button updates the register NB0R01 and sets the Status flag. ' This action causes the program to exit the "Fireflies" loop, and proceed to ' the comparison action, where the contents of the NB0R01 register are compared ' with the stored ASCII data in the EEPROM. ' ' Depending on the result of the comparison stage, the program loops through ' one of five patterns, or a sequence of all five. These are output to RC-4s.
' -----[noparse][[/noparse] Revision History ]------------------------------------------------ ' 0.a - First issue - mostly to get the PINK & LCD code to flow correctly ' 0.b - Import "Fireflies" and established RC-4 code/EEPROM data & optimise
Having the necessary bits around me, I decided to have a bash at it, using a BS2IC on a BoE and a Parallax Internet Netburner Kit (PINK).
Getting to grips with the PINK has been a challenge, but I think the end result is worth it. I can now control the BS2 via a simple HTML Radio Buttons interface.
<html> <HEAD> <TITLE>Radio Buttons</TITLE> </HEAD> <body> Current Selection (Variable 01): <FONT Color="RED"><B><Nb_var01></B></FONT> <FORM name="myform" action="/Buttons.html" method="post"> <P> <br> <div align="left"> <Input name="Nb_var01" type="Radio" Value="0" checked>(0) Do Nothing<BR> <Input name="Nb_var01" type="Radio" Value="1">(1) Run Single<BR> <Input name="Nb_var01" type="Radio" Value="2">(2) Run Pairs<BR> <Input name="Nb_var01" type="Radio" Value="3">(3) Run Tail (CW)<BR> <Input name="Nb_var01" type="Radio" Value="4">(4) Run Tail (CCW)<BR> <Input name="Nb_var01" type="Radio" Value="5">(5) Run Wrap (CW)<BR> <Input name="Nb_var01" type="Radio" Value="6">(6) Run Wrap (CCW)<BR> <Input name="Nb_var01" type="Radio" Value="7">(7) Run Wash<BR> <Input name="Nb_var01" type="Radio" Value="8">(8) Run All<BR> <p> <input type="submit" value="Go!!!"><br> </div> </P> </FORM> </body> </html>
Picture·and code attached. Feel free to use it for inspiration for your own holiday display. Obviously heed any warnings regarding mains AC electricity!!! Apologies for the quality of the image - was using my cellphone's camera!!
Next step of the project is to build into an enclosure ready for the November/December holiday season; maybe Santa will be kind enough to bring me a Prop-2.....
Best of Luck
Bottle
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
B.·· ;-)
There are 10 types of people in the world - those who can count in binary, and those who can't...
Comments
Very nice! I like the simplicity of your web page interface. Not a lot of stuff to deal with. Your BS2 must handle this easily since all you need to do is watch for a change to a single variable. All the work is in the patterns themselves. Take care.
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Chris Savage
Parallax Tech Support
Yep, had some fun with the code, I can tell you. Spent a bit of time last night just making a few tweaks, for instance, removed the read from the EEPROM for the comparison stage, so that I could free up more room for the patterns, Have also streamlined the Read EEPROM data into a single subroutine that is called from multiple points within the Case statement (just parsing different variables).
Next job will be to port to EFX-Tek's Prop-2 so that I have the ULN2803 drivers on board with terminals - I'll let you guys know how that pans out.
Have fun
Bottle
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
B.·· ;-)
There are 10 types of people in the world - those who can count in binary, and those who can't...
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Whit+
"We keep moving forward, opening new doors, and doing new things, because we're curious and curiosity keeps leading us down new paths." - Walt Disney
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
"Everything in the world is purchased by labour; and our passions are the only causes of labor." -- David·Hume (1711-76)········
Yep, there's lots of applications for this sort of interface - remote control where direct human·intervention is not possible or necessary. The only downside is that the responses have to be pre-programmed into the Stamps' EEPROM, so it does limit the amount you can do. It would be nice to have an HTML interface where you could do some whizzy stuff directly, like a massive scrolling billboard or somesuch (letting my imagination run wild!!)
Hope to have this project in an enclosure soon, and who know, might be able to get a webcam set up to view the box in action - wouldn't that be neat??
Anyway, hope that this project has inspired you, and if you have any questions please feel free to email/PM me
Take care
Bottle
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
B.·· ;-)
There are 10 types of people in the world - those who can count in binary, and those who can't...
Project is now running sporadically on the Internet - plan to have it running 16:00 to 22:00 BST (GMT+1) for a few days.
Here's the link: http://86.6.7.245:8880/Buttons.html
user: bottle
pw: newbie
Let me know if you have trouble getting the interface to work.
Regards
Bottle
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
B.
There are 10 types of people in the world - those who can count in binary, and those who can't...
Just wondering, do you need that GOTO Comparison? Since its the next routine down, wont the code just automatically go to comparison?
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Shawn Lowe
Maybe I should have waited to do that......
@ Shaun Lowe
Yep, could tidy the code up a bit. I believe I had another subroutine in between the two lines of code, but I removed it sometime earlier...
@ skylight
I'm currently still debugging the interface, and I only intend to have it running for a few hours each day. Any feedback would be helpful.
Thanks
Bottle
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
B.
There are 10 types of people in the world - those who can count in binary, and those who can't...
I must read posts fully
I must read posts fully
etc
·
No Problems!!!
Should be up and running in a few hours - I'm currently at work, but I can remotely monitor it, for debugging
Regards
Bottle
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
B.
There are 10 types of people in the world - those who can count in binary, and those who can't...
·When to your site ·http://86.6.7.245:8880/Buttons.html and it seem to be working ok
Nice project.............................................
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
··Thanks for any··that you may have and all of your time finding them
·
·
·
·
Sam
Good work, Havn't managed to get my pink working across the net yet, your project gives me hope.
yep, I hope to either get a webcam set up or maybe video it in action
there's still someway to go, and more work needs doing on the enclosure - i'll be sure to post bits up here when stuff happens
regards
Bottle
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
B.
There are 10 types of people in the world - those who can count in binary, and those who can't...