Dominik Bartsch 2 years ago
parent
commit
ee72092a3a
2 changed files with 6 additions and 2 deletions
  1. 3
    0
      doku.txt
  2. 3
    2
      src/main.cpp

+ 3
- 0
doku.txt View File

@@ -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


+ 3
- 2
src/main.cpp View File

@@ -21,7 +21,7 @@ void ledsequence(uint8_t direction, uint8_t onoff, uint8_t factor);
uint8_t softstart_led(uint8_t led, uint16_t startval, uint16_t stopval, uint8_t factor);

void timerCallback(void *pArg)
{
{
*((int *) pArg) += 1;
//Serial.print("hallo\n");
@@ -192,10 +192,11 @@ void setup() {
delay(5000);
ESP.restart();
}
os_timer_setfn(&Timer1, timerCallback, &c);
os_timer_arm(&Timer1, 1, true);


Serial.println("Ready");
Serial.print("IP address: ");
Serial.println(WiFi.localIP());

Loading…
Cancel
Save