Skip to content

Instantly share code, notes, and snippets.

@lazychino
Last active August 29, 2015 13:55
Show Gist options
  • Save lazychino/8732871 to your computer and use it in GitHub Desktop.
Save lazychino/8732871 to your computer and use it in GitHub Desktop.
arduino mouse prank
/*
Evil Mouse by Pedro A. Melendez
inspired by Evil mouse prank http://youtu.be/ltK_evtTdyY
Hide an arduino behind some friend computer and watch xD
** this program works with arduino or any device(arduino derivative) that support keyboard and mouse library **
*/
void setup() {
Mouse.begin(); //activate mouse mode
randomSeed(analogRead(0));
}
void loop() {
// move randomly the pointer 100 times
for(int i=0; i < 100; i++)
Mouse.move(random(-100, 100),random(-100, 100));
// sleep for up to 30 seconds so the behavior is not obvious
delay(random(30000));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment