commands:reference:ianalogwrite
차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
| commands:reference:ianalogwrite [2026/09/01 20:04] – 만듦 - 바깥 편집 127.0.0.1 | commands:reference:ianalogwrite [2026/09/08 00:53] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 11: | 줄 11: | ||
| ^ 명령어 ^ 인수 ^ 반환값 ^ 동작 ^ | ^ 명령어 ^ 인수 ^ 반환값 ^ 동작 ^ | ||
| | '' | | '' | ||
| + | |||
| ===== 예제 ===== | ===== 예제 ===== | ||
| <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); // 사용자 정수값을 아날로그 |
| + | |||
| + | Serial.print(F(" | ||
| + | Serial.print(demandPercent); | ||
| + | Serial.println(F(" | ||
| + | delay(250); | ||
| } | } | ||
| </ | </ | ||
| 줄 34: | 줄 44: | ||
| * 출력 모듈의 딥스위치, | * 출력 모듈의 딥스위치, | ||
| * 같은 타이머를 사용하는 PWM, 펄스 출력 또는 카운터 명령어와 동시에 사용하지 않는다. | * 같은 타이머를 사용하는 PWM, 펄스 출력 또는 카운터 명령어와 동시에 사용하지 않는다. | ||
| + | |||
| + | ===== 같은 카테고리의 내장 명령어 ===== | ||
| + | |||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| + | * [[commands: | ||
| [[commands: | [[commands: | ||
commands/reference/ianalogwrite.1788260661.txt.gz · 마지막으로 수정됨: 저자 127.0.0.1
