Code does not run without USB serial monitor

Hello :slight_smile:
I am running the basic Motor_test from the examples on a MKR zero + MKR motor carrier.
When the USB is connected everything works fine, but if I disconnect the USB and unplug/replug the power to the shield (the shield is powered with a power supply) the program does not start automatically, no matter if I reset the zero. I have to reconnect the serial monitor to make it run. What am I missing?

Thank you

Antonio

Did you turn on the MKR Motor Carrier by flicking the switch from OFF to ON? Try to follow this example Reading Battery Level with MKR Motor Carrier
to set up your boards properly and make sure that you power the shield properly.

Any chance that you have a while(!Serial) in your code? That will make the MKR Zero wait till a communication channel (e.g. serial monitor) is opened.

1 Like

Oh stupid me!
Yes it was, @sterretje. Thank you.
And thank you @Dozie for your help too.

Antonio

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.