docs: Improve SET_PIN documentation in G-Codes.md

Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
This commit is contained in:
Kevin O'Connor 2023-01-13 11:19:07 -05:00
parent bca2671efb
commit 4671cf2d0e
1 changed files with 11 additions and 3 deletions

View File

@ -811,9 +811,17 @@ The following command is available when an
enabled. enabled.
#### SET_PIN #### SET_PIN
`SET_PIN PIN=config_name VALUE=<value> CYCLE_TIME=<cycle_time>`: `SET_PIN PIN=config_name VALUE=<value> [CYCLE_TIME=<cycle_time>]`: Set
Note - hardware PWM does not currently support the CYCLE_TIME the pin to the given output `VALUE`. VALUE should be 0 or 1 for
parameter and will use the cycle time defined in the config. "digital" output pins. For PWM pins, set to a value between 0.0 and
1.0, or between 0.0 and `scale` if a scale is configured in the
output_pin config section.
Some pins (currently only "soft PWM" pins) support setting an explicit
cycle time using the CYCLE_TIME parameter (specified in seconds). Note
that the CYCLE_TIME parameter is not stored between SET_PIN commands
(any SET_PIN command without an explicit CYCLE_TIME parameter will use
the `cycle_time` specified in the output_pin config section).
### [palette2] ### [palette2]