The Arduino is perhaps the coolest thing on earth. There are many types, the Uno, the Mega, the Pro, the Pro Mini, etc. etc.
But one thing that often can be a problem is that you only have a limited number of inputs and outputs. There are many solutions for that, ranging from multiplexers to port expanders. But one thing that gives you up to 171 extra inputs is to use an old keyboard. And that is that this instructable is going to be about.
(The image it an example of things that can be used with this. As you can see, I only put up switches and relays. What's because the keyboard controller only can handle non-time sensitive digital inputs.)
Step 1: What you need
What do you need? First, an Arduino. Second, an old Keyboard what still works. And that's pretty much all.
1. An Arduino.
2. An old PS2 keyboard. It will work with a USB keyboard, but will be extra work and will not be covered here. (You only need the controller PCB)
3. A PS2 jack. Optional, you can also cut the cable.
4. Some buttons or relays and some wires to connect the buttons to the controller PCB with.
5. The Arduino IDE . There are enough tutorials on how to install it spread around the WWW.
6. The PS2Keyboard library. See further down on how to install it.
7. A good idea to use this with.
Please note what the keyboard in the image is not the one I used. I have already demounted my keyboard long ago.
Installing the library:
1. Go to this page and click on PS2Keyboard.zip. A window will now come up asking what you what you want to do with the file. Click on open.
2. You will now have an explorer window (on windows. I can't help you with other operating systems). Click on Extract all Files up to the left. Enter arduinoInstallPath /libraries (arduinoInstallPath is the place there you installed the Arduino IDE) and then click on Extract.
3. Go to arduinoInstallPath/ libraries/PS2Keyboard and delete the file "PS2Keyboard.cpp.o".