Lab 3 part 2 - USBMouse

Dependencies:   USBDevice mbed

Fork of FTF2014_lab3_part1 by Freescale

Revision:
0:8fee585e7c6d
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Mon Apr 07 15:42:16 2014 +0000
@@ -0,0 +1,20 @@
+#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);
+    }
+}