In-air mouse using Freedom board

Dependencies:   MMA8451Q TSI USBDevice mbed

Fork of USBMouse_HelloWorld by Samuel Mokrani

First project using (and testing out) the Freescale Freedom board.

Plug the USB (not SDA) connector into your machine.

Tilt the board to move the cursor, and use the touch sensor for left and right click.

Files at this revision

API Documentation at this revision

Comitter:
samux
Date:
Wed Nov 30 11:00:01 2011 +0000
Parent:
1:4828a8ce8468
Child:
3:b8caa902d79e
Commit message:

Changed in this revision

USBDevice.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
--- a/USBDevice.lib	Mon Nov 14 11:48:48 2011 +0000
+++ b/USBDevice.lib	Wed Nov 30 11:00:01 2011 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/samux/code/USBDevice/#11f5de8448a8
+http://mbed.org/users/samux/code/USBDevice/#65a34d6b5e22
--- a/main.cpp	Mon Nov 14 11:48:48 2011 +0000
+++ b/main.cpp	Wed Nov 30 11:00:01 2011 +0000
@@ -1,19 +1,19 @@
-#include "mbed.h"
-#include "USBMouse.h"
-
-USBMouse mouse;
-
-int main() {
-    int16_t x = 0;
-    int16_t y = 0;
-    int32_t radius = 10;
-    int32_t angle = 0;
-
-    while (1) {
-        x = cos((double)angle*3.14/180.0)*radius;
-        y = sin((double)angle*3.14/180.0)*radius;
-        mouse.move(x, y);
-        angle += 3;
-        wait(0.001);
-    }
+#include "mbed.h"
+#include "USBMouse.h"
+
+USBMouse mouse;
+
+int main() {
+    int16_t x = 0;
+    int16_t y = 0;
+    int32_t radius = 10;
+    int32_t angle = 0;
+
+    while (1) {
+        x = cos((double)angle*3.14/180.0)*radius;
+        y = sin((double)angle*3.14/180.0)*radius;
+        mouse.move(x, y);
+        angle += 3;
+        wait(0.001);
+    }
 }
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Wed Nov 30 11:00:01 2011 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/7110ebee3484