Wireless nunchuck and 3D visualization

[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.

Screenshot

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

Here are the sources.


Please take 2 seconds to fill in the survey :

Would you like this project to be completed ?

Voir les résultats

Loading ... Loading ...

Tags: , , , ,

  1. ashill’s avatar

    please mail me more info and circuit design!!

      (Citer)

    Reply

Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>