I'm unable to communicate with my nodemcu ESP8266 module using the AT commands. The module does not return 'ready' on the serial monitor and entering AT commands has no effect at all. I am able to upload programs onto the module and even receive messages onto the serial monitor. But not for the AT commands. Please help....
The bare chip knows nothing, just as an Arduino would. The AT+ command set is provided by an interpreter running on the 8266 processor. The AI Thinker modules and others, come with that interpreter already loaded. Your module does not have it installed. And any time you load a program into it, the previous one is over-written.
You can find the AT+ interpreter available for download and upload it to the module, after which it will be able to execute AT+... commands.
Use the NodeMCU to process your logic, instead of the Arduino
When using the NodeMCU (or NodeMcLua) you (in a lot of cases) don't really need an Arduino. The ESP8266-12E based "dev boards" with mini-usb connector can be programmed just like an Arduino, using the Arduino IDE.
- The ESP8266-12 is powerfull enough (32-bit 80mhz)
- The ESP8266-12 has (usually) enough I/O pins (and you can use an I/O expander if needed)
- Adding an Arduino to it is only making the system more expensive.
- Adding an Arduino to it is only making the system more complex (and needs additional wiring).
This is especially true for the ESP8266-12 nodemcu boards with mini-USB, since they're "almost" as easy to program as the Arduino.
Configuring the board file
You'll need to be able to select the "ESP8266" as your target, the Arduino IDE has a possibility to use board files for other targets than Arduino. This is best explained on tutorials and other sources online:
- Install Arduino 1.6.8 from the Arduino website.
- Start Arduino and open Preferences window.
- Enter http://arduino.esp8266.com/stable/package_esp8266com_index.json into Additional Board Manager URLs field. You can add multiple URLs, separating them with commas.
- Open Boards Manager from Tools > Board menu and install esp8266 platform (and don't forget to select your ESP8266 board from Tools > Board menu after installation).
When using the ESP8266, you obviously can't use any of the specific hardware features that you could normally use with the Atmega based Arduino's. However, SPI, I2C, UART, analog and digital pins should be ported rather well, and can be used. You are not able to call Atmega328 registers directly (but you may, I believe, call registers of the ESP8266 directly).
Note on the boards.txt not listing your specific ESP8266
You may find that the boards.txt does not list your specific ESP8266 or that it simply doesn't upload (can cause various errors).
Note on Chinese boards with CH340G usb-serial chip
The Chinese boards often come with a CH340G chip, these usb<->uart chips are used to interface the MCU with the PC (over USB, while acting as an USB-COM device). These drivers for these CH340x chips aren't installed in Windows/Mac on default, you'll have to instal the drivers manually. It can be a little frustrating since these drivers usually aren't signed.