Wire a KY-040 rotary encoder to precisely determine rotation direction and step count, showing the value on an LCD.