en-us_commands:reference:pwmoff
Differences
This shows you the differences between two versions of the page.
| Both sides previous revisionPrevious revision | |||
| en-us_commands:reference:pwmoff [2026/09/08 00:53] – 바깥 편집 127.0.0.1 | en-us_commands:reference:pwmoff [2026/09/14 20:30] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| ===== Example ===== | ===== Example ===== | ||
| + | |||
| + | This example uses MPINO-16A8R8T PWM output D11 and digital input D22. HIGH on D22 stops PWM; LOW allows it again. This input demonstrates the function and does not replace an equipment emergency-stop device. | ||
| <code cpp> | <code cpp> | ||
| Line 19: | Line 21: | ||
| void setup() { | void setup() { | ||
| - | FDPWM(PWM_PIN, | + | FDPWM(PWM_PIN, |
| } | } | ||
| void loop() { | void loop() { | ||
| - | const bool emergencyStop | + | const bool stopRequest |
| - | PWMOFF(PWM_PIN, | + | PWMOFF(PWM_PIN, |
| - | if (!emergencyStop) FDPWM(PWM_PIN, | + | if (!stopRequest) FDPWM(PWM_PIN, |
| + | delay(20); | ||
| } | } | ||
| </ | </ | ||
en-us_commands/reference/pwmoff.1788796404.txt.gz · Last modified: by 127.0.0.1
