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 | |||||
uint32_t m=0; | uint32_t m=0; | ||||
void timerCallback(void *pArg) | void timerCallback(void *pArg) | ||||
{ | |||||
{ | |||||
*((int *) pArg) += 1; | *((int *) pArg) += 1; | ||||
Serial.print("hallo\n"); | Serial.print("hallo\n"); | ||||
ESP.restart(); | ESP.restart(); | ||||
} | } | ||||
os_timer_setfn(&Timer1, timerCallback, &c); | |||||
os_timer_setfn(&Timer1, timerCallback, NULL); | |||||
os_timer_arm(&Timer1, 1000, true); | os_timer_arm(&Timer1, 1000, true); | ||||
Serial.println("Ready"); | Serial.println("Ready"); |