Q: How do I find the addresses of other HP switches in my network? I'm trying to find the IP of a switch, in order to set it to factory defaults. 
I heard there's a command for HP Switches to find all surrounding HP Switches. What is it?

A: You will want to run this command:
sho cdp neighbors det

cdp is the Cisco Discovery Protocol, but this command still works on Procurve switches.
As an alternative you can also run this:
sho lldp info remote-device

lldp is the Link Layer Discover Protocol.  The SysName column will display the host name of the remote switch.
To map out your network, you will start at an edge switch, run these commands, then ssh to those remote switches.  Once on the remote switch, repeat this process.

A: Are you looking for a network scanner, such as The Dude, SoftPerfect Network Scanner or Nmap ?
A switch should have a web interface and a telnet interface.
Another approach would be to use the arp command to find its IP address from the Mac address (which should be physically labeled on it somewhere).
Example:
nmap -sP 192.168.1.0/24 >/dev/null && arp -an | grep <mac address here> | awk '{print $2}' | sed 's/[()]//g'

