Example Hello World example for interfacing the AT42QT1010 Device

Dependencies:   AT42QT1010 mbed

Revision:
0:3009c861d060
Child:
1:6f970f5a63d4
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Oct 20 13:14:18 2014 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "AT42QT1010.h"
+
+DigitalOut read_led(LED1);
+DigitalOut auto_led(LED2);
+DigitalOut interrupt_led(LED3);
+AT42QT1010 touch_sensor(p21,p23);
+
+void interrupt(){
+    interrupt_led=!interrupt_led;
+}
+
+int main() {
+    touch_sensor.attach(&interrupt);
+    while(1) {
+        read_led = touch_sensor.read();
+        auto_led = touch_sensor;
+        touch_sensor.write(auto_led);
+    }
+}