If you are having a problem getting WiFi to connect please try the following:
1) open a terminal window and type (make sure it is exact):
sudo iwlist wlan0 scan | awk '/ESSID/'
this should return a line like this:
ESSID:"Mines of Moria"
so the SSID is "Mines of Moria" (yours will be different) NOTE: if you have a hidden network, go to step (2)
2) you have to edit a configuration file so type
sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
it should have the following in it:
at the bottom type the following:
using your SSID (from step 1) and your WiFi password.
3) Press CTRL+X to exit and you will see the line:
Save modified buffer (ANSWERING "No" WILL DESTROY CHANGES) ?
Press 'Y' save, pressing Y and you will see the line:
File Name to Write: /etc/wpa_supplicant/wpa_supplicant.conf
Press Enter to confirm.
4) Reboot the system by typing:
5) when the Pi finishes booting see if the WiFi icon is now green