implement analog read.
refactor pin observer.