[EDIT] Project featured in Hackaday.com [/EDIT]
This is a demonstration of a nunchuck which has been hacked to be able to communicate wirelessly via bluetooth. A screenshot of the user interface is shown below. We have access to a lot of information on the nunchuck: raw data, position of the stick, 3-axis accelerometer data, averaged accelerometer data, button state, orientation angle and amplitude of the joystick and accelerometers and finally the angles of roll, pitch and yaw.
This is the prototype, it’s a bit ugly and the small Li-ion battery is hard to fit into the box (we have to file the inside). On the video we see it dangle with the ICSP (In-Circuit Serial Programming) connector for the microcontroller (PIC18F2550). I hope to make soon a clean printed circuit board to make everything fit perfectly (please fill in the poll below if you are interested!).
The BT module is from seeedstudio.com. It has a serial interface which makes it really easy to use.
Some pictures and the sources in the following.
On the back of the BT module is a small 3V3 regulator, and some LEDs which provide information on the module status (association, …). On the second board is the PIC microcontroller, LEDs for fun and the quartz.
The sources include a library for handling a serial port, with the following features: easy management of one or more serial ports, use of a dedicated thread to listen to the port, storage of incoming data in a ring buffer.
I am using OpenGL+SDL for the 3D cube.
How to use this program (under Ubuntu):
- Run the “Bluetooth manager”
- Add a serial port (right clic on the BT module)
- Type the key : 1234
- Run the program with the BT serial port as a parameter : ./cube3D /dev/rfcomm0
Please take 2 seconds to fill in the survey :