Clean up potentiometer code.
Pull out potentiometer as a library that emits on the `read` event.