The Holiday Special

Enter Your Project for a chance to win $100 Shopping Carts, Gifts to Give, and a 3D Printer Prize!

Back to The Project14 homepage

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

FLiP Circuit

 

Rasberry Pi

 

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.