If I use delay, then my IR sensor stops reading values which is what I want to avoid. I want to servo to spin until the sensor reads a value and then stop for 5 seconds then spin again.
Can you please explain where exactly I call millis() again?
Thanks!