Arduino: Did I damage analog joystick clicker by using analog instead of digital input?
Did I damage analog joystick clicker by using analog instead of digital input?


No.  Neither mode will draw damaging amounts of current through the device.

But it does look like you've set pin 7 to be an output, and are trying to read digital values from that pin.  Is that what you intended? :)

Make it an input instead and generally give your code a close examination line by line.

Further info:
Setting a pin to be an input will configure your microcontroller to use "High-Z" mode on that particular pin.  This means that the pin becomes a high impedance input ("Z" is the standard letter for impedance).  This means that almost no current is able to be either drawn from, or sunk into, that pin.

While in High-Z state (also known as "tri-stated", or simply as "input") this pin is able to do either digital input readings (logic levels... 0's and 1's) or analog readings (an 8-bit analog input is able to give you a value between 0x00 and 0xff), which you can scale mathematically to a voltage between 0V and VCC.