ECE 4180 Lab 1 Extra Credit 5

Dependencies:   USBDevice mbed

Fork of USBMouse_NavSwitch by jim hamblen

Files at this revision

API Documentation at this revision

Comitter:
abraha2d
Date:
Tue Oct 09 00:20:33 2018 +0000
Parent:
5:679a07e00e4c
Commit message:
Save point

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
diff -r 679a07e00e4c -r 36cec468ffca USBDevice.lib
--- a/USBDevice.lib	Mon Jun 26 17:27:42 2017 +0000
+++ b/USBDevice.lib	Tue Oct 09 00:20:33 2018 +0000
@@ -1,1 +1,1 @@
-http://mbed.org/users/mbed_official/code/USBDevice/#c5e178adb138
+http://mbed.org/users/mbed_official/code/USBDevice/#53949e6131f6
diff -r 679a07e00e4c -r 36cec468ffca main.cpp
--- a/main.cpp	Mon Jun 26 17:27:42 2017 +0000
+++ b/main.cpp	Tue Oct 09 00:20:33 2018 +0000
@@ -3,6 +3,8 @@
 //USB mouse demo using a 5-way Navigation Switch (Digital Joystick)
 //Needs USB connector breakout with D+, D-, and Gnd to mbed LLP1768
 USBMouse mouse;
+PwmOut myled(LED1);
+AnalogIn pot(p20);
 
 class Nav_Switch
 {
@@ -79,7 +81,8 @@
         if (myNav.fire()) left_click = 1;
         if (!myNav.fire())left_click = 0;
         //send a mouse data packet to PC
-        mouse.update(x, y, left_click, 0);
-        wait(0.001);
+        myled = pot - 0.5f;
+        mouse.update(x, y, left_click, 10 * (pot - 0.5f));
+        wait(0.01);
     }
 }
\ No newline at end of file
diff -r 679a07e00e4c -r 36cec468ffca mbed.bld
--- a/mbed.bld	Mon Jun 26 17:27:42 2017 +0000
+++ b/mbed.bld	Tue Oct 09 00:20:33 2018 +0000
@@ -1,1 +1,1 @@
-https://mbed.org/users/mbed_official/code/mbed/builds/64910690c574
\ No newline at end of file
+https://os.mbed.com/users/mbed_official/code/mbed/builds/e95d10626187
\ No newline at end of file