just a try... not working
Dependencies: MMA7660 USBDevice mbed
Diff: main.cpp
- Revision:
- 0:db5334c4dd75
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Fri Feb 21 22:36:15 2014 +0000 @@ -0,0 +1,22 @@ +#include "mbed.h" +#include "USBMouse.h" +#include "MMA7660.h" + +USBMouse mouse; +MMA7660 accel(p28,p27); + +int main() { + int16_t x = 0; + int16_t y = 0; + //int32_t radius = 10; + //int32_t angle = 0; + + while (1) { + x = accel.x(); + y = accel.y(); + + mouse.move(x, y); + //angle += 3; + wait(0.001); + } +} \ No newline at end of file