board stops working when writing serial
In the setup(), you have:
Serial.print(&quot;Hello World!&quot;);
Serial.begin(9600);

One should avoid printing to the serial port before enabling it with
Serial.begin().