I expected this code to toggle the LED 10 times a second:
My understanding was that the attached function is supposed to run during `yield()`, and that `yield()` runs after each call to `loop()` — per what's in `main.cpp` of the core. What am I missing? (I'm using v1.54 via PlatformIO.)
Code:
#include <Arduino.h>
#include <EventResponder.h>
EventResponder event;
bool ledState = false;
void eventFn(EventResponderRef r) {
ledState = !ledState;
digitalWriteFast(LED_BUILTIN, ledState ? HIGH : LOW);
}
void setup() {
pinMode(LED_BUILTIN, OUTPUT);
event.attach(&eventFn);
}
void loop() {
delay(100);
}
My understanding was that the attached function is supposed to run during `yield()`, and that `yield()` runs after each call to `loop()` — per what's in `main.cpp` of the core. What am I missing? (I'm using v1.54 via PlatformIO.)