 //setup code executed before anything else
 void setup() 
 { 
+  delay(1000);  // wait for serial port to connect
   Serial.begin(9600);
-  while (!Serial) {
-    ; // wait for serial port to connect
-  }
 
   //status LED on pin 13
   pinMode(LED_BUILTIN, OUTPUT);


//CAN stuffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff

static CAN_message_t msgON;

//static uint8_t hex[17] = "0123456789abcdef";

class CANClass : public CANListener 

        default:
          Serial.print(F("Invalid syntax\n"));
          Serial.print(F(setMCRegMenu));
          defaultCase = true;
        break; 
      }

      if(caseSetMCReg && !defaultCase)
      {
        value = setValInput();
        
        Serial.println(value);
        
        CAN_message_t txMessage = setupMCMessage(regID, (uint8_t)(value >> 8), (uint8_t)value);  

        //send message if the user confirms they want to send it
        if(confirmPopUp(txMessage))
          Can0.write(txMessage);

        Serial.print(F(setMCRegMenu));
      }
