ESP32_New_ISR_Servo Library

ESP32_New_ISR_Servo library GitHub release
arduino-library-badge

Why do we need this ESP32_New_ISR_Servo library

Features

This library enables you to use 1 Hardware Timer on an ESP32, ESP32_S2, ESP32_C3-based board to control up to 16 independent servo motors.


Currently supported Boards

  1. ESP32 boards, such as ESP32_DEV, etc.
  2. ESP32S2-based boards, such as ESP32S2_DEV, ESP32_S2 Saola, etc.
  3. ESP32C3-based boards, such as ESP32C3_DEV, etc.


Changelog

Releases v1.0.0

  1. Basic 16 ISR-based servo controllers using 1 hardware timer for ESP32, ESP32_S2, ESP32_C3-based board
  2. Tested with ESP32 core v2.0.0-rc1+

Examples

  1. ESP32_New_ISR_MultiServos
  2. ESP32_New_MultipleRandomServos
  3. ESP32_New_MultipleServos
  4. ISR_MultiServos
  5. MultipleRandomServos
  6. MultipleServos

Example ESP32_New_ISR_MultiServos on ESP32S2_DEV

The following is the sample terminal output when running example ESP32_New_ISR_MultiServos to demonstrate how to control multiple Servos using 1 hardware timer.

Starting ESP32_New_ISR_MultiServos on ESP32S2_DEV
ESP32_New_ISR_Servo v1.0.0
[ISR_SERVO] ESP32_S2_TimerInterrupt: _timerNo = 3 , _fre = 1000000
[ISR_SERVO] TIMER_BASE_CLK = 80000000 , TIMER_DIVIDER = 80
[ISR_SERVO] _timerIndex = 1 , _timerGroup = 1
[ISR_SERVO] _count = 0 - 10
[ISR_SERVO] timer_set_alarm_value = 10.00
[ISR_SERVO] Starting  ITimer OK
Setup Servo1 OK
Setup Servo2 OK
Servo1 pos = 0, Servo2 pos = 180
Servo1 pos = 30, Servo2 pos = 150
Servo1 pos = 60, Servo2 pos = 120
Servo1 pos = 90, Servo2 pos = 90
Servo1 pos = 120, Servo2 pos = 60
Servo1 pos = 150, Servo2 pos = 30
Servo1 pos = 180, Servo2 pos = 0

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.