hardware fixed encoder using transistor allowing use of external interrupt, fixed typos while at it