Reading pulse and then getting rpm from encoder motor