Mouse demo

Dependencies:   C12832_lcd EthernetInterface SensorDataParser USBDevice mbed-rtos mbed

Fork of SensorStream_BlinkyDemo by -deleted-

Files at this revision

API Documentation at this revision

Comitter:
wm
Date:
Sun Oct 27 22:10:46 2013 +0000
Parent:
0:14ca3444e0bf
Commit message:
Act as USB Device

Changed in this revision

main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/main.cpp	Sun Oct 27 18:06:48 2013 +0000
+++ b/main.cpp	Sun Oct 27 22:10:46 2013 +0000
@@ -3,11 +3,14 @@
 #include "C12832_lcd.h"
 #include "SensorDataParser.h"
 #include <math.h>
-
+#include "USBMouse.h"
+ 
 static EthernetInterface eth;
 static C12832_LCD lcd;
 static Serial pc(USBTX, USBRX);
 
+USBMouse mouse;
+
 DigitalOut led_left(LED1);
 DigitalOut led_up(LED2);
 DigitalOut led_down(LED3);
@@ -66,6 +69,8 @@
             led_up = fabs(pd.ay) * 2;
             led_down = 0;
         }
+
+        mouse.move(pd.ax*20, pd.ay*30);
     }
 }