         mode %= NUM_MODE_ENUMS;
         clear_screen();
     }
-
-    if ( mode == MODE_LCD_TIMER)
+    if ( mode == MODE_DISCHARGE)
+    {
+        if ( g_Buttons.up_button != 0 &&
+            g_LastButtons.up_button == 0)
+        {
+            digitalWrite(3, HIGH);
+        }
+        if ( g_Buttons.bottom_button != 0 &&
+            g_LastButtons.bottom_button == 0)
+        {
+            digitalWrite(3, LOW);
+        }
+    }
+    else if ( mode == MODE_CHARGE)
+    {
+        if ( g_Buttons.up_button != 0 &&
+            g_LastButtons.up_button == 0)
+        {
+            digitalWrite(9, HIGH);
+        }
+        if ( g_Buttons.bottom_button != 0 &&
+            g_LastButtons.bottom_button == 0)
+        {
+            digitalWrite(9, LOW);
+        }
+    }
+    else if ( mode == MODE_LCD_TIMER)
     {
         // Serial.write("mode timer");
         if ( g_Buttons.up_button != 0 &&

    case MODE_SERIAL_MON:
        sprintf(line1, "%s", serial_buf2);
        sprintf(line2, "%s", serial_buf1);
        break;
    default:
        sprintf(line2, "DFT mode %d %s", _mode, "      " );

    pinMode(7, INPUT);
    pinMode(8, INPUT);
    delay(500);
    pinMode(3, OUTPUT);
    pinMode(9, OUTPUT);
    digitalWrite(3, HIGH);
    digitalWrite(9, HIGH);

    Serial.begin(9600);
    while (!Serial);
