![](/media/cache/img/default_profile.jpg.50x50_q85.jpg)
FRDM-K64 USB air mouse demo
Dependencies: FXOS8700Q USBDevice mbed
Revision 0:d50fb46005fd, committed 2014-07-09
- Comitter:
- APanecatl
- Date:
- Wed Jul 09 19:33:09 2014 +0000
- Commit message:
- rev 1.0
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/FXOS8700Q.lib Wed Jul 09 19:33:09 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/JimCarver/code/FXOS8700Q/#5553a64d0762
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/USBDevice.lib Wed Jul 09 19:33:09 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/USBDevice/#0c6524151939
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/main.cpp Wed Jul 09 19:33:09 2014 +0000 @@ -0,0 +1,28 @@ +#include "mbed.h" +#include "USBMouse.h" +#include "FXOS8700Q.h" + +//I2C lines for FXOS8700Q accelerometer/magnetometer +FXOS8700Q_acc acc( PTE25, PTE24, FXOS8700CQ_SLAVE_ADDR1); + +USBMouse mouse; + +int main() +{ + acc.enable(); + float faX, faY, faZ; + int16_t x = 0; + int16_t y = 0; + + while (1) + { + //acc.getAxis(acc_data); + acc.getX(&faX); + acc.getY(&faY); + x = 10*faX; + y = 10*faY; + + mouse.move(x, y); + wait(0.001); + } +} \ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Wed Jul 09 19:33:09 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/024bf7f99721 \ No newline at end of file