You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Detaching a pin will now occur when the pwm signal is low for jitterless detach.
Fixed a few ambiguous overload attach functions. Required changing pin, ch, munUs and maxUs parameters to int and speed and ke parameters to double.
-**pin** The pin number which (if necessary) will be attached to the next free channel *(uint8_t)*
216
-
-**value** This value is converted to the pwm duty. See above table for range and units *(float)
217
-
-**speed** This value has units degrees/second (float). For example, if `speed` is set to 100 deg/s and the servo position value is changed from 0 to 180 deg, then the servo will take 1.8 sec (1800 ms) to complete its travel. Its motion (response) will be determined by `ke`,
215
+
-**pin** The pin number which (if necessary) will be attached to the next free channel *(int)*
216
+
-**value** This value is converted to the pwm duty. See above table for range and units *(double)
217
+
-**speed** This value has units degrees/second (double). For example, if `speed` is set to 100 deg/s and the servo position value is changed from 0 to 180 deg, then the servo will take 1.8 sec (1800 ms) to complete its travel. Its motion (response) will be determined by `ke`,
218
218
-**ke** Servo easing constant for a [Normalized Tunable Sigmoid](https://www.desmos.com/calculator/ejkcwglzd1). A `ke` value of 0.0 represents a linear response. As you increase `ke`, this increases the steepness of a sigmoid response. When `ke` is 1.0, normal "instantaneous" servo response is enabled and the speed parameter is ignored.
219
219
220
220
##### Returns
221
221
222
222
- If the servo easing constant `ke` is 1.0 (default) then the pwm duty value *(uint32_t)* is returned.
223
-
- If `ke` is less than 1.0, then a normalized float value (0.0 to 1.0) is returned. This represents the programmed servo position from start to stop as it moves over time. When the returned value reaches 0.5, this represents both 50% travel and 50% time duration, no matter what easing constant is set.
223
+
- If `ke` is less than 1.0, then a normalized double value (0.0 to 1.0) is returned. This represents the programmed servo position from start to stop as it moves over time. When the returned value reaches 0.5, this represents both 50% travel and 50% time duration, no matter what easing constant is set.
224
224
225
225
</details>
226
226
@@ -256,7 +256,7 @@ myservo.read(pin)
256
256
257
257
##### Parameters
258
258
259
-
-**pin** The pin number *(uint8_t)
259
+
-**pin** The pin number (int)
260
260
261
261
##### Returns
262
262
@@ -280,7 +280,7 @@ myservo.readMicroseconds(pin)
280
280
281
281
##### Parameters
282
282
283
-
-**pin** The pin number *(uint8_t)
283
+
-**pin** The pin number (int)
284
284
285
285
##### Returns
286
286
@@ -313,15 +313,15 @@ myservo.attach(pin, ch, minUs, maxUs, speed, ke, invert) // as above with inver
313
313
314
314
##### Parameters
315
315
316
-
-**pin** The pin number *(uint8_t)*
316
+
-**pin** The pin number *(int)*
317
317
318
-
-**ch** This optional parameter is used to attach the pin to a specific channel *(uint8_t)*)
318
+
-**ch** This optional parameter is used to attach the pin to a specific channel *(int)*)
319
319
320
-
-**minUs** Minimum timer width in microseconds *(uint16_t)
320
+
-**minUs** Minimum timer width in microseconds *(int)*
321
321
322
-
-**maxUs** Maximum timer width in microseconds *(uint16_t)*
322
+
-**maxUs** Maximum timer width in microseconds *(int)*
323
323
324
-
-**speed** This servo easing parameter has units degrees/second (float). For example, if `speed` is set to 100 deg/s and the servo position value is changed from 0 to 180 deg, then the servo will take 1.8 sec (1800 ms) to complete its travel. Its motion (response) will be determined by `ke`,
324
+
-**speed** This servo easing parameter has units degrees/second (double). For example, if `speed` is set to 100 deg/s and the servo position value is changed from 0 to 180 deg, then the servo will take 1.8 sec (1800 ms) to complete its travel. Its motion (response) will be determined by `ke`,
325
325
326
326
-**ke** Servo easing constant for a [Normalized Tunable Sigmoid](https://www.desmos.com/calculator/ejkcwglzd1). A `ke` value of 0.0 represents a linear response. As you increase `ke`, this increases the steepness of a sigmoid response. When `ke` is 1.0, normal "instantaneous" servo response is enabled and the speed parameter is ignored.
-**pin** The pin number which (if necessary) will be attached to the next free channel *(uint8_t)*
473
+
-**pin** The pin number which (if necessary) will be attached to the next free channel *(int)*
474
474
-**duty** This sets the pwm duty. The range is 0 to (2**resolution) - 1 *(uint32_t)*
475
475
-**frequency** The pwm timer frequency (Hz). The frequency and resolution limits are interdependent *(uint32_t)*. For more details, see [Supported Range of Frequency and Duty Resolutions](https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/peripherals/ledc.html#ledc-api-supported-range-frequency-duty-resolution).
476
476
-**resolution** The bit resolution of the pwm duty *(uint8_t)*
-**pin** The pin number (uint8_t) If the pin is detached (free) and there's a free channel available, the pin will be attached to the first free channel that's found *(uint8_t)*
575
+
-**pin** The pin number *(int)* If the pin is detached (free) and there's a free channel available, the pin will be attached to the first free channel that's found *(int)*
576
576
-**frequency** The frequency in Hz. The default is 1000 Hz *(uint32_t)*
-**pin** The pin number (uint8_t) If the pin is detached (free) and there's a free channel available, the pin will be attached to the first free channel that's found *(uint8_t)*
600
+
-**pin** The pin number *(int)* If the pin is detached (free) and there's a free channel available, the pin will be attached to the first free channel that's found *(int)*
601
601
-**resolution** The PWM resolution can be set from 1-bit to 16-bit, default is 8-bit *(uint8_t)*
-**pin** The pin number which (if necessary) will be attached to the next free channel *(uint8_t)*
634
+
-**pin** The pin number which (if necessary) will be attached to the next free channel *(int)*
635
635
-**frequency** The tone frequency (Hz) with range 1-65535 *(uint16_t)*.
636
636
-**duration** The duration in milliseconds with range 0-65535 *(uint16_t)*, where 0 is off (default) and 65535 is always on.
637
637
-**interval** This optional parameter specifies the pause time in milliseconds before the next call to tone becomes ready. *(uint16_t)*, range 0-65535, default = 0.
0 commit comments