[Solved in op]Arduino uno won't start unless serial monitor is on !!

i plug it in, wait, it never run till the serial monitor is on, here is some code

#include <Wire.h>
#include "Arduino.h"

#if defined(SERIAL_PORT_USBVIRTUAL)
  // Shield Jumper on HW (for Leonardo and Due)
  #define port SERIAL_PORT_HARDWARE
  //#define pcSerial SERIAL_PORT_USBVIRTUAL
#else
  // Shield Jumper on SW (using pins 12/13 or 8/9 as RX/TX)
  #include "SoftwareSerial.h"
  SoftwareSerial port(12, 13);
  //#define pcSerial SERIAL_PORT_MONITOR
#endif

#include "EasyVR.h"

EasyVR easyvr(port);

int wordindex;
int8_t bits = 4;
int8_t set = 0;
int8_t group = 0;
uint32_t mask = 0;
uint8_t train = 0;
uint8_t grammars = 0;
int8_t lang = 0;
char name[33];
bool useCommands = true;
bool useTokens = false;
bool isSleeping = false;
byte lastsent = 0;
bool sent = true;

void setup()
{
  //delay(10000);
  // setup PC serial port
  //pcSerial.begin(9600);
  Wire.begin(4);
  Wire.onReceive(receiveEvent);
  Wire.onRequest(requestEvent);
  port.begin(9600);
  easyvr.setTimeout(10);
  lang = EasyVR::ENGLISH;
  easyvr.setLanguage(lang);
  useCommands = (mask != 0);
  mask |= 1; // force to use trigger
  isSleeping = false;
  easyvr.playSound(14, EasyVR::VOL_FULL);
}

tell me what does the serial monitor does on start up and ill figure it out
or spoon feed me this one cause i’ve been up for days :slight_smile:

EDIT :
it was stuck in the very first part, here is an edited fully working code

#include <SoftwareSerial.h>
#include <Wire.h>
#include "Arduino.h"
#include "EasyVR.h"


SoftwareSerial port(12, 13);
EasyVR easyvr(port);

int wordindex;
int8_t bits = 4;
int8_t set = 0;
int8_t group = 0;
uint32_t mask = 0;
uint8_t train = 0;
uint8_t grammars = 0;
int8_t lang = 0;
char name[33];
bool useCommands = true;
bool useTokens = false;
bool isSleeping = false;
byte lastsent = 0;
bool sent = true;

void setup()
{
  //delay(10000);
  // setup PC serial port
  //pcSerial.begin(9600);
  Wire.begin(4);
  Wire.onReceive(receiveEvent);
  Wire.onRequest(requestEvent);
  port.begin(9600);
  easyvr.setTimeout(10);
  lang = EasyVR::ENGLISH;
  easyvr.setLanguage(lang);
  useCommands = (mask != 0);
  mask |= 1; // force to use trigger
  isSleeping = false;
  easyvr.playSound(14, EasyVR::VOL_FULL);
}