In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)05/31 Report--
This article mainly introduces what Nodemcu is, the article is very detailed, has a certain reference value, interested friends must read it!
Nodemcu is an extension board based on Lexin ESP-12E WiFi module. Because the design of ESP12-E is not suitable for general players' development and debugging (pin port spacing is 2mm, need to use AT instruction), there are many development boards that make ESP8266 more convenient to use. Nodemcu is one of them and is also widely used. In addition, compared with WiFi modules such as Photon, the price of Nodemcu is much cheaper. In addition, Nodemcu supports Lua language, which makes programming easier and more efficient.
Taobao search for "Nodemcu", you can see a lot, the price is about 30 yuan.
Steps to use:
1. Swipe rom and use the tool ESP8266Flasher
Download address:
Https://github.com/nodemcu/nodemcu-flasher
Or Baidu online disk.
Http://pan.baidu.com/s/1c20XjaC
The nodemcu-devkit-master in the network disk is a development kit with documentation and drivers.
Note that there is a difference between 32 bits and 64 bits
After opening, the interface is as follows
If everything is all right, you can see the corresponding com port and click Flash to write to rom.
MAC is the physical address.
There are three modes of NodeMCU's WIFI module
AP mode (that is, router mode)
STA mode (my understanding is wireless card mode)
AP+STA mode. One of the cases we are going to talk about next is the use of STA mode. In this mode, you can think of NodeMCU as a client in a wireless network, this client is connected to a wireless hotspot, and then obtain the client IP address through the DHCP function of the wireless router, and then we write a simple Web Server server, mainly to deal with the response that controls the GPIO device.
After brushing, you can start to write code happily.
The development tool used is called "ESPlorer", which can be found in Baidu's online disk, or http://esp8266.ru/esplorer/.
Write a simple code:
While 1 dogpio.write (0, gpio.HIGH) tmr.delay (100000)-wait 1000000 us = 1 secondgpio.write (0, gpio.LOW) tmr.delay (100000)-wait 1000000 us = 1 secondend
Click "Send to ESP" to test the Nodemcu. If the LED on the Nodemcu flashes for 1 second and pauses for 1 second, it means that Nodemcu is ready for use.
A simple implementation of http server
-a simple HTTP serversrv = net.createServer (net.TCP) srv:listen (80, function (conn) conn:on ("receive", function (conn, payload) print (payload) conn:send ("Hello, NodeMCU.By Linshaoneng") end) conn:on ("sent", function (conn) conn:close () end) end)-connect to WiFi access pointwifi.setmode (wifi.STATION) wifi.sta.config ("Wireless sid" "Wireless password") these are all the contents of the article "what is Nodemcu?" Thank you for reading! Hope to share the content to help you, more related knowledge, welcome to follow the industry information channel!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.