Tag archive for: ESP32Servo

How to control a servo motor with an ESP32 development board

When I try to reuse the Ardunio Sketch to control a servo motor with a ESP8266, I encountered the following error during compile time:

WARNING: library Servo claims to run on (avr, sam, samd, nrf52, stm32f4) architecture(s) and may be incompatible with your current board which runs on (esp32) architecture(s).
In file included from /Users/i309663/Documents/learning/Arduino-sketches/sketch_arduino_servo/sketch_arduino_servo.ino:1:0:
/Users/i309663/Arduino.1.8.7/Arduino.app/Contents/Java/libraries/Servo/src/Servo.h:73:2: error: #error “This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor.”
#error “This library only supports boards with an AVR, SAM, SAMD, NRF52 or STM32F4 processor.”
^
exit status 1
Error compiling for board ESP32 Dev Module.

Therefore, I had to find another way to control my SG90 servo motor with an ESP32 development board.

Given that, this post shows how to control a servo motor with an ESP32 development board.

ESP32 devkit-c v4 connected to sg90 servo motor