Make a multitouch array
Installation
Make sure you follow Installation.
Arduino Nano

Arduino Uno

Sensor using copper tapes

Arduino code
#include <MultiTouchKit.h>
// Multiplexer input pins
int s0 = 9;
int s1 = 10;
int s2 = 11;
int s3 = 12;
int muxPins[4] = {s3, s2, s1, s0};
// Number of receiver (RX) and transmitter (TX) lines
int RX_num = 4;
int TX_num = 4;
// Receive raw capacitance data or touch up/down states
boolean raw_data = true;
int threshold = 50;
// MultiTouch Kit class
MultiTouchKit mtk;
void setup() {
Serial.begin(115200);
mtk.setup_sensor(RX_num, TX_num, muxPins, raw_data, threshold);
}
void loop() {
mtk.read();
}
multitouchkit.ino (right click on this link, Save Link As…)
Processing code
Menu Files > Examples > Contributed Libraries > Multi Touch Kit > MTK_example
Change RX, TX to 4, and serialPort to 0:
int tx = 4; //number of transmitter lines (rx)
int rx = 4; //number of receiver lines (rx)
You need to change the following according to your computer connection:
int serialPort = 0; //serial port that the Arduino is connected to
How to know which Serial port:
Run this code in a new Processing sketch, and see which order is the one that you see in Arduino show up:
println(Serial.list());
Optimize the shapes
Reference
Multi-Touch Kit - Human Computer Interaction Lab, Saarland University
Troubleshooting
Processing window stuck in “Calibration”
Check your serial port.
Out of bound error
Wait and try again.
Processing visualization flashing rapidly
Check your grounding on your breadboard.
Still unstable
- Conncect REF to 5V.
- Unplug AC power of your laptop from the wall.
