MKR 1010 wifi - will not work unless plugged into a USB port

I can put together a proof of concept code with the MKR1010 to turn an LED on and off via blue tooth - however, when I try to power the arduino by plugging the USB plug into a power source it will not work. (I have not found or purchased the batter yet). What am I missing?

If the code includes a line like this, delete it.

    while (!Serial);

This line waits for a USB data connection which will only happen when the MKR board is connected to a USB host such as a PC.

2 Likes

thanks I will try this