I thouhgt I wanted to try IoT with ESP8266 easily, so I got Nodemcu dev kit to the test lua on ESP8266. The kit I got was NodeMcu Lua WIFI Development Board For ESP8266 Module from Banggood. The kit contains somewhat more (around 8 Euros) than bare ESP8266 module (around $3), but promises to provide easier to work dev kit and more features. Here is the kit I got
I already had CH340G USB-serial adapter driver installed on my PC (I have used USB-RS232 adapters with this CH340 chip set earlier), so getting it to work with the Windows computer (Windows 7 and 8 tested) was just plugging the module to computer USB port with standard microUSB-to-USB cable (I used cable borrowed from my smart phone charger).
The dev kit should show as serial port. According to the instructions I expected that when I set the baud rate to 9600 bps, I could talk Lua to the module. That experiment failed
I ended up in the situation that I could talk to module at 115200 bps data rate and it only seemed to answer to AT commands. So it seems that this kit came with standard default ESP8266 firmware instead of nodemcu.
The next step is to get the proper firmware module. I followed the instructions provided by Electrodragon to get the nodemcu Lua into the ESP8266 module in this dev kit. I downloaded nodemcu-flasher and run it. The module got programmed. After power-down and power-up I could talk Lua to it at 9600 bsp data rate. I used Teraterm to communicate with the module (I had to set the Setup->Terminal..->New Line / Transmit: CR+LF).
The first successful test to control IO pin:
pin =1 gpio.mode(pin,gpio.OUTPUT) gpio.write(pin,gpio.HIGH) gpio.mode(pin,gpio.INPUT) print(gpio.read(pin))
The next was to connect to WLAN base station (Android smart phone) and load web page. I used example from nodemcu web page to do that. Now I have all the basic parts tested, and now it is time to think for IoT applications. In the short test this nodemcu feels like a very good platform for IoT.