Controlling a Gotek/HxC floppy emulator with a rotary encoder

0 Просмотры
I have a Gotek USB floppy drive emulator flashed with HxC firmware.

I've been experimenting with controlling it using a rotary encoder attached to the Gotek control buttons via an Arduino with some custom software I've written.

I found that the Gotek buttons are quite slow to respond, and require 145ms to reliably register a 'press'. I also need a delay of 85ms between presses to reliably register as separate events. So a total of 230ms per press, or about four events per second.

It's possibly to spin the rotary encode much faster than this. I've experimented with buffering up the 'clicks' and then playing them back at a rate the Gotek can handle. This works so far, but if you get too many then it will take several seconds to finish, which gives a very confusing user experience.

I decided to allow a certain number of clicks to be buffered (in this case five). Above that, the user is probably spinning it so fast they don't care about the exact number of clicks, they just want to scroll as fast as they can. So above five clicks in the buffer I switch to simulating holding down the button on the Gotek, which activates a slightly faster continuous scrolling mode (about 170ms per item). I then release the button if the user stops spinning for more than half a second.

This gives a fairly accurate and fairly responsive 'feel' to the control, and I think it's probably worthwhile continuing with my experiment :-)
Комментариев нет.