Detach servo resource when done

This commit is contained in:
Kenwood 2021-07-14 20:49:47 -04:00
parent cadc2b0c6a
commit c2d9fb20d7
1 changed files with 3 additions and 1 deletions

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;
}
}