3D Map Control
3D Map Control is a project for the Arduino Development Environment that uses the Arduino development board to read, decode, and transmit data received from the Wii Nunchuk to a computer. A simple Processing/Java application running on the computer reads the Wii Nunchuk data from the Arduino development board and makes it available to any modern web browser through a simple web service.
Here is a video demonstration of the 3D Map Control project controlling Google Earth:
Actions supported by the 3D Map Control are:
- Jerk the Nunchuk up or down to reset the camera
- Press the C button to zoom out
- Press the Z button to zoom in
- Tilt the Nunchuk up or down to tile the camera up or down
- Tilt the Nunchuk left or right to rotate the camera left or right
- Use the joystick to pan the camera left, right, forward, and backward
Camera tilt, rotate, pan, and zoom operations can all be performed simultaneously.
The Arduino portion of the project is fairly simple. The Nunchuk is connected to the Arduino's I2C controller and a simple program reads data from the Nunchuk, which is transmitted to a computer through the serial device:
I have attempted to illustrate the pin connections for the Wii Nunchuk with the following ASCII art:
NC __ | __ | \___/ | Clock -> | * * * | <- GND 3.3V -> |_*__*__*_| <- Data | NC
The data line connects to the Arduino's analog pin 4 and the clock line connects to the Arduino's analog pin 5.
Building Your Own 3D Map Control
Source code for the Arduino IDE and the Processing IDE to help you build your own 3D Map Control for Arduino are freely available, distributed under the terms of the open source MIT License. You can find all of the relevant files in my Arduino projects repository hosted by GitHub: