Serial Port Only Listed After Serial.begin()

Hi, I’m running a core in spark dev on a mac and am trying to find a way to use the serial monitor for debugging. However, unless i’m in listening mode, my core doesn’t appear in the com port listing, and if I’m in listening mode, my code doesn’t run.

Is there a trick to this I’m missing? I’m new to the core and am used to the arduino platform where the serial monitor is pretty much plug and play.

Thanks

Hi @chiliman77

Until you hit the code for

Serial.begin(9600);

you core is not enumerated as a USB device. After the begin code, it is enumerated, typically as a new device.

On my mac, I use cool term (or screen in shell) and wait until I see the new USB device pop up, then I try to connect.

You can also put a while loop after the begin to wait for a character to be typed (or just a delay) but you should call Spark.process() in the loop while you are waiting. Windows PCs seem to need this but it has not been a big deal for me on my mac.

2 Likes

Ok, yes that worked. I just had to rescan after the program started running.

Thanks. Now on to other problems…

1 Like