I don't see why, please post your latest code (all of it).
I suggest you move the if ( isActivated ) stuff to the bottom of loop so it isn't controlled by distance but runs unconditionally. Also, leave the led flashing for the code that uses millis.
I don't see why, please post your latest code (all of it).
I suggest you move the if ( isActivated ) stuff to the bottom of loop so it isn't controlled by distance but runs unconditionally. Also, leave the led flashing for the code that uses millis.