changed tachometer to interrupt-based. untested