Created
April 4, 2021 18:10
-
-
Save Boot-Error/394b2102a1a23b8baf0bc80c18ebe898 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| #include <DigiMouse.h> | |
| // wait for DELAY_MINUTES, this is less than your | |
| // screen saver's timeout | |
| #define DELAY_MINUTES 2 | |
| void setup(){ | |
| DigiMouse.begin(); | |
| pinMode(1, OUTPUT); | |
| } | |
| void loop() { | |
| while(true) { | |
| // blinks the on-board LED to indicate mouse movement | |
| digitalWrite(1, HIGH); | |
| // moves the cursor right 30px | |
| DigiMouse.move(30 ,0,0); | |
| DigiMouse.delay(50); | |
| // move the cursor left 30px | |
| DigiMouse.move(-30,0,0); | |
| digitalWrite(1, LOW) | |
| DigiMouse.delay(DELAY_MINUTES * 60000); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment