Replies: 1 comment
-
With the analog reading revamped, crank detection is pretty darn quick now, less than a second. A much simpler, cruder solution here to be able to dock/undock live is to just create a menu option that runs through the detection routine again. I think this would suffice… it’s not like it has to be on-the-fly, just doable while running. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Right now the setup() includes a step that samples the crank voltage for a few seconds, and calculated how much that voltage is wandering. An unconnected pin’s voltage will wander significantly more than the crank plugged in but at rest, and this is how digigurdy detects its crank at startup.
It’d be cool to find a strategy for 1) gracefully recognizing when the crank becomes unplugged, and 2) periodically check when the crank isn’t plugged in to see if it’s there now. In other words, support docking and un-docking with the crank on-the-fly.
I’m not sure how to periodically sample the crank without interrupting play. It’d have to be built into the loop() (i.e. sampling as it goes, not the loop with delay() that we have now).
A compromise that shouldn’t be as bad is a menu option to just tell the digigurdy to re-detect or disengage the crank when you want to dock/undock it.
No milestone for this one… still mulling over it. Right now the crank is annoying me in the rewrite code :-)
Beta Was this translation helpful? Give feedback.
All reactions