Close

User interface

A project log for MURB

A binary clock

BiraBira 03/11/2015 at 13:420 Comments

I wanted an easy to use interface for MURB. I've always hated having to go around all the 60 minutes because I've missed the right time by one and the clock's interface didn't let me go back. I decided to go for a rotary encoder. I had an old mouse lying around so I "recycled" its wheel encoder into the project.

My first approach was to treat the transitions via interrupts. However, I never got it to work. Perhaps the old encoder was bouncing too much (lame excuse) or I couldn't find all the bugs in my code (more likely). Finally I gave up and went with a pooling strategy. MURB is not a high performance position control project after all. The result is that MURB miss a step or jump two at once from time to time but this is nothing too annoying.

Still, I hasn't too happy about not getting the interrupts right. I should probably have tried one of the solutions here.

The rest of the interface is composed of a single push-button, with debounce done in software. The button is also pooled.

Discussions