Skip to content

Commit 2518744

Browse files
authored
Merge pull request #30 from brentru/fix-servo-example-esp32
adding fix for esp32 servo
2 parents ac952a4 + 1530a9e commit 2518744

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

examples/adafruitio_16_servo/adafruitio_16_servo.ino

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,13 @@
2020

2121
/************************ Example Starts Here *******************************/
2222

23-
#include <Servo.h>
23+
#if defined(ARDUINO_ARCH_ESP32)
24+
// ESP32Servo Library (https://github.com/madhephaestus/ESP32Servo)
25+
// installation: library manager -> search -> "ESP32Servo"
26+
#include <ESP32Servo.h>
27+
#else
28+
#include <Servo.h>
29+
#endif
2430

2531
// pin used to control the servo
2632
#define SERVO_PIN 2
@@ -61,7 +67,6 @@ void setup() {
6167
// we are connected
6268
Serial.println();
6369
Serial.println(io.statusText());
64-
servo_feed->get();
6570

6671
}
6772

0 commit comments

Comments
 (0)