madhephaestus / ESP32Servo

Arduino-compatible servo library for the ESP32
140 stars 55 forks source link

Define PWMRANGE for compatibility with ESP8266 #15

Closed FedericoBusero closed 4 years ago

FedericoBusero commented 4 years ago

By defining PWMRANGE, it is possible to write code which is exactly the same on ESP8266 and ESP32 by using e.g. the map function (PWMRANGE is 1023 on ESP8266)