#include <stdio.h>
#include <stdbool.h>
#include <signal.h>
+#include <unistd.h>
#define PWRLED 8
#define CHNL1LED 9
void ctrlCHandler(int dummy) {
running = false;
return;
-
}
void pwrBtn(void) {
digitalWrite(PWRLED, HIGH);
digitalWrite(CHNL1LED, HIGH);
digitalWrite(CHNL2LED, HIGH);
+ sleep(0.3);
continue;
}
digitalWrite(PWRLED, LOW);
digitalWrite(CHNL2LED, LOW);
digitalWrite(CHNL1LED, HIGH);
}
- delay(200);
+ //delay(200);
+ sleep(0.3);
}
printf("ShuttingDown\n");
digitalWrite(PWRLED, HIGH);
digitalWrite(CHNL1LED, HIGH);
digitalWrite(CHNL2LED, HIGH);
+ pullUpDnControl(PWRBTN, PUD_DOWN);
+ pullUpDnControl(CHNL1BTN, PUD_DOWN);
+ pullUpDnControl(CHNL2BTN, PUD_DOWN);
}