Chris Styles
/
DemoBoard_USB_Mouse
Revision 0:89d3ef1a9362, committed 2009-09-19
- Comitter:
- chris
- Date:
- Sat Sep 19 07:47:37 2009 +0000
- Commit message:
Changed in this revision
diff -r 000000000000 -r 89d3ef1a9362 lwip.lib --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/lwip.lib Sat Sep 19 07:47:37 2009 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_unsupported/code/lwip/ \ No newline at end of file
diff -r 000000000000 -r 89d3ef1a9362 main.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Sat Sep 19 07:47:37 2009 +0000 @@ -0,0 +1,22 @@ +#include "DemoBoard.h" + +/* + * This project uses the USB interface configured as a mouse, using the HID device class + * Thw X,Y pots give the mouse control, and the buttons are the mouse buttons + */ + +int main() { + + while(1) { + + // read the pots, use them to offset and scale the X,Y values + float mx = ((potx.read()-0.50f) * 100.0f); + float my = ((poty.read()-0.54f) * 130.0f); + + // Call the mouse function with the X,Y and button status + hid.mouse(mx, -my, RedButton.read()); + } + +} + +
diff -r 000000000000 -r 89d3ef1a9362 mbed.bld --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Sat Sep 19 07:47:37 2009 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/f63353af7be8