Go Down

Topic: Determine touch location with capacitive sensor (Read 73 times) previous topic - next topic

anassassinsemail

I'm new to Arduino and circuitry in general. I have a very simple setup with a Bare Conductive 12 pin board creating a capacitive sensor. One pin is connect to some conductive material (see image) and my code read the difference between the measured baseline and the measured continuous data for that pin and prints it. The output is as expected and I can see when a user touches the material.

I now need an x,y coordinates of where on the material the user touches. I've found a lot of information on how to create a capacitive slider which measure the touch position's distance from the pin but this is only 1 dimensional and with only one pin. Is it possible to detect the distance in 2 dimensions? Would this require multiple pins?


Code: [Select]

// some include statements and defines here...

void setup(){ 
  // basic setup stuff here...
   
}

void loop(){
  readTouchInputs();
}

void readTouchInputs(){   
  MPR121.updateAll();

  // read the difference between the measured baseline and the measured continuous data
  // using pin 0E
  int reading = MPR121.getBaselineData(0)-MPR121.getFilteredData(0);

  Serial.print("Right: ");
  Serial.println(reading);
}

wvmarle

You would need a 2D matrix of sensors.
The slider versions that I have seen so far are all basically an array of sensors.
Quality of answers is related to the quality of questions. Good questions will get good answers. Useless answers are a sign of a poor question.

Go Up