Nano: All digital pins do not output anything New user here. Using the examples provided on the Arduino IDE software I could produce melodies with a piezo buzzer, or have a blinking LED.
Not anymore. No digital pin is giving anything. I can see the embedded LED blink if I program the Pin 13, but no impact outside of it.
So I tried connecting an output digital pin (13) to an Analog input pin, or any one that can be put as input (A7, D5, etc.) (with a resistor so not to destroy the little thing).
const char out=13;
const char  in=8;
char         i=0;
void setup() {
  Serial.begin(9600);
  pinMode(out, OUTPUT);
  pinMode(in,  INPUT);
  digitalWrite(out, LOW);
}
void loop() {
  if(i&amp;1){
    digitalWrite(out,i&amp;2?HIGH:LOW);
  }else{
    Serial.println(analogRead(in));
  }
  i++;
  delay(50);
}

The output has been 0, whichever digital pin it is connected to.
How can I actually find out if, by any chance, I successfully (!) damaged all my digital pins?

I currently use a breadboard
The ground is connected correctly (to GND)
It stopped working between uses, last time I was trying a Tone(out,val) melody
I'm measuring the out-pin value by connecting it to an analog in-pin with a resistor in series
I did set the out-pin as such during setup. (pinMode(out, OUTPUT);)


So! Looks like I didn't understand the codes for the digital pins. I thought we had to use the pin number, but the digital pin number (say 10 for D10) is what it takes to address it. And I was always referring myself back to the schematic for each pin -_-.
As well with the accepted answer, I needed to pull down (or up? still can't figure it out!) the input pin with a resistor to ground.
Thanks everyone!
Your sketch works on a Nano (clone) that I have

I am using a high-brightness white LED with a 10kΩ resistor to bring the brightness down to a bearable level, so the current drawn is about (5v-2.2v)/10kΩ = 0.28mA. This is a low level of current and should be safe for poking around with.

I can see the embedded LED blink if I program the Pin 13, but no impact outside of it.

That suggests that the ATmega328P is essentially undamaged and that at least the IC leg connected to D13 is working as it should.

How can I actually find out if, by any chance, I successfully (!) damaged all my digital pins?

Without a multimeter or other tools,  I would take a LED and resistor that draw less than 5mA, test them between VCC and GND to make sure they work
Then I would use the resistor and LED to check the output of each of the D2 to D13 outputs using your existing sketch.
When the onboard LED blinks, I am able to attach a LED and series resistor to pin D13 and get it to blink.

I wasn't sure what you intended by setting in to 8 so I later changed your program as follows:
const char  in=A1;

and I got this output on the serial monitor after connecting a jump lead from D13 to A1
0
1010
0
1009
0
1009
0
1009
0
1009
0
1009
0
1009
0
1009
0
1008


If I pivot the LED away from pin D13, I can use a jump lead as a test probe

Main points:

pick a high resistor value that minimises current drawn but is still easily visible.
check the LED works! (is right way around etc)
use a jump lead as a probe.

There are more sophisticated test circuits you could build with a FET etc but this would normally be enough for me to decide if an Arduino's outputs are damaged.

Extract from ATmega328 datasheet - note the max current draw per pin is 40mA. Exceeding that is probably the easiest way to damage the IC but if the onboard LED labelled &quot;L&quot; (and connected to D13) works, it means that part of the IC is undamaged.