USING A DATA GLOVE AS MUSICAL INSTRUMENT
Get prepared by checking that you have all the required parts ready. Here you can find a shopping list if you need to buy parts.
Arduino Pro Mini with pin header strips, MPU6050 sensor and FTDI Basic Breakout with Micro USB cable
Get the I2Cdev Library at GitHub
Get the MPU6050 Library at GitHub
Install these libraries into the Arduino Libraries folder inside your home directory. Read this for information on installing libraries.
You can disconnect the Arduino from the FTDI breakout for the next steps.
The MPU6050 sensor breakout-board will be soldered onto these headers, therefore they have to be soldered tight to the boards.
At this stage, the unit is ready to transmit data to the computer.
If everything workes well, you will see the sensor data plotted, each axis of the accelerometer and gyroscope. If not, verify the following:
Close the serial connection and unplug the FTDI breakout from the Arduino.
Command | TX | RX | Comment |
---|---|---|---|
+++ | Enter XBee programming mode. Don't press return, but wait until the XBee responds with OK. All follwing commands will be sent by pressing reutrn. | ||
ATRE | Reset configuration of XBee. | ||
ATMY | 2 | 1 | Set local ID. |
ATDL | 1 | 2 | Set ID of unit to connect to. |
ATID | 1115 | 1115 | PAN ID (Personnel Area Network ID) value can be anything from 0000 to FFFF. Two units communicating with eachother need to have this set to the same value. |
ATBD | 5 | 5 | Baud rate, this value need to be the same on both XBee modules, so they can talk to each other. You need to choose a baudrate of 38400 once you reestablish the serial connection in order to programm / communicate with the XBee. |
ATCH | 0E | 0E | Set channel. This can be any HEX value between 00 and 1A. 0E is an example. If you use multiple units (GePS) at the same time, make sure they use different channels. |
ATWR | Write configuration to XBee memory. |
Refer to the XBee Command Reference Tables if you need detailed information on the AT commands.
The channel ID is superior to the PAN ID, if you use multiple units (GePS), they can use the same PAN ID, but not the same channel ID.
minicom for a Unix-like OS:
$ minicom -D /dev/ttyUSB1 -b 9600
* In Mac OS X, the Meta-key is "Esc".
For more information / options on Linux/Unix read this article: 5 Linux / Unix Commands For Connecting To The Serial Console .
CoolTerm for any OS:
After connecting the XBee with the dongle, open CoolTerm on your computer and set it up as follows (by hitting the Options-button:
Solder the JST Right-Angle Connector to the remaining wires (to RAW at Arduino and to GND at MPU6050), for connecting the battery.
To avoid damage to the Lithium Polymer battery you should put it into the case only if you're done soldering and cutting parts. The case is designed to have space on the bottom, neatly fitted under the Arduino and Xbee.
Place the case with the bottom to the glove, on the palm side towards the wrist. Sew the case to the glove, through the eyelets around the case.
Connect the battery to the JST-plug soldered in Step 08. If everything worked out well, the red LED on the Arduino will turn on. Now you're ready to test the bluetooth connection, you can repeat Step 05, just without connecting the FTDI breakout.
You can cover the unit to keep the parts in place by combining two pieces of insulation tape leaving some space at the ends to stick it to the unit. The second piece of tape keeps the cover from sticking to the parts.
In order to charge the LiPo battery, disconnect the JST connector and connect the battery plug to the LiPo charger, which is plugged into any powered USB port of you computer.