Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Raspberry Pi Gaming - Second Edition

You're reading from   Raspberry Pi Gaming - Second Edition Design, create, and play all kinds of video games on your Raspberry Pi computer

Arrow left icon
Product type Paperback
Published in Feb 2015
Publisher
ISBN-13 9781784399337
Length 140 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Shea Silverman Shea Silverman
Author Profile Icon Shea Silverman
Shea Silverman
Arrow right icon
View More author details
Toc

Controllers on the Raspberry Pi


Before we begin, you will want to install the joystick package to your device. Type sudo apt-get –y install joystick at the command line and press Enter. The joystick package includes an application called jstest, which will help you identify and troubleshoot your controllers.

When a controller is connected and recognized by the Raspberry Pi, a new entry will be made in the /dev/input/ folder. This folder contains a list of all connected input devices. You should see files like event0, mouse0, and kb0 depending on what has been connected. When your controller is connected, you should see a new item called js0. The 0 at the end of the item indicates the order in which it was connected. You can have multiple items connected, and they will each get an increasing number.

Gamepads

Gamepads are one of the simplest types of controllers for the Raspberry Pi. They can come in different shapes, sizes, and can have different combinations of buttons. These types of controllers...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime