Skip to content

Instantly share code, notes, and snippets.

@glennlopez
Last active May 11, 2023 06:25
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save glennlopez/e6686d45057d2a45c5f3847005243284 to your computer and use it in GitHub Desktop.
Save glennlopez/e6686d45057d2a45c5f3847005243284 to your computer and use it in GitHub Desktop.
VR Helper for Shadow PC (Hardware solution)
/*
Keeps your local and cloud computer or mobile device awake by
turning your arduino/teensy into a hardware mouse
*/
#include <Mouse.h>
void setup() { } // no setup needed
void loop() {
int start = random(700, 9000);
int pixels = random(1, 3);
int speed = random(5, 50);
int i;
for (i=0; i<pixels; i++) {
Mouse.move(1, 0);
delay(speed);
}
for (i=0; i<pixels; i++) {
Mouse.move(-1, 0);
delay(speed);
}
delay(start);
}
@glennlopez
Copy link
Author

glennlopez commented Mar 2, 2022

NOTE: A pro-micro or equivalent Atmega32U4 microcontroller is required. Arduino Microcontrollers using an Atmega328P (Arduino Uno) is not compatible.

This doesn’t attempt to bypass auto shutdown (it will not keep your session alive if you exit the app or have the app out of focus - doing something else on your host pc). This doesn't modify proprietary hardware or code that Blade/Shadow PC owns/uses. It does not hack their services or bypass existing security measures, and no windows registers are edited on shadow or the host pc so no TOS is violated.

No installation of software is required. This is a pure hardware plug and play solution similar to a custom built HID (ie: a Flight Sim custom control deck running on a teensy board, or a Sofle/CKRT custom keyboard running on a Pro-Micro). This is user-end hardware fix. Nothing is done on the server side.

Random movements to extend support for the fix (increase the permutations as needed)
"int start": random delay between each mouse movements
"int pixels": random pixel distance the mouse will move to and back
"int speed": random speed for the mouse movement

If your local pc sysadmin blocks HID devices called "Arduino" you can just change your HID device name to mimic one that is allowed (Logitech Mouse). https://www.youtube.com/watch?v=6cskac0Dzjo

PIR/Motion assisted version here: (recommended version) https://gist.github.com/glennlopez/e45f7eee9ee59f4be06360ce0b5f5b10
The PIR assisted version adds natural random movements making automated movements harder to detect by your local pc sysadmin - this version will kick you out of your shadow pc session if you leave the room or fall asleep - even if you have the app open and in-focus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment