How to use d0 and d1 pins of arduino uno (Others) as a digital output when I don't want to use Serial I have searched this topic almost everywhere also got different results that couldn't satisfy me
My new project is a 4x4 LED cube
Of which
Will contain 4 Rows and each Row will contain 16 LEDs
So, I need to use all the digital pins 0-15 as digital output.
And other pins 16-20 for grounding.
But the problem is, this project needs d0 and d1 pin to be connected as a digital output pin. (Not Serial communication)
In some places I have seen that Experts saying


If you want to use Serial communication, then you can't use them.




You can't use it while your arduino is connected to PC.




You Can't do this ,as this may harm the device




You must turn off serial connection first.


OK, reading this, I got confused, I don't need to use any serial connection (console and others) in this LED cube project so I tried to turn off serial connection by not writing the code below.
Serial.begin(9600);

So, will that free those d0 and d1 pins as digital for me ? Or USB connection is also considered as a serial connection?
So, how can I do it? And will doing it really harm my board?
If you don't use the serial port, pins 0 and 1 are regular I/O pins.
It's just as simple as that.

If you want to use Serial communication, then you can't use them.

Correct.

You can't use it while your arduino is connected to PC.

Wrong. You can keep the USB cable connected as a power supply. You will
not be able to use it for communication though.

You Can't do this, as this may harm the device

What is “this”? The device can be harmed if you drive too much current
to/from an I/O pin, irrespective of whether it's a pin that could be
used for serial communication.

You must turn off serial connection first.

Only if you did turn it on before. If you never enable Serial, you
don't have to do anything more.