How to turn your esp8266-01 into a NODEMCU Lua_wifi

Source: Internet
Author: User
Tags lua

ESP8266 WIFI module Burn write upgrade firmware

http://cckyz.blog.163.com/blog/static/13706603520150282355569/

When you want to get started with the ESP8266 WIFI module burning, you must be getting a headache from a bunch of help files. And then bask in how I burn the firmware, hoping to help you to relieve the effect.   :) Burn Write Step 1, connect the GPIO0 through the 1K resistor to GND 2, connect the CH_PD to VCC 3, connect Utxd with URXD to the corresponding PIN 4 of the USB port module, and burn the firmware by using the following program

The target serial port is set to the serial number of your USB port module, enter the configuration

After setting back to the operating interface, the mouse click "one button Burning Write" button, waiting for progress bar to go to 100 on the OK, burning the process can view the log.

After the power off, let the GPIO0 remain dangling state, EPS8266 module on the power, you can query the current firmware version number AT+GMR.




Http://bbs.elecfans.com/jishu_531101_1_1.html


How to turn your esp8266-01 into Nodemcu Lua

Start playing ESP8266 is to fancy it's cost-effective, because want to do some things networking application development, the main is a number of switches and low-speed byte data transmission, so the WiFi to the serial port module is enough, bought a esp8266-01 module, began to use at the command debugging, Use STM32 to send at instruction, play for a while, found that network interaction is still difficult, especially to access the cloud requires a lot of network knowledge, so eventually did not make any. Esp8266-01. {(K o5 z. H0 B9 b# P6 s
&-O; p% @) S:v) A5 K7 T
Then there was a chance to see NODEMCU, only to understand that the original ESP8266 is not only a WiFi module, or a function of a good 32-bit MCU. But I didn't buy Nodemcu Lua, and I thought I could just brush the NODEMCU firmware on my esp8266-01. The results show that: OK. Fortunately, Esp8266-01 also led to GPIO0 and GPIO2 two pins. This allows the esp8266-01 to be developed as an MCU directly using the Lua script. And not just a WiFi switch to the serial port module.
Here is my transplant process:! y# A3 N7 H6 x2 S, p
Hardware: Esp8266-01+usb to the serial port module (other onboard modules can also be used, jumper can be, that can be esp8266-01 and PC communication can), and then in the GPIO2 pin a light-emitting diode +1k resistor to GND, test use.
1, first ready to download ESP8266 firmware burn write tools, I use the "flash_download_tools_v2.4_150924" (this network is not very good, and so back I later need to upload the software).
Software startup, the interface is the following, configuration information is based on the esp8266-01 parameter configuration, other model modules please refer to the specific manual configuration, especially flash size that one, do not randomly choose.

;  Y ' X8 C8 V:? t# F
2, download the firmware, I use the NODEMCU forum to provide the latest firmware, the name as shown above, Link: https://github.com/nodemcu/nodem .../0.9.6-dev_20150704
The official gave 4 different firmware, as needed to burn write a can, I chose the first, support the floating-point number of firmware. -^, Y) K (?% C4 O9 u
Download the firmware, burn Write tool configuration on the diagram configuration can be, the module to take the following figure (note that some pins do not mark the label, the position of reference to other labeled Pins):
Resistance using 1K 7 J # Z9 F) @3 H8 x4 N6 L

3, burn the finished firmware, power off reconnect module, and pay attention to the GPIO0 and GPIO2 pull cancellation, CH_PD pull do not cancel. 1 l$}6 V9 a ' j$ Q, S
Now you can test whether the firmware is burned to write successfully, the tools required is Tera Term (later I tried, using the normal serial port debugging assistant is also possible), and then in the setup---serial port configuration serial parameters are as follows:


Then you can test a Hello World enter the following code:
Print ("Hello World")
Enter 5 q! X2 Z1 q% i5}0 S
See reply:% s; N "E ' S3 y-w2 P
Hello World
That means your firmware transplant has been successful. A-i ' + S (v4 P7 s# K
-x+ y/p8}1 J2 s:j$ \

4, below also want to download a tool, is used to write the Lua script and write the script to the module, tool name "Nodemcu Studio", start will be prompted to set the serial port parameters, after the setup, the interface is as follows:


On the left is a list of some of the LUA scripts that I have written, and the top right is the Lua script content input:; I ' I ' g/[, Z
pinx=4;
Gpio.mode (Pinx,gpio. OUTPUT); 1 v1 [' U1 y6 X ' C
For i=1,10 do
Gpio.write (Pinx,gpio. High); 9 H2 [Q "V0 p!?
Tmr.delay (200000);
Gpio.write (Pinx,gpio. Low);
Tmr.delay (200000);
End
9 E3 J5 U "z% W, {8 y3 X
Then click Download, and then click Execute, you can see the GPIO2 pin LED will blink 10 times. 1 I (n/h3 y4 v1 o6 S7 O
On the part of the Lua script I have just started to learn, but the forum has a lot of reference documents and API function description, the only bad place is that the forum people do not know how, help are very few people talk to you ... + R "Q7 b& O; W1}; M
However, we have problems can go to search under the paste, a lot of questions and helpful, about esp8266-01 this piece of nodemcu transplant problem, can be in the following post reply, I will definitely answer.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.