Flo
Hey Guys,
i got the Circle Trackpad Dev Kit. I can use the Trackpads very well. Now i saw there are 3 buttons on the board. I want to perform button clicks with them. My problem is, i dont find the right pin-number. In the manuel they are listed under pin (5, 6, 7) but they dont work.
I tried the code below. But the output always gives me "Button pressed!!!" and if i press the buttons, there is no chance...

Can anyone help me?

Thanks!!!
void setup()   {                  Serial.begin(38400);  pinMode(7, INPUT);}void loop()                     {  if (digitalRead(7) == HIGH) {    Serial.println("Button is not pressed...");  } else {    Serial.println("Button pressed!!!");  }  delay(250);}
Quote
Patrick
Hi Flo,

I'm glad to hear that you are enjoying our dev kit. I'm the original developer of the circle sensor demo code and I'm here to help.

In regards getting button data, there are a couple of issues we need to address:
  1. The processor is not intended to read the buttons. The touch controller IC on the circle sensor module is wired to those buttons and it is responsible for reading and reporting the button states over the host interface (I2C or SPI depending on your device).
  2. The example code in our GitHub repository was mistakenly reverted to an older version that doesn't have button-state reporting. We have updated the code in our GitHub repository to the version that supports button reporting. I apologize for the headaches.
Please go to our repo, choose the correct Arduino project for your hardware (SPI_FlatOverlay or I2C_FlatOverlay), and give that a try: https://github.com/cirque-corp/Cirque_Pinnacle_1CA027/tree/master/Circular_Trackpad/Single_Pad_Sample_Code

Let me know if you have any other questions.

-Patrick
Quote
Jon_B
The three buttons go to SENSOR0 pin 5, 6, or 7.  They don't go to the Arduino (on the 02-000620 board "red" board). In the sample code they just checked in the buttons are read by:

if(DR_Asserted())
{

Pinnacle_GetAbsolute(&touchData);

Serial.println(touchData.buttonFlags);

}
Quote
Patrick
Good catch, Jon. I was looking at the wrong dev kit ðŸ˜³ I'm editing my original answer to save confusion.
Quote
Flo
Hi Patrick, Hi Jon,

i downloaded your new version. And there it is, exactly what i want. Thanks for your fast help.

Greetings from Munich,
Flo
Quote
Flo
Hey guys,

i have another request. Could you make it possible that you can use the buttons in conjunction with the SPI_CurvedOverlay. I have the feeling that the trackpad thus performs better and more accurately.

Greetings from Munich,
Flo
Quote
Patrick
Hi Flo,

The code examples on GitHub were all updated to support button state reporting. If you go to the curved overlay example code and try that, it should work for your curved overlay modules.

Please let us know if you have any more questions.

-Patrick
Quote
Flo
Yes, got it. Works fine.

Thanks
Quote