Example Hello World example for interfacing the AT42QT1010 Device

Dependencies:   AT42QT1010 mbed

Files at this revision

API Documentation at this revision

Comitter:
jnagendran3
Date:
Mon Oct 20 13:14:18 2014 +0000
Child:
1:6f970f5a63d4
Commit message:
Initial Example

Changed in this revision

AT42QT1010.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
mbed.bld Show annotated file Show diff for this revision Revisions of this file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/AT42QT1010.lib	Mon Oct 20 13:14:18 2014 +0000
@@ -0,0 +1,1 @@
+http://developer.mbed.org/users/jnagendran3/code/AT42QT1010/#7eca199a5506
--- /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);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Mon Oct 20 13:14:18 2014 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/552587b429a1
\ No newline at end of file