In-air mouse using Freedom board
Dependencies: MMA8451Q TSI USBDevice mbed
Fork of USBMouse_HelloWorld by
First project using (and testing out) the Freescale Freedom board.
Plug the USB (not SDA) connector into your machine.
Tilt the board to move the cursor, and use the touch sensor for left and right click.
Diff: main.cpp
- Revision:
- 3:b8caa902d79e
- Parent:
- 2:e7b766501add
- Child:
- 5:46a260b843b9
diff -r e7b766501add -r b8caa902d79e main.cpp --- a/main.cpp Wed Nov 30 11:00:01 2011 +0000 +++ b/main.cpp Sun Oct 14 12:39:53 2012 +0000 @@ -12,6 +12,7 @@ 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);