hey guys, i'm trying to take the reading from a Wii Nunchuck joystick. I made a poor code, but i'm using the library in the Arduino 1.0, however i'm taking the same error everytime, and it says that Wire is not declared. Wire is declared into the nunchuck_funcs library, the only time that Wire is used is into the library, not in my code.
Here is the code
#include <Wire.h>
#include <nunchuck_funcs.h>
#include <Servo.h>
int accx,accy,x,y,zbut,cbut;
int ledPin = 13;
void setup()
{
Serial.begin(19200);
nunchuck_setpowerpins();
nunchuck_init(); // send the initilization handshake
Serial.print("WiiChuckDemo ready\n");
}
void loop()
{
nunchuck_get_data();
nunchuck_print_data();
accx = nunchuck_joyx();
accy = nunchuck_joyy();
zbut = nunchuck_zbutton();
cbut = nunchuck_cbutton();
delay (5);
}