Last active
January 2, 2016 21:09
-
-
Save Palantir555/8361514 to your computer and use it in GitHub Desktop.
CookieCheater - Cheat at CookieClicker using a mbed microcontroller
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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 in the input pin | |
while (1) { //Forever: | |
if(myInput.read()==1) //If the input button/switch is enabled | |
mouse.click(MOUSE_LEFT); //click | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment