Recent Posts
printf("ho_tari\n");
17_Multi_Task 본문
unsigned long t1_prev = 0;
const unsigned long t1_delay = 1000;
unsigned long t2_prev = 0;
const unsigned long t2_delay = 500;
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
}
void loop() {
// put your main code here, to run repeatedly:
unsigned long t1_now = millis();
if(t1_now - t1_prev >= t1_delay) {
t1_prev = t1_now;
Serial.println(" t1 ");
}
unsigned long t2_now = millis();
if(t2_now - t2_prev >= t2_delay) {
t2_prev = t2_now;
Serial.println(" \tt2 ");
}
}
'Arduino' 카테고리의 다른 글
EX02_DC_MOTOR (0) | 2023.09.02 |
---|---|
EX01_Binary_LED (0) | 2023.09.02 |
16_Keypad_4x4 (0) | 2023.09.02 |
15_ArrayFND (0) | 2023.09.02 |
14_FND (0) | 2023.09.02 |