New ESP8266 - cannot do simple blink project

Hi,
Up until now, I have only been using Arduino units. First time ever, I have purchased an ESP8266 12E to make an IoT project. Just as I usually do with Arduino unit, I tried to run a simple blink project but I am not getting normally expected results. Here is what I have:

Unit: ESP8266 12E, Vendor DOIT.AM, Model: ESP8266MOD

Connected to computer directly via USB cable. No breadboard or any other device connected.

In Arduino, I have selected: NodeMCU 1.0 (ESP-12E Module)

#define LED D0            // Led in NodeMCU at pin GPIO16 (D0).
void setup() {
pinMode(LED, OUTPUT);    // LED pin as output.
}
void loop() {
digitalWrite(LED, HIGH);// turn the LED off.(Note that LOW is the voltage level but actually 
                        //the LED is on; this is because it is acive low on the ESP8266.
delay(1000);            // wait for 1 second.
digitalWrite(LED, LOW); // turn the LED on.
delay(1000); // wait for 1 second.
}

Result:

Build options changed, rebuilding all
Sketch uses 257696 bytes (24%) of program storage space. Maximum is 1044464 bytes.
Global variables use 26572 bytes (32%) of dynamic memory, leaving 55348 bytes for local variables. Maximum is 81920 bytes.
esptool.py v2.6
2.6
esptool.py v2.6
Serial port COM4
Connecting....
Chip is ESP8266EX
Features: WiFi
MAC: 2c:f4:32:57:a8:2g
Uploading stub...
Running stub...
Stub running...
Configuring flash size...
Auto-detected Flash size: 4MB
Compressed 261856 bytes to 191266...

Writing at 0x00000000... (8 %)
Writing at 0x00004000... (16 %)
Writing at 0x00008000... (25 %)
Writing at 0x0000c000... (33 %)
Writing at 0x00010000... (41 %)
Writing at 0x00014000... (50 %)
Writing at 0x00018000... (58 %)
Writing at 0x0001c000... (66 %)
Writing at 0x00020000... (75 %)
Writing at 0x00024000... (83 %)
Writing at 0x00028000... (91 %)
Writing at 0x0002c000... (100 %)
Wrote 261856 bytes (191266 compressed) at 0x00000000 in 16.9 seconds (effective 123.7 kbit/s)...
Hash of data verified.

Leaving...
Hard resetting via RTS pin...

Serial Monitor gives me some ascii characters that I can't make any sense of.

During flashing, I can see the device LED blicking etc but after that, nothing happens.

What am I doing wrong?

Thank you.

It is not unusual to see some seemingly random characters during the start up of an ESP as it is essentially an odd baud rate and is the bootloading.
A little googling will find you just what I said.

As far as the BLINK program not working some ESP's have the LED on different pins.

Sometimes it is better to use the newer BLINK EXAMPLE as it uses a slightly different method to set the pin number

void setup() {
  // initialize digital pin LED_BUILTIN as an output.
  pinMode(LED_BUILTIN, OUTPUT);
}

// the loop function runs over and over again forever
void loop() {
  digitalWrite(LED_BUILTIN, HIGH);   // turn the LED on (HIGH is the voltage level)
  delay(1000);                       // wait for a second
  digitalWrite(LED_BUILTIN, LOW);    // turn the LED off by making the voltage LOW
  delay(1000);                       // wait for a second
}

Note the use of the word "LED_BUILTIN" with no pin number.

Bob.

Thank you Bob. I tried the new blink program but got the same results. After the "Hard Resetting via RTS Pin" message, I do not see any activity at all on the unit.

I now tried another piece of code and this one seems to be working so I am guessing it is something to do with how LED is accessed on this particular device model. I used the following code and received an IP address.

#include<ESP8266WiFi.h>
const char* ssid = "myssid";
const char* password = "mypassword";   

WiFiClient wifiClient;

void setup() {
 Serial.begin(115200);
 Serial.print("Connecting to ");
 Serial.println(ssid);  
 WiFi.begin(ssid, password);
 while (WiFi.status() != WL_CONNECTED) {
   delay(500);
   Serial.print(".");
 }
 Serial.println("");
 Serial.println("WiFi connected");  
 Serial.println("IP address: ");
 Serial.println(WiFi.localIP());

 
}

void loop() {
 
}

ballscrewbob:
It is not unusual to see some seemingly random characters during the start up of an ESP as it is essentially an odd baud rate and is the bootloading.
A little googling will find you just what I said.

As far as the BLINK program not working some ESP's have the LED on different pins.

Sometimes it is better to use the newer BLINK EXAMPLE.....