ate, updateLed must be called. A sample wrapper for the ISR for the timer:</p>
<p>void grossLedInteruptWrapper(void) { syncLed.syncLedHandler(); // calculate the LED state based on the timer, but don't change the actual LED state. syncTimer.begin(grossLedInteruptWrapper, syncLed.currentSyncPeriod); // update the timer period ideally we would only do this if it changed, might add a flag to syncLed if needed }</p>
<p>Then in the main loop or when you are recording data: int ledState = syncLed.updateLed(); // 