https://www.luisllamas.es/usar-un-optointerruptor-con-arduino/
Hacer un encoder óptico con un optointerruptor y Arduino