CHAPTER 3

image

Nunchuk-Mouse

This chapter’s project is about attaching the Nintendo Wii Nunchuk to the Raspberry Pi. The Nunchuk has two buttons; an X-Y joystick; and an X, Y, and Z accelerometer. The sensor data is communicated through the I2C bus. Let’s have some fun using a Nunchuk as a pointing device for the X Window System desktop.

Project Overview

The challenge before us breaks down into two overall categories:

  • The I2C data communication details of the Nunchuk device
  • Inserting the sensed data into the X Window System desktop event queue

Since you’ve mastered I2C communications in other parts of this book, we’ll focus more on the Nunchuk technical ...

Get Experimenting with Raspberry Pi now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.