File | Type | Mode | Size |
---|---|---|---|
Makefile | file | 644 | 296 |
README | file | 644 | 1595 |
main.c | file | 644 | 1659 |
README
wii_g - A simple program for reading the accelerometers on a Wii Remote wii_g simply connects to a Wii Remote via Bluetooth and prints out a continuous log of accelerometer data. Additionally, wii_g uses the Wii Remote's LEDs to display the magnitude of acceleration on the Wii Remote. It was designed to work as a data logger for automotive purposes, but honestly, I haven't yet used it in this capacity. :-/ The data logged to stdout has four fields: time in fractional seconds since the UNIX epoch, X acceleration, Y acceleration, and Z acceleration. This should be enough to plot a graph of acceleration over time in a program like gnuplot (though I guess you could use Excel if you're into that kind of thing). The Wii Remote's LEDs are used to display the magnitude of acceleration in two different modes. Mode 1 (default, and also selectable by pressing the 1 button) provides indication of acceleration in the X direction. That is, the side-to-side motion. Acceleration in the +X direction (to the right) lights up the two rightmost LEDs at 0.5g and 1.0g, and likewise -X acceleration (to the left) lights up the leftmost LEDs. Mode 2 (selectable by pressing the 2 button) provides an absolute meter in the same fashion, lighting up the four LEDs in sequence at 0.5g, 1.0g, 1.5g, and 2.0g. In this mode, it is normal for two LEDs to be lit up all the time. That's the acceleration due to gravity (typically 1g, but you may need to adjust the program if you live somewhere other than Earth). Wii_g requires libwiimote, which you can get at http://libwiimote.sourceforge.net/
Clone: https://git.bytex64.net/wii_g.git