diff --git a/libraries/Servo/src/Servo.cpp b/libraries/Servo/src/Servo.cpp index 57294102b5..1404f36775 100644 --- a/libraries/Servo/src/Servo.cpp +++ b/libraries/Servo/src/Servo.cpp @@ -82,9 +82,9 @@ uint8_t Servo::attach(int pin, uint16_t minUs, uint16_t maxUs) void Servo::detach() { if (_attached) { + pinMode(_pin, INPUT); stopWaveform(_pin); _attached = false; - digitalWrite(_pin, LOW); } }