help-wii Nunchuk-READ Angles ??

Hi, I’m using the wii nunchuk and arduino. I connected and all good.
but, as I can convert the data information in angles and “G”?

http://webdelcire.com/wordpress/archives/481

Hi Omnimusha,

I've written a Wii Nunchuk library for Arduino that you could use. I think that it will fit your project. Using the library, you can get data from the accelerometer using the variables:

nunchuk.accelX
nunchuk.accelY
nunchuk.accelZ

You could then see the angle of rotation (roll) of the controller by mapping the values. You should manually test the values for -90º and +90º (assuming that 0º is the Nunchuk's regular position). Let's say that the values for accelX go from 50 to 320. You could use the map function as follows:

x = nunchuk.accelX
y = map(x, 50, 320, -90, 90)

The variable y would give the angle of the controller. You can apply this to the other variables.

I don't think it would be possible (at least, i don't know how - if you know, please share) should to measure the movement in "G"s.

I hope this could help you. If you have any further question, feel free to ask.

Best regards,
Gabriel Bianconi.