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.
Revision 0:6acdcddacc92, committed 2013-11-07
- Comitter:
- gcarmonar
- Date:
- Thu Nov 07 14:18:51 2013 +0000
- Commit message:
- USB mouse advanced example
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/USBDevice.lib Thu Nov 07 14:18:51 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/USBDevice/#d495202c90f4
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp Thu Nov 07 14:18:51 2013 +0000
@@ -0,0 +1,20 @@
+#include "mbed.h"
+#include "USBMouse.h"
+
+USBMouse mouse;
+
+int main() {
+ int x = 0;
+ int y = 0;
+ int radius = 10;
+ int 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.001);
+ }
+}
\ No newline at end of file
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.bld Thu Nov 07 14:18:51 2013 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/builds/a9913a65894f \ No newline at end of file