Top Banner
PiFace ButtonBox ButtonBox is a handy platform for many of the piface button based projects such as Whack A Mole, Simon and RacingPi. The ButtonBox has buttons and LEDs attached to them. School of Computer Science Build the wooden box with the appropriate number of holes for your buttons. details can be found on our blog pifaceprojects.posterous.com Insert and fix your buttons to the holes. To wire up the buttons connect all the common pins (COM), of the microswitches, together and then connect the last one to ground on the PiFace. Then connect the N.O pins to the corresponding input pin on the PiFace. To wire up the LEDs connect all the positive(+) pins together in sequence and connect the last one to 5v on the PiFace. Then connect the LEDs' negative pins to the corresponding output pin on the PiFace. *If you are not using 5v LEDs then make sure you use resistors. You can then use the digital read functions of pfio to see what buttons are pressed and then digital write to light up those buttons while they are pressed. How to make the ButtonBox
1
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Button Box

PiFace ButtonBoxButtonBox is a handy platform for many of the piface button based projects such as Whack A Mole, Simon and RacingPi. The ButtonBox has buttons and LEDs attached to them.

School of Computer Science

Build the wooden box with the appropriate number of holes for your buttons. details can be found on our blog pifaceprojects.posterous.com

Insert and fix your buttons to the holes.

To wire up the buttons connect all the common pins (COM①), of the microswitches, together and then connect the last one to ground on the PiFace. Then connect the N.O pins to the corresponding input pin on the PiFace.

To wire up the LEDs connect all the positive(+) pins together in sequence and connect the last one to 5v on the PiFace. Then connect the LEDs' negative pins to the corresponding output pin on the PiFace. *If you are not using 5v LEDs then make sure you use resistors.

You can then use the digital read functions of pfio to see what buttons are pressed and then digital write to light up those buttons while they are pressed.

How to make the ButtonBox