Skip to content

Instantly share code, notes, and snippets.

@Jamesits
Last active September 24, 2020 03:22
Show Gist options
  • Save Jamesits/a3c128d050e6d3a16e9a to your computer and use it in GitHub Desktop.
Save Jamesits/a3c128d050e6d3a16e9a to your computer and use it in GitHub Desktop.
Blink for ESP8266 ESP-12E NodeMCU 1.0 Board, Arduino IDE: Hello world and function tests.
@Jamesits
Copy link
Author

Jamesits commented Mar 4, 2016

Tested on Arduino IDE 1.6.7 or later.

Install Driver

USB to UART driver: http://cn.silabs.com/products/mcu/Pages/USBtoUARTBridgeVCPDrivers.aspx

Config

File - Preferences - Additional Boards Managers URLs: http://arduino.esp8266.com/stable/package_esp8266com_index.json
Tools -> Board -> Boards Manager -> search ESP8266 and install
Tools - Board: NodeMCU 1.0 (ESP-12E Module)
Tools - CPU Freq: 80MHz
Tools - Flash size: 4M (3M SPIFFS)
Tools - Upload speed: 921600 (115200 is also OK)
Tools - Port: select the port it is connected to.

Flashing

Now try to upload this code.

In most cases, it can be flashed directly. However, if you see the following error:

error: espcomm_open failed
error: espcomm_upload_mem failed

Try press and hold FLASH, press RESET, release RESET, release FLASH, then click Upload from Arduino IDE.

Result

2 LEDs (on both ESP module and the extension board) should flash 2 times per second.

Check Tools -> Serial Monitor (Set baudrate to the same value as in line 14 of the code), you should see Wi-Fi status, current voltage and LED switch status.

@Jamesits
Copy link
Author

Jamesits commented Mar 4, 2016

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment