commit b1808fda464c3d3e92f2441ea773179f237e64de Author: Knut Ahlers Date: Tue Jul 4 18:45:06 2023 +0200 Initial version Signed-off-by: Knut Ahlers diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..03f4a3c --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +.pio diff --git a/README.md b/README.md new file mode 100644 index 0000000..c326a78 --- /dev/null +++ b/README.md @@ -0,0 +1,41 @@ +# Luzifer / attiny85-mouse + +Using [Barrier](https://github.com/debauchee/barrier) and every time you disconnect the mouse from the gaming PC all the games start freaking out and drawing mouse cursors? Just let them think there still is a mouse attached by emulating a mouse doing exactly nothing! + +## Requirements + +- [AZDelivery Digispark Rev.3 Kickstarter](https://amzn.to/43g5WZk) +- [Platform.IO](https://platformio.org/) (in my case: [AUR/platformio](https://aur.archlinux.org/packages/platformio)) +- [Micronucleus](https://github.com/micronucleus/micronucleus) (in my case: [AUR/micronucleus](https://aur.archlinux.org/packages/micronucleus)) + +## Build + +```console +# platformio run -t upload +Processing attiny85 (platform: atmelavr; board: digispark-tiny; framework: arduino) +[...] +Linking .pio/build/attiny85/firmware.elf +Checking size .pio/build/attiny85/firmware.elf +Advanced Memory Usage is available via "PlatformIO Home > Project Inspect" +RAM: [== ] 18.0% (used 92 bytes from 512 bytes) +Flash: [==== ] 44.2% (used 2656 bytes from 6012 bytes) +Building .pio/build/attiny85/firmware.hex +Configuring upload protocol... +AVAILABLE: custom +CURRENT: upload_protocol = custom +Uploading .pio/build/attiny85/firmware.hex +> Please plug in the device (will time out in 60 seconds) ... +> Device is found! +connecting: 40% complete +> Device has firmware version 1.6 +> Available space for user applications: 6012 bytes +> Suggested sleep time between sending pages: 8ms +> Whole page count: 94 page size: 64 +> Erase function sleep duration: 752ms +parsing: 60% complete +> Erasing the memory ... +erasing: 80% complete +> Starting to upload ... +writing: 100% complete +>> Micronucleus done. Thank you! +``` diff --git a/platformio.ini b/platformio.ini new file mode 100644 index 0000000..d6bed1b --- /dev/null +++ b/platformio.ini @@ -0,0 +1,10 @@ +[env:attiny85] +board = digispark-tiny +framework = arduino +platform = atmelavr + +board_build.f_cpu = 16500000L +board_build.mcu = attiny85 + +upload_command = micronucleus --timeout 60 $SOURCE +upload_protocol = custom diff --git a/src/main.ino b/src/main.ino new file mode 100644 index 0000000..5369767 --- /dev/null +++ b/src/main.ino @@ -0,0 +1,11 @@ +#include + +void setup(){ + DigiMouse.begin(); +} + +void loop() { + for(;;) { + DigiMouse.delay(10000); + } +}