  * bus on port 2, and optionally there are 2 status LEDs on port 4
  * being independently controlled with the DIO and AIO pins. LED1
  * flashes once for the MAXM1 task, twice for the MAXM2 task to show
- * the correct task ran; LED2 flashes once per minute to show the
- * sketch is working.
+ * the correct task ran; LED2 flashes twice per minute when the
+ * lights are awake and once per minute when they are asleep.
  */
 
 // Uncomment for LEDs flashing for debug

            Serial.println(now.second());
            Serial.flush();
#endif
            // Check if should be operational and set flag 
            is_operational = checkAwake(now, wps, num_wps);
            if (is_operational == 1) {
                // Start the MAXM1 task if not already active
                if (maxm1_active == 0) {
                  scheduler.timer(MAXM1, 0);
                  maxm1_active = 1;
                }
#ifdef DEBUG_TRACE
                Serial.println("Lights are operational");
                Serial.flush();
#endif
            } else {
                maxm1_active = 0;
                //TODO consider turning off MaxMs like in setup()
#ifdef DEBUG_TRACE
                Serial.println("Lights are sleeping");
                Serial.flush();
#endif
            }

            // Flash LED2 one for every minute
            doFlash(ledPort, led2, 1);
            break;
    }
}

    if (t1.second() == t2.second()) {
        doFlash(ledPort, 1 + 2, 8);
    }
    
#ifdef DEBUG_TRACE
    // Dump wps array
    for (int i = 0; i < num_wps; i++) {
      Serial.print("wp[");
      Serial.print(i);
      Serial.print("]: ");
      Serial.print(wps[i].day);
      Serial.print(", ");
      Serial.print(wps[i].wake);
      Serial.print(",");
      Serial.println(wps[i].sleep);
      Serial.flush();
    }
#endif

    // Start the main task
    scheduler.timer(CHK_TIME, 0);
}

void loop () {
    switch (scheduler.pollWaiting()) {
        // Control first MaxM
        case MAXM1:
            if (!maxms_awake) break;

            scheduler.timer(MAXM1, maxm1_cycle * 10);
            scheduler.timer(MAXM2, maxm2_offset * 10);
            doFlash(ledPort, led1, 1);
            maxmRun(maxm1);
            // maxm1.send();
            // maxm1.write('p');
            // maxm1.write(0);
            // maxm1.write(1);
            // maxm1.write(0);
            // maxm1.stop();
#ifdef DEBUG_TRACE
            Serial.println("MAXM1");
            Serial.flush();
#endif
            break;

        // Control second MaxM
        case MAXM2:
            if (!maxms_awake) break;

            doFlash(ledPort, led1, 2);
            maxmRun(maxm2);
            // maxm2.send();
            // maxm2.write('p');
