Created
April 16, 2024 15:53
-
-
Save Fusion86/3993ff473b6ffc60ae86a4bbc297b379 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" | |
void setup() { | |
// don't need to set anything up to use DigiKeyboard | |
// DemonSeed EDU per https://twitter.com/_MG_/status/1209883487353757697 | |
// Enable D- pull-up resistor to attach DemonSeed EDU onto USB as a low-speed (1.5Mbit/s) device | |
pinMode(2, OUTPUT); | |
digitalWrite(2, HIGH); | |
DigiMouse.begin(); | |
} | |
void loop() { | |
unsigned int random_x = 30 - random(70); | |
unsigned int random_y = 30 - random(70); | |
// Move the mouse cursor | |
DigiMouse.moveX(random_x); | |
DigiMouse.moveY(random_y); | |
// Turn on the LED for 0.25 seconds | |
// But we don't have a LED? | |
// digitalWrite(1, HIGH); | |
// DigiMouse.delay(250); | |
// digitalWrite(1, LOW); | |
// 30 sec | |
DigiMouse.delay(30 * 1000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment