Detach servo resource when done
This commit is contained in:
parent
cadc2b0c6a
commit
c2d9fb20d7
|
@ -51,7 +51,9 @@ void receiveEvent(int n) {
|
||||||
|
|
||||||
switch(id) {
|
switch(id) {
|
||||||
case 1:
|
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;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue