...

Dependencies:   MMA8451Q mbed-rtos mbed

Fork of Super_Hans_USB by Tristan Hughes

Files at this revision

API Documentation at this revision

Comitter:
anuragdhutti
Date:
Fri Dec 27 22:04:23 2013 +0000
Parent:
0:d270a9981e69
Commit message:
Superhans mbed code

Changed in this revision

USBDevice.lib Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/USBDevice.lib	Mon Dec 16 11:04:05 2013 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,1 +0,0 @@
-http://mbed.org/users/mbed_official/code/USBDevice/#4f6df64750bd
--- a/main.cpp	Mon Dec 16 11:04:05 2013 +0000
+++ b/main.cpp	Fri Dec 27 22:04:23 2013 +0000
@@ -40,8 +40,12 @@
     while(true) {
 
         USB_mutex.lock();
-        key_mouse.move(-acc.getAccX()*10, 0);
-        key_mouse.move(0, acc.getAccY()*10);
+        pc.printf("%f, %f, %f\n", acc.getAccX(), acc.getAccY(), acc.getAccZ() );
+        
+        if (acc.getAccZ()
+        
+        key_mouse.move(-acc.getAccZ()*10, 0);
+        key_mouse.move(0, acc.getAccX()*10);
         USB_mutex.unlock();
         Thread::wait(1);
     }
@@ -62,7 +66,7 @@
 
 int main()
 {
-    Thread click(click_thread);
+    //Thread click(click_thread);
     Thread mouse(mouse_thread);
     Thread heartbeat(heartbeat_thread);