This is quite simple. You are moving l1 until it no longer activates at a certain threshold. So I guess you could just do{servo.write(CurrentDegrees+Value); Value +=1} while result < threshold;
This is quite simple. You are moving l1 until it no longer activates at a certain threshold. So I guess you could just do{servo.write(CurrentDegrees+Value); Value +=1} while result < threshold;