Spam mouse clicks

Dependencies:   USBDevice mbed

Revision:
0:32f77a353ea8
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/main.cpp	Fri Feb 28 09:45:35 2014 +0000
@@ -0,0 +1,13 @@
+#include "mbed.h"
+#include "USBMouse.h" //The library to work as a mouse
+
+USBMouse mouse; //Declare the object mouse
+DigitalIn myInput(p5); //Set an input to control when to send clicks
+
+int main() {
+    myInput.mode(PullDown); //Internal pull-down resistor in the input pin
+    while (1) { //Forever:
+        if(myInput.read()==1) //If the input button/switch is enabled
+            mouse.click(MOUSE_LEFT); //click
+    }
+}
\ No newline at end of file