ReactESP app([]() { Serial.begin(115200);pinMode(LED_PIN, OUTPUT);pinMode(INPUT_PIN, INPUT_PULLUP);app.onRepeatMicros(IO_REPEAT_DELAY,[]() { static bool state=false; digitalWrite(LED_PIN, state); state=!state; }); app.onInterrupt(INPUT_PIN, RISING, &isr);app.onRepeat(1000,[]() { uint64_t now=micros64(); uint32_t now_high=now > > 32; uint32_t now_low=now &0xffffffff; Serial.printf("Ticks: %d %08X %08X\n", ticks, now_high, now_low); ticks=0; });pinMode(OUTPUT_PIN, OUTPUT);app.onRepeat(20,[]() { digitalWrite(OUTPUT_PIN, !digitalRead(OUTPUT_PIN)); });Serial.println("First");Serial.println("Second");}) |
( |
[] () { Serial.begin(115200);pinMode(LED_PIN, OUTPUT);pinMode(INPUT_PIN, INPUT_PULLUP);app.onRepeatMicros(IO_REPEAT_DELAY, []() { static bool state=false;digitalWrite(LED_PIN, state);state=!state;});app.onInterrupt(INPUT_PIN, RISING, &isr);app.onRepeat(1000, []() { uint64_t now=micros64();uint32_t now_high=now > > 32;uint32_t now_low=now &0xffffffff;Serial.printf("Ticks: %d %08X %08X\n", ticks, now_high, now_low);ticks=0;});pinMode(OUTPUT_PIN, OUTPUT);app.onRepeat(20, []() { digitalWrite(OUTPUT_PIN, !digitalRead(OUTPUT_PIN));});Serial.println("First");Serial.println("Second");} |
| ) |
|