Chapter 9. Game on

 

This chapter covers

  • Connecting an Arduino to a Wii Nunchuk
  • Arduino port manipulation
  • Connecting an Arduino to an Xbox controller
  • Using the USB Host Shield

It’s time to dig out that old game controller that’s lying unused in the cupboard, or alternatively, borrow one from your kids. Game controllers are a great way to control things on the Arduino. From robots to flying vehicles, they tend to be relatively low-cost because so many were mass-produced, and eBay and junk sales also offer a steady second-hand supply.

We’ll start by looking at one of the controllers made for the Nintendo Wii games console—the versatile Nunchuk. Then we’ll look at one of its main rivals, the Microsoft Xbox 360 and its USB controller. You’ll learn how to get the controllers set up and running so you can use them in your own projects.

9.1. Nintendo Wii salutes you

Nintendo launched the Wii console to great acclaim late in 2006, although its graphics felt inferior to some of the existing games consoles, such as Microsoft’s Xbox and Sony’s PlayStation. The Wii had a unique games interface controller that was incredibly easy to use and communicated wirelessly with the main console. This controller, coupled with its family-themed games, made it a runaway success, with sales of over 90 million units. You’ll find plenty of available games controllers.

9.2. Release the Xbox

9.3. Summary