serial problems plus com1 problems

using mac with Arduino zero. When I write at 9600 baud get "board at com1 not available" with no I/O. See setup. Am using programming port USB only.

Can I increase the baud rate? 9600 pretty slow. Is this the usual rate?

What does "shutdown command invoked" mean after target is reset? Something I should worry about? Is that the reason the loop pin2 toggle does not work?

const int statusPin = 2; // status pin
char statusPinStatus;

unsigned long int nextTime;
const unsigned int nextTimeDelta = 100; // num 4 usec steps

void setup()
{
  int intLength;
  
  pinMode(statusPin,OUTPUT);   // status line set to an output
  statusPinStatus = 0;
  
  digitalWrite(statusPin,LOW); // set to low

  Serial.begin(9600);
  intLength = sizeof(nextTime);

  Serial.print("integer length in bytes: ");
  Serial.println(intLength);

  nextTime = micros() + nextTimeDelta;

}

void loop()
{
  char statusPinStatus;

  if (nextTime == micros())
  {
    nextTime = micros() + nextTimeDelta;
    
    if (statusPinStatus == 1)
    {
      statusPinStatus = 0;
      digitalWrite(statusPin,LOW);
    }
    else
    {
      statusPinStatus = 1;
      digitalWrite(statusPin,HIGH);
    }
  }
}

using mac with Arduino zero. When I write at 9600 baud get "board at com1 not available" with no I/O. See setup. Am using programming port USB only.

I'm not a MAC user, but on a PC the USB port isn't always assigned to COM1.

A similar message on the PC means COM1 is in use by another application, or physically there is no COM1.

You can use a higher baud rate, but of course you have to change the baud rate on the computer as well as the Arduino.

DVDdoug:

Its the same port I use to upload the code. Whatever it is. Arduino can't talk back although all the examples make this a snap. Nothing else hooked to the mac. Maybe operator error -- where does Serial write its stuff? I run the code and it resets and I active the monitor in the app.

I am using 9600 since that is in all the examples. Is it right?

Unplug your USB cable from the Arduino, then look at the "ports" under the "Tools" dropdown menu. Note which ports are shown. Now hook the USB cable to the arduino, and there should be a new port showing. That's the one that you must use. Make sure that port has a check mark next to it in the "ports" menu. Now try to upload code. If you still have a problem, make sure that your Reset pin on the Arduino is not connected to anything. Also, since pins D0, D1 are used to program, leave them free of connections.

If none of this works, try leaving the USB plugged in, and reboot your MAC. I've been through this drill many times. If you get this far and still no success try a different USB cable, and/or a different Arduino. That just about exhausts the possibilities.

Good luck.

Disclaimer: no experience with the Zero.

The Zero has two USB ports; one for programming and one for 'normal' work.

Source: https://www.arduino.cc/en/Guide/ArduinoZero

Did you move the USB cable after programming to the other port?

got it working. Had to point the monitor to the right port as per jrdoner.

What does normal work mean? Descriptions on use of native port very poor. ??

kitch:
get "board at com1 not available"

Does a MAC refer to ports using a name like "com1" ?

...R

kitch:
What does normal work mean? Descriptions on use of native port very poor. ??

Arduino application's serial comunication; e.g. the Serial.println function

Robin2:
Does a MAC refer to ports using a name like "com1" ?

...R

No it does not.