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 #include "DemoBoard.h" 00002 00003 /* 00004 * This project uses the USB interface configured as a mouse, using the HID device class 00005 * Thw X,Y pots give the mouse control, and the buttons are the mouse buttons 00006 */ 00007 00008 int main() { 00009 00010 while(1) { 00011 00012 // read the pots, use them to offset and scale the X,Y values 00013 float mx = ((potx.read()-0.50f) * 100.0f); 00014 float my = ((poty.read()-0.54f) * 130.0f); 00015 00016 // Call the mouse function with the X,Y and button status 00017 hid.mouse(mx, -my, RedButton.read()); 00018 } 00019 00020 } 00021 00022
Generated on Tue Jul 12 2022 19:42:42 by
1.7.2