Skip to content

Instantly share code, notes, and snippets.

@Palantir555
Last active January 2, 2016 21:09
Show Gist options
  • Save Palantir555/8361514 to your computer and use it in GitHub Desktop.
Save Palantir555/8361514 to your computer and use it in GitHub Desktop.
CookieCheater - Cheat at CookieClicker using a mbed microcontroller
#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