Instructables

Tactile keyboard / game controller with Arduino and Processing

Picture of Tactile keyboard / game controller with Arduino and Processing
This instructable describes a quick and simple way to create a tactile keyboard or game controller using
- cardboard,
- aluminium foil,
- and an Arduino.

It also provides the Arduino and Processing codes to immediately start playing !

Ideal for quick prototyping of games and electronic setup, as well as for educational purposes
 
Remove these adsRemove these ads by Signing Up

Step 1: Prepare the tactile keyboard

Picture of Prepare the tactile keyboard
Cut pieces of aluminum foil to make the keys. Simply tape them to a piece of cardboard.

Shapes, dimensions, and arrangement of the keys can be varied. In this example, I used triangle shapes arranged in a Top/Down/Left/Right configuration to create a game controller.

Round shapes in a line, can make a keyboard, for a visual or musical control panel, for example.

Step 2: Wire the keyboard to the breadboard

Picture of Wire the keyboard to the breadboard
2013-01-13 16.00.42.jpg
The first step is to insert a 8-10cm wire between the aluminium foil and the cardboard, and tape it in place. Repeat for each

Then twist the wires so that they reach the breadboard. The wires might be sufficient to hold the keyboard in the air, otherwise you may build a simple cardboard base, for example.

Step 3: Connect the Arduino

Picture of Connect the Arduino
Connect four 1 MOhm resistors to digital pins of the Arduino.

Connect the wires dangling from each of the keyboard keys, to one end of each of the resistors.
cantona1 year ago
Thankd for the reply. I was able to set things up
http://i46.tinypic.com/e86dc2.jpg

is it possible to run another processing sketch

eg \\\\\\\\\ import processing.dxf.*;

void setup() {
size(400, 400, P3D);

background(#DEF6FF);
beginRaw(DXF,"positions.dxf");
}

void draw() {

}

void mouseDragged() {
fill(#0299CE);
ellipse(mouseX, mouseY,10, 10);
}

void keyPressed() {
endRaw();
exit();
}\\\\\\\\\\\\\\\\\

within a case statement or link the case statement to another sketch , so that when a button is pressed, the other sketch runs ?

donmatito (author)  cantona1 year ago
Not sure I understand, but you might be complicating things. Can't you just put the "button" code in a function or a class?
cantona1 year ago
is it possible to print t,b,l,r into a text file when pressed ?
donmatito (author)  cantona1 year ago
Yes, I am pretty sure it is possible, although I have not done it myself.

The Processing code can do that easily with the createWriter() commande. You can see an example at http://www.processing.org/reference/createWriter_.html

Other than that , you could try to do it using Gobetwino (http://playground.arduino.cc/Interfacing/GoBetwino) or using the write() function of the SD library if you log your file on a SD card (http://arduino.cc/en/Reference/SD).

Let us know how it goes !
Pro

Get More Out of Instructables

Already have an Account?

close

PDF Downloads
As a Pro member, you will gain access to download any Instructable in the PDF format. You also have the ability to customize your PDF download.

Upgrade to Pro today!