© Warren Gay 2018
Warren GayAdvanced Raspberry Pihttps://doi.org/10.1007/978-1-4842-3948-3_23

23. Nunchuk-Mouse

Warren Gay1 
(1)
St. Catharine’s, Ontario, Canada
 

You may not have a practical use for the Nintendo Wii Nunchuk as a Raspberry Pi mouse, but it serves as a good example of how LCD touchscreens supply their input events.

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. This will give us a practice with the I2C C API as well. Let’s have some fun implementing a Nunchuk pointing device for the X Window system desktop.

Project Overview

The challenge before us breaks down into two overall categories:
  • The I2C data communication of the Nunchuk device

  • Inserting the sensed ...

Get Advanced Raspberry Pi: Raspbian Linux and GPIO Integration 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.