 }
 #endif
 
-PortI2C i2cBus (1);
-RTC_Plug RTC (i2cBus);
-
-#ifdef DEBUG
+// RTC on port 1
+PortI2C RTCbus (1);
+RTC_Plug RTC (RTCbus);
+
+// MaxMs on port 2
+PortI2C MaxMbus (2);
+DeviceI2C maxm1 (MaxMbus, maxm1Dev);
+DeviceI2C maxm2 (MaxMbus, maxm2Dev);
+
+#ifdef DEBUG_FLASH
 // LEDs are on ports 3 and 4
 // LED1 flashes once for the MAXM1 task, twice for the MAXM2 task
 Port led1 (3);

    switch (scheduler.pollWaiting()) {
        // Control first MaxM
        case MAXM1:
            /* Serial.print("MAXM1 is operational "); */
            /* Serial.println(is_operational); */
            /* Serial.flush(); */
            if (is_operational == 1) {
#ifdef DEBUG
                doFlash(led1, 1);
#endif
                // TODO
                // Start script on first MaxM 
                // TODO need correct amount to reschedule
                /* Serial.println("MAXM1"); */
                /* Serial.flush(); */

            }
            scheduler.timer(MAXM2, 30);
            scheduler.timer(MAXM1, 100);
            break;

        // Control second MaxM
        case MAXM2:
            if  (is_operational != 1) break;

#ifdef DEBUG
            doFlash(led1, 2);
#endif
            break;

    start_min = toMin(start_hh, start_mm);
    stop_min = toMin(stop_hh, stop_mm);

#ifdef DEBUG_FLASH
    led1.mode(OUTPUT);
    led2.mode(OUTPUT);
#endif

    // The MaxMs should be programmed to not start on poweroff
    // but turn thenm off just to be sure

    maxm1.send();
    maxm1.write('o');
    maxm1.stop();
    maxm1.send();
    maxm1.write('n');
    maxm1.write(0);
    maxm1.write(0);
    maxm1.write(0);
    maxm1.stop();
    maxm2.send();
    maxm2.write('o');
    maxm2.stop();
    maxm2.send();
    maxm2.write('n');
    maxm2.write(0);
    maxm2.write(0);
    maxm2.write(0);
    maxm2.stop();

    // Start tasks after a pause for the power supply to settle
    scheduler.timer(OPER_TIME, 15);
