Advertisement
wariat

mysz automagiczna

Jul 9th, 2020
1,547
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. /*
  2.  * Mysz automagiczna  
  3.  */
  4.  
  5. #include <Mouse.h>
  6.  
  7. void setup()
  8. {
  9.   // put your setup code here, to run once:
  10.   Mouse.begin();
  11. }
  12.  
  13. long interval     = 300000;
  14. long next_release = 0;
  15.  
  16. void loop()
  17. {
  18.   // put your main code here, to run repeatedly:
  19.   long now = millis();
  20.  
  21.   if ( now > next_release )
  22.   {
  23.     next_release = now + interval;
  24.    
  25.     Mouse.move( 100, 100, 0 );
  26.     delay( 250 );
  27.     Mouse.move( -100, -100, 0 );
  28.   }  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement