This is the entry from octopi-wpa-supplicant.txt that I updated on the MicroSD ( done from my PC using Notepad++, but notepad works too ):
## WPA/WPA2 secured
network={
ssid="YOURNETWORKNAME"
psk="YOURPassword"
key_mgmt=WPA-PSK
}
Some other commands I found helpful to see what WiFi was doing are below (I used these while I had the Pi connected via wired Ethernet and ssh'ed in using Putty):
ifconfig -a
iwconfig
iwlist wlan0 scan | grep ESSID:
The last one clued me into the problem since I could see my network, but it was not connecting.
While I was ssh'ed into the Pi, I took the opportunity to run these as well (the 2nd one takes several minutes to complete):
sudo apt-get update
sudo apt-get upgrade
Then I rebooted and updated Octopi itself (from the browser, login to Octoprint, click the wrench at the top left, select "Software Update" and then click "Update All"). After that and blowing the dust off this neglected Pi, it's back in working order.