 void serialEvent() {
   int incoming;
   DMOC* dmoc = (DMOC*)motorcontroller;
-  incoming = Serial.read();
+  incoming = SerialUSB.read();
   if (incoming == -1) return;
   switch (incoming) {
     case 'h':

  for(uint8_t count = 0; count < 5; count++) {
    CAN.mailbox_init(count);
    CAN.mailbox_set_mode(count, CAN_MB_RX_MODE);
    CAN.mailbox_set_accept_mask(count, 0x7F0, false);
  }
  //First three mailboxes listen for 0x23x frames, last two listen for 0x65x frames
  CAN.mailbox_set_id(0, 0x230, false); CAN.mailbox_set_id(1, 0x230, false); CAN.mailbox_set_id(2, 0x230, false);

  //compiled into the ROM
  //Serial.println("Installed devices: DMOC645");

  SerialUSB.print("System Ready ");
  printMenu();

}

void printMenu() {
  SerialUSB.println("System Menu:");
  SerialUSB.println("D = disabled op state");
  SerialUSB.println("S = standby op state");
  SerialUSB.println("E = enabled op state");
  SerialUSB.println("n = neutral gear");
  SerialUSB.println("d = DRIVE gear");
  SerialUSB.println("r = reverse gear");
  SerialUSB.println("<space> = start/stop ramp test");
  SerialUSB.println("x = lock ramp at current value (toggle)");
  SerialUSB.println("t = Use accelerator pedal? (toggle)");
  SerialUSB.println("L = output raw input values (toggle)");
  SerialUSB.println("K = set all outputs high");
  SerialUSB.println("J = set all outputs low");
  SerialUSB.println("Y,U,I = test EEPROM routines");
  SerialUSB.println("");
}


