ricaun / ArduinoUniqueID

Arduino Library to gets the Manufacture Serial Number from the Atmel AVR, SAM, SAMD, STM32, and ESP Microcontroller.
MIT License
224 stars 50 forks source link

Nano 33 IoT Example Fix #23

Open abhishekd-1 opened 2 years ago

abhishekd-1 commented 2 years ago

I was able to reproduce #12 on my own Nano 33 IoT. The examples "ArduinoUniqueID" and "ArduinoUniqueID8" do not print anything to the Serial Monitor when uploaded to the board. However, "ArduinoUniqueIDSerialUSB" works perfectly fine.

The fix is to add a simple while(!Serial); to the code just after opening the serial port. I have confirmed that this works by testing it on my Nano 33 IoT.