Arduino magnet wire wrapping assitant

I’m wrapping my own magnetic coils for a project I’m working on and I need to wrap each coil 600 times. To help keep track of the count I made an assistant out of an Arduino and a photo resistor. In this test I wrap black tape around the chuck on a drill and then put a strip of white tape over it. Shining a light from underneath reflects off the white strip as it rotates and shines more brightly into the photocell. The Arduino uses this change in brightness to count how many rotations the drill makes and when it gets to the right amount an LED turns on. In the video example the light turns on after 10 rotations. Code is included below.