Gerardo Carmona / Mbed 2 deprecated 15_USBMouse_advanced

Dependencies:   USBDevice mbed

Files at this revision

API Documentation at this revision

Comitter:
gcarmonar
Date:
Thu Nov 07 14:18:51 2013 +0000
Commit message:
USB mouse advanced example

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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/USBDevice.lib	Thu Nov 07 14:18:51 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/USBDevice/#d495202c90f4
--- /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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/mbed.bld	Thu Nov 07 14:18:51 2013 +0000
@@ -0,0 +1,1 @@
+http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f
\ No newline at end of file