In our latest PyroElectro tutorial, we show you how to make a basic optical encoder for any mechanical system. Our example setup uses a simple printer pully and motor system. The write-up includes all source code, schematics and parts lists you'd need to build it.