diff --git a/doku.txt b/doku.txt new file mode 100644 index 0000000..cc2fb63 --- /dev/null +++ b/doku.txt @@ -0,0 +1,3 @@ +Hardware Timer didnt work https://github.com/khoih-prog/ESP8266TimerInterrupt#why-using-isr-based-hardware-timer-interrupt-is-better +=> Software Timer https://ullisroboterseite.de/esp8266-timing.html#timer + diff --git a/src/main.cpp b/src/main.cpp index 0e8bc5b..201b3d4 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -12,7 +12,7 @@ uint32_t c; uint32_t m=0; void timerCallback(void *pArg) -{ +{ *((int *) pArg) += 1; Serial.print("hallo\n"); @@ -183,7 +183,7 @@ void setup() { ESP.restart(); } - os_timer_setfn(&Timer1, timerCallback, &c); + os_timer_setfn(&Timer1, timerCallback, NULL); os_timer_arm(&Timer1, 1000, true); Serial.println("Ready");