Arduboy as a desktop switch / screen locker

A while ago I made a little program that turns the Arduboy into a remote control for locking my screen at switching between multiple desktops!

I never actually got around to posting the source code though. So here it is!

Nothing super complicated, just pretending to be a keyboard and sending shortcuts to the computer. I need to lock my computer at work whenever I leave it, so this was basically just to make that easier :slight_smile:

Also, the Arduboy has been running this program pretty much constantly for the past 2+ years? I’m not sure if any other Arduboy has been used that much, but happy to report it’s still working great!

And don’t worry, I bought another one so that I can still play Arduboy games while this one is stuck at work :grin:

5 Likes

This is cool, I love functional uses for the Arduboy! I used it to control a CNC machine one time! Nice.

You could scrap Keystate and simplify the code quite a bit if you updated the code to Arduboy2 and used the justPressed function.