In this Instructable, I will demostrate how to control the Cool Neon El Wire using a simple Android app, via Bluetooth.
I was looking at El Wire Instructables where the EL wire is attached to stuff like shoes, clothing, signs and I thought it would be great if lights could be controlled using a mobile app. This is really easy to do!
What you will need:
Step 1: The Setup
The setup is pretty easy...
Mount the Bluetooth tranceiver onto the breadboard
Using connecting wire, connect the Tx and Rx pins (i.e., digital pins 0 and 1) of the Shield to the Tx and Rx pins of the Bluetooth module.
Again using connecting wire, connect the +5V and Ground from the Shield to the +5V and Ground pins of the Bluetooth module
NOTE: some Bluetooth tutorials mention that you cross the connection (i.e., Tx to Rx and Rx to Tx). My module works Tx to Tx and Rx to Rx. You can try one way, and swap the connections if it doesn't work.
NOTE: Remember to unplug the Bluetooth module when loading your program onto the Arduino. The Tx and Rx pins are actually the same as the Serial port used to communicate with your computer through USB, therefore the Bluetooth module will mess up the communication (You'll get a error saying "..not responding.." or something.
Step 2: The Software Logic
The software logic behind this works as follows:
An Android app gives the user the ability to connect to and disconnect from the Bluetooth module. When connected, a serial link will exist between the smartphone and the Arduino + Shield.
The Arduino board listens to the Serial port. When a character is received, it controls the lights accordingly.
Step 3: The Arduino Sketch
Upload the attached code to the Arduino. Remember to unplug the Bluetooth module before uploading.
This code really needs to be improved. So if you can write better code to process command from the Android app, please do! And let me know!
Step 4: The Android App
Extract the attached zip file and import the project folder in your environment. Then, connect your Android smartphone to your computer and run the app. A shortcut to do this is to open the "bin" folder of the extracted project and copy the CoolNeonRemote.apk file to your smartphone via bluetooth or USB. You can use the shorter method if you don't want to look at the code or you don't have the Android Development Kit + IDE on your computer.
If you are interested in the code, here is a quick description. The project has two main classes:
IMPORTANT: The name of the Bluetooth module is hard-coded in the app's code, in the BtInterface class. Mine is "HC-06". If your module is different, you should change that name.
ALSO: The Bluetooth module should be paired with your phone prior to attempting connection. To do so, power the Arduino with the Bluetooth connected and turn on the Bluetooth on your smartphone. Search for the module and when you find it. Click on it. If a password is asked, it is usually "1234" or "0000".
Step 5: Final Step
Finally reconnect the bluetooth module (if it is stilll disconnected from the previous steps), connect the EL wires and the 6V battery power. Power the Arudino + Shield using the USB (or whatever external power source you're using). Just remember that the Arduino+Shield and the EL Wire use different power sources.
Once everything is connected, you're good to go.
Step 6: Demo
Here is a demo video... Sorry for the poor quality (Dark room + Bad Camera).