Snapshot.
This commit is contained in:
parent
f496a10ef2
commit
a69128397a
|
@ -10,7 +10,7 @@
|
|||
|
||||
[env:esp32doit-devkit-v1]
|
||||
platform = espressif32
|
||||
build_flags =
|
||||
;build_flags =
|
||||
; -std=c++11
|
||||
; -std=gnu++11
|
||||
board = esp32doit-devkit-v1
|
||||
|
|
|
@ -162,10 +162,11 @@ const int blinker = LED_BUILTIN;
|
|||
// Timers
|
||||
//auto timer = timer_create_default();
|
||||
Timer<1> timer;
|
||||
auto time_until_start = timer_create_default();
|
||||
|
||||
// Example from https://github.com/contrem/arduino-timer#examples
|
||||
bool toggle_led(void *) {
|
||||
Serial.print("Timer time: ");
|
||||
Serial.println(rtc.now().timestamp());
|
||||
digitalWrite(LED_BUILTIN, !digitalRead(LED_BUILTIN)); // toggle the LED
|
||||
return true; // keep timer active? true
|
||||
}
|
||||
|
@ -602,11 +603,17 @@ void setup() {
|
|||
yourInputStartTimeUnix = atol(inputMessage.c_str());
|
||||
//}
|
||||
Serial.println(yourInputStartTimeUnix);
|
||||
|
||||
timer.at(millis() + 10000, toggle_led);
|
||||
Serial.println(millis());
|
||||
auto active_tasks = timer.size();
|
||||
Serial.println(active_tasks);
|
||||
}
|
||||
// else {
|
||||
// inputMessage = "No message sent";
|
||||
// }
|
||||
//request->send(200, "text/plain", inputMessage);
|
||||
// https://techtutorialsx.com/2018/01/14/esp32-arduino-http-server-external-and-internal-redirects/
|
||||
request->redirect("/");
|
||||
});
|
||||
server.onNotFound(notFound);
|
||||
|
@ -621,13 +628,10 @@ void setup() {
|
|||
// sender.setMessage(String("73 de kb3jcy "));
|
||||
// sender.startSending();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
void loop() {
|
||||
// Timers
|
||||
time_until_start.tick();
|
||||
timer.tick();
|
||||
|
||||
// DateTime now = rtc.now();
|
||||
|
|
Loading…
Reference in New Issue
Block a user