Detach servo resource when done

This commit is contained in:
2021-07-14 20:49:47 -04:00
parent cadc2b0c6a
commit c2d9fb20d7

View File

@@ -51,7 +51,9 @@ void receiveEvent(int n) {
switch(id) {
case 1:
windowWiperServo.write(val);
windowWiperServo.write(val); // Set a val
delay(5); // pause for a moment
windowWiperServo.detach(); // Detach (stop moving) the servo
break;
}
}