Spam mouse clicks
Revision 0:32f77a353ea8, committed 2014-02-28
- Comitter:
- Palantir
- Date:
- Fri Feb 28 09:45:35 2014 +0000
- Commit message:
- First commit
Changed in this revision
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/USBDevice.lib Fri Feb 28 09:45:35 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/USBDevice/#849c0c0f2769
--- /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
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/mbed.lib Fri Feb 28 09:45:35 2014 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/users/mbed_official/code/mbed/#f37f3b9c9f0b