This demonstrates some code allowing the nodeMCU ESP8266 (IOT device) to blink using the built in LED. This has been adjusting by redefining the LED to D4.
To use, plug in the ESP8266, and open the Arduino IDE. ESP8266 installation Step 1 Go to File > Preferences Step 2 Select tickboxes for Automatic, Verify code after upload, Check for updates on startup and Save when verfying or uploading. Paste this link innto Additional Boards Manager URLs: http://arduino.esp8266.com/stable/package_esp8266com_index.json Step 3 Got too Tools > Board > Board manager Step 4 Search ESP9266 Select version 2.3.0 and download.
After the installation you can use the NodeMCU 1.0 (ESP-E12 Module) from your Board menu in the Tools as you would with any other Arduino. From File > Examples you can find a wealth of ESP8266 examples to get you started.