Why Max/MSP does not communicate with Arduino via Serial? in mac m1

Matias Rosales's icon

Hi !
I have a mac m1, and I don't know why my code doesn't work. I'm using Arduino IDE2

Apparently the problem is not from arduino, I already checked it

Could anyone help me please?

int LED_pin = 13;

void setup()
{
  Serial.begin(9600);
  pinMode(LED_pin, OUTPUT);
}

void loop()
{
  if (Serial.available()) {
    int value1 = Serial.read();
    if(value1 == 1){
      digitalWrite(LED_pin, HIGH);
    }
    else if (value1 == 0){
      digitalWrite(LED_pin, LOW);
    }
    
  }
}