 // ----- state ------
 int speed = 100;
 
-int M1_on = 0;
-int M2_on = 0;
-int M3_on = 0;
-int M4_on = 0;
+int M_on[4] = { 0, 0, 0, 0 };
+char label[4][4] = { "MA1", "MA2", "MA3", "MA4" };
 
 unsigned long counter = 0;
 

}

void do_stop() {
  M1_on = 0;
  M1->run(RELEASE);
  M2_on = 0;
  M2->run(RELEASE);
  M3_on = 0;
  M3->run(RELEASE);
  M4_on = 0;
  M4->run(RELEASE);
}



  int command;
  if (millis() - counter > 10000) {
     counter = millis();
     announce ((char*)"A0", analogRead(0));
     announce ((char*)"A1", analogRead(1));
     announce ((char*)"A2", analogRead(2));
  }
  if (Serial.available()) {
     command = Serial.read();
     switch (command) {
       case '1':
         set_motor_speed (0, M_on[0] ? 0.0 : 1.0);
         break;
       case '2':
         set_motor_speed (1, M_on[1] ? 0.0 : 1.0);
         break;
       case '3':
         set_motor_speed (2, M_on[2] ? 0.0 : 1.0);
         break;
       case '4':
         set_motor_speed (3, M_on[3] ? 0.0 : 1.0);
         break;
       case 'q':
         set_motor_speed (0, M_on[0] ? 0.0 : -1.0);
         break;
       case 'w':
         set_motor_speed (1, M_on[1] ? 0.0 : -1.0);
         break;
       case 'e':
         set_motor_speed (2, M_on[2] ? 0.0 : -1.0);
         break;
       case 'r':
         set_motor_speed (3, M_on[3] ? 0.0 : -1.0);
         break;
       case 'x':
         do_stop();
