On this instructable we will measure the angle using both gyro and accelerometer, and using a technique to merge both sensor to get a smooth signal. The technique is called "complementary filter".
Step 1: What we gonna need:
Step 2: Building...
Assembling the gyro:
1. - plug the gyro at the breadboard
2. - wire ever thing:
- Vo pin from gyro connected to analog port0 at arduino (Light orange wire)
- G pin from gyro connected to ground (White wire)
- V+ pin from gyro connected to Vdd(3.3V) (Orange wire)
Assembling the accelerometer:
1. - plug the adapter at the nunchuck
2. - plug the nunchuck at the arduino using the adapter
3. - place the accel sensor like the photo above