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:
parent
d5746a2d47
commit
04653de97e
3 changed files with 8 additions and 2 deletions
|
@ -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%:
|
||||
|
||||

|
||||
|
||||
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:
|
|||
|
||||

|
||||
|
||||
# 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")
|
||||
|
||||
|
|
|
@ -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. |
|
||||
|
||||
|
|
BIN
docs/assets/images/led-as-pinio.png
Normal file
BIN
docs/assets/images/led-as-pinio.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 24 KiB |
Loading…
Add table
Add a link
Reference in a new issue