Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <Wire.h>
- #include <ArduinoNunchuk.h>
- ArduinoNunchuk nunchuk = ArduinoNunchuk();
- void setup()
- {
- Serial.begin(19200);
- nunchuk.init();
- }
- void loop()
- {
- nunchuk.update();
- Serial.print(nunchuk.analogX, DEC);
- Serial.print(' ');
- Serial.print(nunchuk.analogY, DEC);
- Serial.print(' ');
- Serial.print(nunchuk.cButton, DEC);
- Serial.print(' ');
- Serial.println(nunchuk.zButton, DEC);
- delay(1);
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement