Gerardo Carmona / Mbed 2 deprecated 15_USBMouse_advanced

Dependencies:   USBDevice mbed

Revision:
0:6acdcddacc92
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Thu Nov 07 14:18:51 2013 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "USBMouse.h"
+
+USBMouse mouse;
+
+int main() {
+    int x = 0;
+    int y = 0;
+    int radius = 10;
+    int 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