Skip to content

Instantly share code, notes, and snippets.

@Palantir555 Palantir555/main.cpp
Last active Jan 2, 2016

Embed
What would you like to do?
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
You can’t perform that action at this time.