This is my first digispark project. I love how small this thing is, and that I can be a USB keyboard!
I can't find where to buy one in the UK (everywhere is out of stock), so I had to get a clone from eBay. I would rather support the people who designed it by buying an authentic version, but that didn't seem to be possible.
Anyway...
I put a tilt switch on my digispark and plug it into my monitor (it has a USB hub built-in). Now when I rotate my monitor, the digispark sends the hotkeys (I have Windows with Intel graphics, but I also made it work on my MacBook) to rotate the desktop so that the picture is always the right way around.
Code and simple explanation is here:
https://gist.github.com/Grezzo/148d25de66fe82916d90Any ideas for improvements are welcome.