Firstly, go ahead and create this circuit:
Your capacitive touch pad and its controller (the central component in the image), are connected using the corresponding numbers labeled on the pins. The connections from the Arduino to the controller are as follows (literally the same connections as before):
GND – GND
VCC – 5V
SCL – A5 (analog pin 5)
SDA – A4
IQR – D2 (digital pin 2)
ADDR – no connection necessary
Do not worry if the touch pad doesn't look exactly like this; as long as the connections are fine, everything will work out.
Open up Arduino and go to File | Examples | MPR121 | Examples | Touchpad or copy the following code:
#include <Wire.h> #include <mpr121.h> int X ; // X-coordinate int Y ; // Y-coordinate // ========= setup ========= void setup() { // initialize function Serial.begin(19200); Wire.begin(); CapaTouch.begin(); delay(500); Serial.println("START"); } // =======...