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.
main.cpp
00001 /* Program Example 12.5: Emulating a USB mouse 00002 */ 00003 #include "mbed.h" // include mbed library 00004 #include "USBMouse.h" // include USB Mouse library 00005 USBMouse mouse; // define USBMouse interface 00006 00007 int dx[]={40,0,-40,0}; // relative x position co-ordinates 00008 int dy[]={0,40,0,-40}; // relative y position co-ordinates 00009 00010 int main() { 00011 while (1) { 00012 for (int i=0; i<4; i++) { // scroll through position co-ordinates 00013 mouse.move(dx[i],dy[i]); // move mouse to co-ordinate 00014 wait(0.2); 00015 } 00016 } 00017 } 00018
Generated on Mon Jul 25 2022 22:15:39 by
1.7.2