int TriggerInterval = 1000;
bool ConfirmedPrint = LOW;
unsigned long Millis_Before;
void ResetPrint_Bool() {
if (ConfirmedPrint == HIGH)
if ((millis() - Millis_Before) > TriggerInterval) {
Millis_Before = millis();
ConfirmedPrint = LOW;
Serial.println("Print Reset");
}
}
void PrintTest() {
if (ConfirmedPrint == LOW) {
Serial.println("Printed Test");
ConfirmedPrint = HIGH;
}
}
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
Serial.println("Hello, ESP32!");
}
void loop() {
ResetPrint_Bool() ;
PrintTest() ;
}