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.
Diff: main.cpp
- Revision:
- 0:6acdcddacc92
--- /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