Enter Your Project for a chance to win $100 Shopping Carts, Gifts to Give, and a 3D Printer Prize! | Project14 Home | |
Monthly Themes | ||
Monthly Theme Poll |
FLiP Connected X-Mas Ornament
Hi,
Here is an X-Mas project I have been working on. This is a Bluetooth connected Ornament that uses a Parallax FLiP board, WS2812B RGB LED Module and a Velleman HC-05 to control the color displayed in the Ornament. The Ornament was cerated using a Clear DIY Plastic Hanging Ornament, paint, mini X-mas tree and Styrofoam for the fake snow. The Parallax FLiP is a DIP form factor board which has a Parallax Propeller processor and was coded using their SimpleIDE in C. Communication from the FLiP with the HC-05 was performed using the fdserial library from Parallax. Remote connection is from a Raspberry Pi using BlueZ and rfcomm to create a virtual serial interface to the HC-05 and Python was used to send command line commands to control the WS2812B through the HC-05. A Parallax Serial LCD is used just for debug purposes to ensure the commands made it to the FLiP.
If I were honored enough to wind the 3-D Printer, I would certainly use it to create the much needed enclosures for the the projects I have been working on as well as perhaps fix a few items around the house such as the knob on the Toaster.
The Sam's STEAM Kit I would look to donate to one of the under privileged schools in the area where the students might not have access to such items.
Project Items
DIY X-Mas Ornament
- Walmart Clear DIY Plastic 4" Ornament
- https://www.walmart.com/ip/Clear-DIY-Plastic-Globe-Hanging-4-Inch-Round-Ornament-Decoration-Paintable-Fillable-Clear-4-Inch-DIY-Plastic-Globe-w-Hanging-String-Crafters-Square-S/281310148?wmlspartner=wlpa&selectedSellerId=11121&adid=22222222227112224969&wl0=&wl1=g&wl2=c&wl3=233998737977&wl4=pla-385820201205&wl5=9032551&wl6=&wl7=&wl8=&wl9=pla&wl10=117084546&wl11=online&wl12=281310148&wl13=&veh=semApple Barrel Outdoor Gloss Paint - White
- Glitter Glue
- Glue Gun
- Styrofoam Packaging material (for fake snow)
FLiP Circuit
- Parallax FLiP - https://www.parallax.com/product/32123
- Parallax WS2812B RGB Module - https://www.parallax.com/product/28085
- Parallax Serial LCD - https://www.parallax.com/product/27977
- Velleman HC-05 Bluetooth Module - https://www.velleman.eu/products/view/?id=435518
- Parallax SimpleIDE - https://learn.parallax.com/tutorials/language/propeller-c/propeller-c-set-simpleide
Rasberry Pi
- BlueZ
- rfcomm
- Python
- Good source for configuring the Raspberry Pi for the HC-05:
Example of how to scan and connect to the HC-05 from a Raspberry Pi:
Scan for devices:
sudo hcitool scan Scanning ... 98:D3:32:20:C9:FC HC-05
Connect to the HC-05 device:
sudo rfcomm connect hci0 98:D3:32:20:C9:FC 2>&1 Connected /dev/rfcomm0 to 98:D3:32:20:C9:FC on channel 1 Press CTRL-C for hangup
Send a command to the RGB LED:
NOTE: In this case this will cause the RGB to Fade in and out in Blue
sudo su -c "echo 'LEDD' > /dev/rfcomm0"
In my project, this is all handled via a Python script by passing command line commands to the script. This Initiates the Bluetooth connection, sends the command, and then kills the connection so it does not stay active.
Example:
os.system("sudo rfcomm connect hci0 98:D3:32:20:C9:FC 2>&1 &") time.sleep(2) os.system("""sudo su -c \"echo \'LEDD\' > /dev/rfcomm0\" """) time.sleep(2) os.system("sudo pkill --signal SIGINT rfcomm")
My script is a bit more interactive than this but this gives an idea of how the commands are being sent.
This is still breadboarded and I intend to put the FLiP circuit in a case as well as code a Javascript interface so the commands can be send from a webpage.
As always, time is my enemy.
Here is a video of what I have thus far.