Hello everyone! I am a newbie to using Arduino and its programming. I have written a program including commands for the DAC of Arduino MKRZero. However, when I upload this program, my Arduino board becomes permanently unrecognizable by the computer. After this, whenever I connect the board to the computer a message pops up saying 'The last USB device you connected was not recognized'. I have wasted 2 Arduino boards in this manner facepalm. I am attaching my Arduino code herewith.DAC.ino (2.5 KB)
I searched and tried some methods of resolving the 'USB device not recognized' error from YouTube, but didn't find anything useful. Before running this DAC program, I also tried running the Blink Example from the Arduino library and it seemed to work fine with the board. Hence, I think my code is problematic. Can anyone tell me how to resolve this? And if possible, is there any way to fix the 2 Arduino boards which aren't working now?