
NUCLEO-F042K6 USBDevice example code
Dependencies: F042K6_USBDevice mbed
Fork of L152RE_USBDevice_example by
main_mouse.cpp
- Committer:
- va009039
- Date:
- 2016-01-18
- Revision:
- 3:45c2b2d465c4
- Parent:
- 2:c0c2a61188a9
File content as of revision 3:45c2b2d465c4:
#if 1 // https://developer.mbed.org/handbook/USBMouse #include "mbed.h" #include "USBMouse.h" int main() { USBMouse mouse; int16_t x = 0; int16_t y = 0; int32_t radius = 10; int32_t angle = 0; 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.005); } } #endif