Pages: [1]   Go Down
Author Topic: Arduino Library for the Atmel AT42QT1070 Touch Capacitance chip  (Read 2551 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Karma: 0
Posts: 6
I love YaBB 1G - SP1!
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset


So recently I have been developing an arduino based camera trigger device called which uses 4 touch capacitance buttons for its main interface. The device specifically uses the Atmel AT42QT1070 in "Comms" mode (using i2c). So rather then just write some one off code for the project, I decided to transform the touch capacitance code into an Arduino Library.

You can download it here:

I made a small write up on my blog of how to use it here:

Just to get you started though, here is the code in loop() from one of the examples

if(touch.hit() == true) //checks if the hit flag has been triggered by the interrupt
hitKeyNum = touch.readActiveKey();

   if(hitKeyNum == 9) //key #9 is end of key press signal (key up)
       Serial.print("button #");
       Serial.println(" Down");

Other then that loop() code you just need to instantiate the object, and declare your variables. Dead simple. There is also an example included in the library that shows how to detect press and hold.

If you have any feed back on the library (things to change, etc) please let me know! I hope some people find this useful!
« Last Edit: February 07, 2012, 12:22:20 am by aleph8nought » Logged

Pages: [1]   Go Up
Jump to: