ESP8266 and NodeMCU

First flash the ESP8266 with the Nodemcu firmware using this guide:
Vcc on the Esp is powered by an LM1117 as in xxx. Gnd to gnd, rx to tx and tx to rx on the serial adapter. CH_PD to Vcc, Gpio0 to Vcc via a resistor (1k) and to ground via a push button. Push the button, toggle Vcc to the Esp, release button, run the command to flash the firmware.

Then install Esplorer, a Java tool to work with the Esp:
To run the tool in Linux:

sudo java -jar ESPlorer.jar

In Esplorer, select the correct serial port (as given by dmesg) and click Open. You can then try the button Chip Info and Chip Id, if all is good you'll get an answer.

Next we save to code from to a file. Then this file is opened in Esplorer and uploaded to the Esp by clicking "Send to esp". The Esp now runs a Hotspot to which we can connect with a Smartphone or other wireless device. The server shows it's IP-address in Esplorer, we now use this address in the Smartphone's browser. This gives a simple page with two textboxes. Here we fill in the network that the Esp shall connect to in the future and also the password for this network. Click config and the Esp will reset and connect to the selected network.
Now we use the Fing app on the Smartphone to find the device again. In this example the Esp (named "Espressif") got the IP This address is now used in a browser on the computer, and if all works the ESP/server will print "Connected" the browser window.

Next test is to upload the code from The webpage is reloaded, and the Esp shows a textbox and two buttons.
We also connect a resistor and a led between Gpio0 and ground on the Esp. Now we enter the secret (found in the code) in the textbox and clicks the buttons. If all works the led will toggle on and off.