Skip to content
This repository was archived by the owner on Jan 29, 2023. It is now read-only.

Commit bd6ff9f

Browse files
authored
v1.2.0 to convert to h-only library, etc
### Releases v1.2.0 1. Add support to new `ESP32-S3` (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.) 2. Add support to new `ESP32-S2` (ESP32S2_DEV, etc.) 3. Add support to new `ESP32-C3` (ESP32C3_DEV, etc.) 4. Convert to h-only library. 5. Optimize library code by using `reference-passing` instead of `value-passing` 6. Improve accuracy by using `float`, instead of `uint32_t` for `position` in degrees 7. Add example [multiFileProject](examples/multiFileProject) to demo for multiple-file project
1 parent 3818717 commit bd6ff9f

12 files changed

+1489
-491
lines changed

CONTRIBUTING.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,12 @@ If you don't find anything, please [open a new issue](https://github.com/khoih-p
1414

1515
Please ensure to specify the following:
1616

17-
* Arduino IDE version (e.g. 1.8.13) or Platform.io version
18-
* `ESP32` Core Version (e.g. ESP32 v1.0.4)
17+
* Arduino IDE version (e.g. 1.8.19) or Platform.io version
18+
* `ESP32` Core Version (e.g. ESP32 core v2.0.2)
19+
* `ESP32` Board type (e.g. ESP32_DEV Module, etc.)
20+
* `ESP32-S2` Board type (e.g. ESP32S2_DEV Module, ESP32_S2_Saola, etc.)
21+
* `ESP32_S3` Board type (e.g. ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.)
22+
* `ESP32-C3` Board type (e.g. ESP32C3_DEV Module, etc.)
1923
* Contextual information (e.g. what you were trying to achieve)
2024
* Simplest possible steps to reproduce
2125
* Anything that might be relevant in your opinion, such as:
@@ -26,10 +30,11 @@ Please ensure to specify the following:
2630
### Example
2731

2832
```
29-
Arduino IDE version: 1.8.13
30-
ESP32 Core Version 1.0.4
31-
OS: Ubuntu 20.04 LTS
32-
Linux Inspiron 5.4.0-54-generic #60-Ubuntu SMP Fri Nov 6 10:37:59 UTC 2020 x86_64 x86_64 x86_64 GNU/Linux
33+
Arduino IDE version: 1.8.19
34+
ESP32 core v2.0.2
35+
ESP32S3_DEV Module
36+
OS: Ubuntu 21.04 LTS
37+
Linux kh-Inspiron-3593 5.13.0-30-generic #33-Ubuntu SMP Fri Feb 4 17:03:31 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
3338
3439
Context:
3540
I encountered a crash while trying to use the Timer Interrupt.

README.md

Lines changed: 263 additions & 261 deletions
Large diffs are not rendered by default.

changelog.md

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# ESP32_ISR_Servo Library
2+
3+
[![arduino-library-badge](https://www.ardu-badge.com/badge/ESP32_ISR_Servo.svg?)](https://www.ardu-badge.com/ESP32_ISR_Servo)
4+
[![GitHub release](https://img.shields.io/github/release/khoih-prog/ESP32_ISR_Servo.svg)](https://github.com/khoih-prog/ESP32_ISR_Servo/releases)
5+
[![GitHub](https://img.shields.io/github/license/mashape/apistatus.svg)](https://github.com/khoih-prog/ESP32_ISR_Servo/blob/master/LICENSE)
6+
[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](#Contributing)
7+
[![GitHub issues](https://img.shields.io/github/issues/khoih-prog/ESP32_ISR_Servo.svg)](http://github.com/khoih-prog/ESP32_ISR_Servo/issues)
8+
9+
---
10+
---
11+
12+
## Table of Contents
13+
14+
* [Changelog](#changelog)
15+
* [Releases v1.2.0](#releases-v120)
16+
* [Releases v1.1.0](#releases-v110)
17+
* [Releases v1.0.2](#releases-v102)
18+
* [Releases v1.0.1](#releases-v101)
19+
20+
---
21+
---
22+
23+
## Changelog
24+
25+
### Releases v1.2.0
26+
27+
1. Add support to new `ESP32-S3` (ESP32S3_DEV, ESP32_S3_BOX, UM TINYS3, UM PROS3, UM FEATHERS3, etc.)
28+
2. Add support to new `ESP32-S2` (ESP32S2_DEV, etc.)
29+
3. Add support to new `ESP32-C3` (ESP32C3_DEV, etc.)
30+
4. Convert to h-only library.
31+
5. Optimize library code by using `reference-passing` instead of `value-passing`
32+
6. Improve accuracy by using `float`, instead of `uint32_t` for `position` in degrees
33+
7. Add example [multiFileProject](examples/multiFileProject) to demo for multiple-file project
34+
35+
### Releases v1.1.0
36+
37+
1. Fix bug. See [Fixed count >= min comparison for servo enable](https://github.com/khoih-prog/ESP32_ISR_Servo/pull/1)
38+
2. Clean-up all compiler warnings possible.
39+
3. Add Table of Contents
40+
4. Add Version String
41+
5. Fix and Optimize old examples
42+
43+
#### Releases v1.0.2
44+
45+
1. Add example using [Blynk](http://docs.blynk.cc/) to control servos.
46+
2. Change example names to avoid duplication.
47+
48+
#### Releases v1.0.1
49+
50+
1. Basic 16 ISR-based servo controllers using 1 hardware timer for ESP32.
51+
52+

keywords.txt

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
ESP32_ISR_Servo KEYWORD1
66
ESP32_ISR_Servos KEYWORD1
7-
ESP32FastTimerInterrupt KEYWORD1
7+
ESP32TimerInterrupt KEYWORD1
88
ESP32FastTimer KEYWORD1
99

1010
#######################################
@@ -37,3 +37,21 @@ ESP32_ISR_Servo_Handler KEYWORD2
3737
#######################################
3838
# Literals (LITERAL1)
3939
#######################################
40+
41+
ISR_SERVO_DEBUG LITERAL1
42+
43+
ESP32_ISR_SERVO_VERSION LITERAL1
44+
ESP32_ISR_SERVO_VERSION_MAJOR LITERAL1
45+
ESP32_ISR_SERVO_VERSION_MINOR LITERAL1
46+
ESP32_ISR_SERVO_VERSION_PATCH LITERAL1
47+
ESP32_ISR_SERVO_VERSION_INT LITERAL1
48+
49+
ESP32_MAX_PIN LITERAL1
50+
ESP32_WRONG_PIN LITERAL1
51+
52+
MIN_PULSE_WIDTH LITERAL1
53+
MAX_PULSE_WIDTH LITERAL1
54+
DEFAULT_PULSE_WIDTH LITERAL1
55+
REFRESH_INTERVAL LITERAL1
56+
57+

library.json

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
2-
"name": "ESP32_New_ISR_Servo",
3-
"version": "1.0.0",
4-
"keywords": "timer,interrupt,isr,hardware,servo,esp32,esp32-s2,esp32-c3,mission-critical,precise,non-blocking",
5-
"description": "This library enables you to use 1 Hardware Timer on an ESP32, ESP32_S2, ESP32_C3-based board to control up to 16 or more servo motors.",
2+
"name": "ESP32_ISR_Servo",
3+
"version": "1.2.0",
4+
"keywords": "timer, interrupt, isr, hardware, servo, isr-based-servo, servo-control, esp32, esp32-s2, esp32-s3, esp32-c3, mission-critical, precise, non-blocking",
5+
"description": "This library enables you to use 1 Hardware Timer on an ESP32-based board to control up to 16 or more servo motors. Now supporting ESP32, ESP32_S2, ESP32_S3, ESP32_C3-based boards",
66
"authors":
77
{
88
"name": "Khoi Hoang",
@@ -12,7 +12,7 @@
1212
"repository":
1313
{
1414
"type": "git",
15-
"url": "https://github.com/khoih-prog/ESP32_New_ISR_Servo"
15+
"url": "//https://github.com/khoih-prog/ESP32_ISR_Servo"
1616
},
1717
"homepage": "https://github.com/khoih-prog",
1818
"export": {
@@ -22,7 +22,9 @@
2222
"tests"
2323
]
2424
},
25+
"license": "MIT",
2526
"frameworks": "*",
26-
"platforms": "esp32",
27-
"examples": "examples/*/*/*.ino"
27+
"platforms": "espressif32",
28+
"examples": "examples/*/*/*.ino",
29+
"headers": [ "ESP32_ISR_Servo.h", "ESP32_ISR_Servo.hpp" ]
2830
}

library.properties

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
name=ESP32_ISR_Servo
2-
version=1.1.0
2+
version=1.2.0
33
author=Khoi Hoang
44
maintainer=Khoi Hoang <[email protected]>
55
license=MIT
66
sentence=This library enables you to use Interrupt from Hardware Timers on an ESP32 board to control multiple servo motors.
7-
paragraph=This library enables you to use 1 Hardware Timer on an ESP32-based board to control 16 or more servo motors.
8-
category=Timing,Device,Control,Motor,Time,Servo
7+
paragraph=This library enables you to use 1 Hardware Timer on an ESP32-based board to control 16 or more servo motors. Now supporting ESP32, ESP32_S2, ESP32_S3, ESP32_C3-based boards
8+
category=Device Control
99
url=https://github.com/khoih-prog/ESP32_ISR_Servo
1010
architectures=esp32
11-
includes=ESP32_ISR_Servo.h
11+
includes=ESP32_ISR_Servo.h, ESP32_ISR_Servo.hpp

platformio/platformio.ini

Lines changed: 71 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,10 @@
1212
; ============================================================
1313
; chose environment:
1414
; ESP32
15+
; esp32s2
16+
; esp32s3
17+
; esp32c3
18+
1519
; ============================================================
1620
default_envs = ESP32
1721

@@ -38,7 +42,7 @@ build_flags =
3842

3943
[env:ESP32]
4044
platform = espressif32
41-
framework = arduino, espidf
45+
framework = arduino
4246

4347
; ============================================================
4448
; Board configuration
@@ -77,3 +81,69 @@ board = esp32doit-devkit-v1
7781
;board = iotbusio
7882
;board = iotbusproteus
7983
;board = nina_w10
84+
85+
[env:esp32s2]
86+
platform = espressif32
87+
framework = arduino
88+
89+
; toolchain download links see
90+
; refer "name": "xtensa-esp32s2-elf-gcc","version": "gcc8_4_0-esp-2021r1" section of
91+
; https://raw.githubusercontent.com/espressif/arduino-esp32/gh-pages/package_esp32_dev_index.json
92+
; e.g. Windows: https://github.com/espressif/crosstool-NG/releases/download/esp-2021r1/xtensa-esp32s2-elf-gcc8_4_0-esp-2021r1-win32.zip
93+
platform_packages =
94+
toolchain-xtensa32s2@file://C:\Users\Max\Downloads\xtensa-esp32s2-elf
95+
framework-arduinoespressif32@https://github.com/espressif/arduino-esp32.git#a4118ea88987c28aac3a49bcb9cc5d6c0acc6f3f
96+
platformio/tool-esptoolpy @ ~1.30100
97+
framework = arduino
98+
board = esp32dev
99+
board_build.mcu = esp32s2
100+
board_build.partitions = huge_app.csv
101+
board_build.variant = esp32s2
102+
board_build.f_cpu = 240000000L
103+
board_build.f_flash = 80000000L
104+
board_build.flash_mode = qio
105+
board_build.arduino.ldscript = esp32s2_out.ld
106+
build_unflags =
107+
-DARDUINO_ESP32_DEV
108+
-DARDUINO_VARIANT="esp32"
109+
build_flags =
110+
-DARDUINO_ESP32S2_DEV
111+
-DARDUINO_VARIANT="esp32s2"
112+
113+
114+
[env:esp32s3]
115+
platform = espressif32
116+
framework = arduino
117+
118+
board_build.mcu = esp32s3
119+
board_build.partitions = huge_app.csv
120+
board_build.variant = esp32s3
121+
board_build.f_cpu = 240000000L
122+
board_build.f_flash = 80000000L
123+
board_build.flash_mode = qio
124+
board_build.arduino.ldscript = esp32s3_out.ld
125+
build_unflags =
126+
-DARDUINO_ESP32_DEV
127+
-DARDUINO_VARIANT="esp32"
128+
build_flags =
129+
-DARDUINO_ESP32S3_DEV
130+
-DARDUINO_VARIANT="esp32s3"
131+
132+
133+
[env:esp32sc3]
134+
platform = espressif32
135+
framework = arduino
136+
137+
board_build.mcu = esp32c3
138+
board_build.partitions = huge_app.csv
139+
board_build.variant = esp32c3
140+
board_build.f_cpu = 160000000L
141+
board_build.f_flash = 80000000L
142+
board_build.flash_mode = qio
143+
board_build.arduino.ldscript = esp32c3_out.ld
144+
build_unflags =
145+
-DARDUINO_ESP32_DEV
146+
-DARDUINO_VARIANT="esp32"
147+
build_flags =
148+
-DARDUINO_ESP32S3_DEV
149+
-DARDUINO_VARIANT="esp32c3"

0 commit comments

Comments
 (0)