Created
January 15, 2022 03:44
-
-
Save mike-pete/72ad569da9d2d0700f290795f2eeedbf to your computer and use it in GitHub Desktop.
Move the mouse back and forth to keep a computer awake
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
#include <DigiMouse.h> | |
#include <oddebug.h> | |
#include <osccal.h> | |
#include <osctune.h> | |
#include <usbconfig-prototype.h> | |
#include <usbconfig.h> | |
#include <usbdrv.h> | |
#include <usbportability.h> | |
void setup() { | |
pinMode(1, OUTPUT); | |
DigiMouse.begin(); //start | |
} | |
void loop() { | |
digitalWrite(1, HIGH); | |
DigiMouse.moveX(1); // | |
DigiMouse.delay(500); | |
digitalWrite(1, LOW); | |
DigiMouse.moveX(-1); | |
DigiMouse.delay(500); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment