1
0
Fork 0
mirror of https://github.com/iNavFlight/inav.git synced 2025-07-12 19:10:27 +03:00

docs: LED pin PWM as PINIO

This commit is contained in:
Ray Morris 2025-04-26 10:03:07 -05:00
parent d5746a2d47
commit 04653de97e
3 changed files with 8 additions and 2 deletions

View file

@ -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")

View file

@ -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. |

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB