diff --git a/docs/LED pin PWM.md b/docs/LED pin PWM.md index 2aead4cd7a0..f972eb654e4 100644 --- a/docs/LED pin PWM.md +++ b/docs/LED pin PWM.md @@ -7,12 +7,15 @@ Normally LED pin is used to drive WS2812 led strip. LED pin is held low, and eve As alternative function, it is possible to generate PWM signal with specified duty ratio on the LED pin. -Feature can be used to drive external devices. It is also used to simulate [OSD joystick](OSD%20Joystick.md) to control cameras. +Feature can be used to drive external devices such as a VTX power switch. Setting the PWM duty cycle to 100% or 0% can +provide an extra PINIO pin. It is also used to simulate [OSD joystick](OSD%20Joystick.md) to control cameras. PWM frequency is fixed to 24kHz with duty ratio between 0 and 100%: ![alt text](/docs/assets/images/led_pin_pwm.png "led pin pwm") +Note that the LED feature needs to be enabled when using the PIN in this mode (feature LED_STRIP). + There are four modes of operation: - low - high @@ -88,3 +91,6 @@ To drive power LED with brightness control, Mosfet should be used: ![alt text](/docs/assets/images/ledpinpwmpowerled.png "led pin pwm power_led") +# Programming tab example for using the LED pin as a PINIO, such as for turning a VTX or camera on and off +!(/docs/assets/images/led-as-pinio.png "led pin as pinio") + diff --git a/docs/Programming Framework.md b/docs/Programming Framework.md index 0e6592785a7..5980a146b7a 100644 --- a/docs/Programming Framework.md +++ b/docs/Programming Framework.md @@ -98,7 +98,7 @@ IPF can be edited using INAV Configurator user interface, or via CLI. To use COn | 49 | Timer | A simple on - off timer. `true` for the duration of `Operand A` [ms]. Then `false` for the duration of `Operand B` [ms]. | | 50 | Delta | This returns `true` when the value of `Operand A` has changed by the value of `Operand B` or greater within 100ms. ( \|ΔA\| >= B ) | | 51 | Approx Equals (A ~ B) | `true` if `Operand B` is within 1% of `Operand A`. | -| 52 | LED Pin PWM | Value `Operand A` from [`0` : `100`] starts PWM generation on LED Pin. See [LED pin PWM](LED%20pin%20PWM.md). Any other value stops PWM generation (stop to allow ws2812 LEDs updates in shared modes). | +| 52 | LED Pin PWM | Value `Operand A` from [`0` : `100`] PWM / PINIO generation on LED Pin. See [LED pin PWM](LED%20pin%20PWM.md). Any other value stops PWM generation (stop to allow ws2812 LEDs updates in shared modes). | | 53 | Disable GPS Sensor Fix | Disables the GNSS sensor fix. For testing GNSS failure. | | 54 | Mag calibration | Trigger a magnetometer calibration. | | 55 | Set Gimbal Sensitivity | Scales `Operand A` from [`-16` : `15`] diff --git a/docs/assets/images/led-as-pinio.png b/docs/assets/images/led-as-pinio.png new file mode 100644 index 00000000000..31be121ffd3 Binary files /dev/null and b/docs/assets/images/led-as-pinio.png differ