en-us_commands:reference:iton
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| en-us_commands:reference:iton [2026/09/07 21:52] – 만듦 - 바깥 편집 127.0.0.1 | en-us_commands:reference:iton [2026/09/14 20:30] (current) – external edit 127.0.0.1 | ||
|---|---|---|---|
| Line 14: | Line 14: | ||
| ===== Example ===== | ===== Example ===== | ||
| + | |||
| + | This example selects MPINO-8A4R(T)-S and uses input '' | ||
| <code cpp> | <code cpp> | ||
| - | void loop() { | + | const uint8_t INPUT_PIN |
| - | bool run = digitalRead(0); | + | const uint8_t OUTPUT_PIN = 32; |
| - | if (Iton(40, run, 1000)) { | + | void setup() {} |
| - | | + | |
| - | | + | void loop() { |
| - | digitalWrite(13, LOW); | + | const bool inputOn = digitalRead(INPUT_PIN) == HIGH; |
| - | } | + | |
| + | digitalWrite(OUTPUT_PIN, outputOn ? HIGH : LOW); | ||
| } | } | ||
| </ | </ | ||
| Line 29: | Line 32: | ||
| ===== Precautions ===== | ===== Precautions ===== | ||
| - | * Timer interrupt callbacks run inside an ISR. For safety, change only flags in the callback and perform actual control processing | + | * Call the timer command repeatedly |
| - | * Do not use slow or interrupt-dependent code such as '' | + | * Do not share a '' |
| - | * Normally, call '' | + | |
| - | * Do not use the default '' | + | ===== Built-in Commands in the Same Category ===== |
| - | * Explicitly using Timer1, Timer3, Timer4 or Timer5 may conflict with PWM, analog output or high-speed counter functions using that timer. | + | |
| - | * Configure only one '' | + | * [[: |
| - | * Defining an ISR for the same timer directly in the sketch may conflict with '' | + | * [[: |
| - | * '' | + | * [[:en-us_commands: |
| + | * [[: | ||
| [[: | [[: | ||
en-us_commands/reference/iton.1788785568.txt.gz · Last modified: by 127.0.0.1
