• It's Alive!

    Howard Jones07/11/2016 at 19:34 0 comments

    I got a nice overview image in the Windows app, where you can click on the display that the hardware is attached to. I also got global hotkeys working, so you can actually twist the device and the screen changes! Pretty cool...

    Next issue: the digispark board has one of those PCB-track USB plugs, and it's a little bit short, so in my actual monitor I think only the power lines are making contact (they're a bit longer). I also seem to be having problems with some hubs - even with a USB extension, it's hit or miss whether the 'keyboard' is detected, whereas it's fine plugged into a standalone powered hub. It's not clear if this is an issue with borderline spec USB from V-USB or another power/connector issue. The real answer is to make my own dongle, I guess.

  • Little more progress

    Howard Jones07/11/2016 at 11:36 0 comments

    Switched to Linux - now I can actually program the DigiSpark! The final result is a HID keyboard, so shouldn't have the same driver issues.

    I have a test working now, with a digispark and tiltswitch producing keystrokes as I move it. Currently it sends 'a' and 'b' so I can see what's going on, but the final version will be something like Shift-Win-F9 and Shift-Win-F10.

    The software side flips nicely when a dialog button is pressed - next steps there are:

    • Something to draw a diagram of the screen layout so you can pick which monitor to rotate visually.
    • Register global keyboard shortcuts for those two keys.

  • Assembling

    Howard Jones07/07/2016 at 12:56 0 comments

    The Digisparks and tilt switches have arrived. I also got a working C# app to test the rotation part. Current issues:

    • The digispark driver won't load on Windows 10
    • The Windows EnumDisplayDevices() API call produces "interesting" output - it would be nice if the IDs matched up with those in the Displays control panel. Otherwise, I'd want an OSD 'identify' option like that control panel does - so how to figure out which displays match up to which areas of the desktop?
    • It's conceivable you'd want more than one of these things, so I'm thinking about adding a 1-wire chip, just to get the unique ID. DS18B20 temperature sensors are about $2 a pop (the simple 'serial number' chips aren't really much cheaper, and I already have some temperature sensors).

  • Assembling resources

    Howard Jones06/28/2016 at 08:35 0 comments

    I ordered some digisparks from ebay, and a packet of ball-tilt switches.

    From the HID reference, I'm going to try using F23 and F24 to signal position 1 and 2 respectively (depending the the orientation of the monitor's USB ports, that might be portrait/landscape or landscape/portrait): http://www.usb.org/developers/hidpage/Hut1_12v2.pdf

    I also found an existing digispark example for a V-USB based keyboard.

    And finally, a C# gist for the actual screen rotation part: https://gist.github.com/umq/986635

    Hopefully this can be a short project!