Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: F042K6_USBDevice mbed
Fork of L152RE_USBDevice_example by
main_mouse.cpp
00001 #if 1 00002 // https://developer.mbed.org/handbook/USBMouse 00003 #include "mbed.h" 00004 #include "USBMouse.h" 00005 00006 int main() { 00007 USBMouse mouse; 00008 00009 int16_t x = 0; 00010 int16_t y = 0; 00011 int32_t radius = 10; 00012 int32_t angle = 0; 00013 00014 while (1) { 00015 x = cos((double)angle*3.14/180.0)*radius; 00016 y = sin((double)angle*3.14/180.0)*radius; 00017 00018 mouse.move(x, y); 00019 angle += 3; 00020 wait(0.005); 00021 } 00022 } 00023 00024 #endif
Generated on Fri Jul 15 2022 21:29:07 by
1.7.2
