Last active
August 29, 2015 13:55
-
-
Save lazychino/8732871 to your computer and use it in GitHub Desktop.
arduino mouse prank
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
/* | |
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