From 28260cbe77f63d2c749640c42499e80894827b05 Mon Sep 17 00:00:00 2001 From: Ardi Loot Date: Mon, 28 Nov 2022 18:35:58 +0200 Subject: [PATCH] added readme --- usermods/pwm_outputs/readme.md | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 usermods/pwm_outputs/readme.md diff --git a/usermods/pwm_outputs/readme.md b/usermods/pwm_outputs/readme.md new file mode 100644 index 00000000..62e6d284 --- /dev/null +++ b/usermods/pwm_outputs/readme.md @@ -0,0 +1,21 @@ +# PWM outputs + +v2 Usermod to add generic PWM outputs to WLED. Usermode could be used to control servo motors, LED brightness or any other device controlled by PWM signal. + +## Installation + +Add the compile-time option `-D USERMOD_PWM_OUTPUTS` to your `platformio.ini` (or `platformio_override.ini`). By default upt to 3 PWM outputs could be configured, to increase that limit add build argument `-D USERMOD_PWM_OUTPUT_PINS=10` (replace 10 by desired amount). + +Currently only ESP32 is supported. + +## Configuration + +By default PWM outputs are disabled, navigate to Usermods settings and configure desired PWM pins and frequencies. + +## Usage + +If PWM output is configured, it starts to publish its duty cycle value (0-1) both to state JSON and to info JSON (visible in UI info panel). To set PWM duty cycle, use JSON api (over HTTP or over Serial) + +```json +{"pwm_0": 0.0, "pwm_1": 0.1, ...} +```