en-us_commands:reference:ianalogwrite
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| en-us_commands:reference:ianalogwrite [2026/09/07 21:52] – 만듦 - 바깥 편집 127.0.0.1 | en-us_commands:reference:ianalogwrite [2026/09/08 00:53] (current) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| Line 16: | Line 16: | ||
| <code cpp> | <code cpp> | ||
| + | const uint8_t DEMAND_INPUT = A0; | ||
| + | const uint8_t OUTPUT_CHANNEL = 0; | ||
| + | |||
| void setup() { | void setup() { | ||
| + | Serial.begin(115200); | ||
| } | } | ||
| void loop() { | void loop() { | ||
| - | | + | |
| - | delay(500); | + | IanalogWrite(OUTPUT_CHANNEL, 0, 100, demandPercent); // Map the user's integer value to the analog |
| + | |||
| + | Serial.print(F(" | ||
| + | Serial.print(demandPercent); | ||
| + | Serial.println(F(" | ||
| + | delay(250); | ||
| } | } | ||
| </ | </ | ||
| Line 35: | Line 44: | ||
| * Match the output module DIP switches, external supply and wiring to the connected equipment' | * Match the output module DIP switches, external supply and wiring to the connected equipment' | ||
| * Do not use these together with PWM, pulse output or counter commands using the same timer. | * Do not use these together with PWM, pulse output or counter commands using the same timer. | ||
| + | |||
| + | ===== Built-in Commands in the Same Category ===== | ||
| + | |||
| + | * [[: | ||
| + | * [[: | ||
| + | * [[: | ||
| + | * [[: | ||
| + | * [[: | ||
| [[: | [[: | ||
en-us_commands/reference/ianalogwrite.1788785566.txt.gz · Last modified: by 127.0.0.1
