commands:reference:filo
차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 다음 판 | 이전 판 | ||
| commands:reference:filo [2026/09/01 20:04] – 만듦 - 바깥 편집 127.0.0.1 | commands:reference:filo [2026/09/14 20:30] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 11: | 줄 11: | ||
| ^ 명령어 ^ 인수 ^ 반환값 ^ 동작 ^ | ^ 명령어 ^ 인수 ^ 반환값 ^ 동작 ^ | ||
| | '' | | '' | ||
| + | |||
| ===== 예제 ===== | ===== 예제 ===== | ||
| + | |||
| + | 시리얼 모니터에서 '' | ||
| <code cpp> | <code cpp> | ||
| - | uint16_t | + | uint16_t |
| - | FILO(0, | + | uint16_t lastNumber = 0; |
| + | |||
| + | void setup() { | ||
| + | Serial.begin(115200); | ||
| + | } | ||
| + | |||
| + | void loop() { | ||
| + | if (!Serial.available()) return; | ||
| + | const char action = Serial.read(); | ||
| + | const bool store = action == ' | ||
| + | const bool retrieve = action == ' | ||
| + | const bool clearBuffer = action == ' | ||
| + | if (store) ++nextNumber; | ||
| + | |||
| + | const bool ok = FILO(0, | ||
| + | FILO(0, false, false, nextNumber, lastNumber, 16, false); // 다음 문자도 상승 신호로 처리할 수 있도록 입력 신호를 LOW로 되돌립니다. | ||
| + | if (retrieve && ok) Serial.println(lastNumber); | ||
| + | if (retrieve && !ok) Serial.println(F(" | ||
| + | } | ||
| </ | </ | ||
| 줄 22: | 줄 43: | ||
| '' | '' | ||
| + | |||
| + | ===== 같은 카테고리의 내장 명령어 ===== | ||
| + | |||
| + | * [[commands: | ||
| [[commands: | [[commands: | ||
commands/reference/filo.1788260661.txt.gz · 마지막으로 수정됨: 저자 127.0.0.1
