NodeMCU - wikipedia NodeMCU NodeMCU NodeMCU DEVKIT 1.0 Developer ESP8266 Opensource Community Type Single - board microcontroller Operating system XTOS CPU ESP8266 ( LX106 ) Memory 128kBytes Storage 4MBytes Power USB Website www.nodemcu.com, API reference : nodemcu.readthedocs.io NodeMCU DEVKIT 1.0 BOTTOM NodeMCU is an open source IoT platform. It includes firmware which runs on the ESP8266 Wi - Fi SoC from Espressif Systems, and hardware which is based on the ESP - 12 module. The term `` NodeMCU '' by default refers to the firmware rather than the development kits. The firmware uses the Lua scripting language. It is based on the eLua project, and built on the Espressif Non-OS SDK for ESP8266. It uses many open source projects, such as lua - cjson, and spiffs. Contents 1 History 2 Related projects 2.1 ESP8266 Arduino Core 3 Pins of NodeMCU 4 Code examples 4.1 Connect to an AP 4.2 Control GPIO 4.3 HTTP request 4.4 HTTP server 4.5 Connect to MQTT Broker 4.6 UDP client and server 5 See also 6 References 7 External links History NodeMCU was created shortly after the ESP8266 came out. On December 30, 2013, Espressif Systems began production of the ESP8266. The ESP8266 is a Wi - Fi SoC integrated with a Tensilica Xtensa LX106 core, widely used in IoT applications ( see related projects ). NodeMCU started on 13 Oct 2014, when Hong committed the first file of nodemcu - firmware to GitHub. Two months later, the project expanded to include an open - hardware platform when developer Huang R committed the gerber file of an ESP8266 board, named devkit v0. 9. Later that month, Tuan PM ported MQTT client library from Contiki to the ESP8266 SoC platform, and committed to NodeMCU project, then NodeMCU was able to support the MQTT IoT protocol, using Lua to access the MQTT broker. Another important update was made on 30 Jan 2015, when Devsaurus ported the u8glib to NodeMCU project, enabling NodeMCU to easily drive LCD, Screen, OLED, even VGA displays. In summer 2015 the creators abandoned the firmware project and a group of independent but dedicated contributors took over. By summer 2016 the NodeMCU included more than 40 different modules. Due to resource constraints users need to select the modules relevant for their project and build a firmware tailored to their needs. Related projects ESP8266 Arduino core As Arduino.cc began developing new MCU boards based on non-AVR processors like the ARM / SAM MCU and used in the Arduino Due, they needed to modify the Arduino IDE so that it would be relatively easy to change the IDE to support alternate tool chains to allow Arduino C / C++ to be compiled down to these new processors. They did this with the introduction of the Board Manager and the SAM Core. A `` core '' is the collection of software components required by the Board Manager and the Arduino IDE to compile an Arduino C / C++ source file down to the target MCU 's machine language. Some creative ESP8266 enthusiasts have developed an Arduino core for the ESP8266 WiFi SoC that is available at the GitHub ESP8266 Core webpage. This is what is popularly called the `` ESP8266 Core for the Arduino IDE '' and it has become one of the leading software development platforms for the various ESP8266 based modules and development boards, including NodeMCUs. Pins of NodeMCU NodeMCU provides access to the GPIO ( General Purpose Input / Output ) and for developing purposes below pin mapping table from the API documentation should be referenced. IO index ESP8266 pin 0 ( * ) GPIO16 GPIO5 GPIO4 GPIO0 GPIO2 5 GPIO14 6 GPIO12 7 GPIO13 8 GPIO15 9 GPIO3 10 GPIO1 11 GPIO9 12 GPIO10 ( * ) D0 ( GPIO16 ) can only be used for GPIO read / write. It does not support open - drain / interrupt / PWM / I2C or 1 - Wire. Code examples The NodeMCU repository contains its own collection of elaborate code examples. Besides that the NodeMCU documentation provides small examples for most functions and modules. Connect to an AP print ( wifi. sta. getip ( ) ) -- nil wifi. setmode ( wifi. STATION ) wifi. sta. config ( ssid = `` SSID '', pwd = `` password '' ) -- for older versions of the firmware wifi. sta. config ( `` SSID '', `` password '' ) -- wifi. sta. connect ( ) not necessary because wifi. sta. config sets auto - connect = true tmr. create ( ) : alarm ( 1000, 1, function ( cb_timer ) if wifi. sta. getip ( ) = = nil then print ( `` Connecting... '' ) else cb_timer : unregister ( ) print ( `` Connected, IP is ``... wifi. sta. getip ( ) ) end end ) Control GPIO ledPin = 1 swPin = 2 gpio. mode ( ledPin, gpio. OUTPUT ) gpio. write ( ledPin, gpio. HIGH ) gpio. mode ( swPin, gpio. INPUT ) print ( gpio. read ( swPin ) ) HTTP request -- A simple HTTP client conn = net. createConnection ( net. TCP, 0 ) conn : on ( `` receive '', function ( sck, payload ) print ( payload ) end ) conn : on ( `` connection '', function ( sck ) sck : send ( `` GET / HTTP / 1.1 \r \nHost : nodemcu.com \r \n ''... `` Connection : keep - alive \r \nAccept : * / * \r \n \r \n '' ) end ) conn : connect ( 80, `` nodemcu.com '' ) Doing something similar using the HTTP module : http. get ( `` http://nodemcu.com '', nil, function ( code, data ) if ( code < 0 ) then print ( `` HTTP request failed '' ) else print ( code, data ) end end ) HTTP server -- a simple HTTP server srv = net. createServer ( net. TCP ) srv : listen ( 80, function ( conn ) conn : on ( `` receive '', function ( sck, payload ) print ( payload ) sck : send ( `` HTTP / 1.0 200 OK \r \nContent - Type : text / html \r \n \r \n < h1 > Hello, NodeMCU. < / h1 > '' ) end ) conn : on ( `` sent '', function ( sck ) sck : close ( ) end ) end ) Connect to MQTT Broker -- init mqtt client with keepalive timer 120sec m = mqtt. Client ( `` clientid '', 120, `` user '', `` password '' ) -- setup Last Will and Testament ( optional ) -- Broker will publish a message with qos = 0, retain = 0, data = `` offline '' -- to topic `` / lwt '' if client do n't send keepalive packet m : lwt ( `` / lwt '', `` offline '', 0, 0 ) m : on ( `` connect '', function ( con ) print ( `` connected '' ) end ) m : on ( `` offline '', function ( con ) print ( `` offline '' ) end ) -- on publish message receive event m : on ( `` message '', function ( conn, topic, data ) print ( topic... `` : '' ) if data ~ = nil then print ( data ) end end ) -- for secure : m : connect ( `` 192.168. 11.118 '', 1880, 1 ) m : connect ( `` 192.168. 11.118 '', 1880, 0, function ( conn ) print ( `` connected '' ) end ) -- subscribe topic with qos = 0 m : subscribe ( `` / topic '', 0, function ( conn ) print ( `` subscribe success '' ) end ) -- or subscribe multiple topic ( topic / 0, qos = 0 ; topic / 1, qos = 1 ; topic2, qos = 2 ) -- m : subscribe ( ( ( `` topic / 0 '' ) = 0, ( `` topic / 1 '' ) = 1, topic2 = 2 ), function ( conn ) print ( `` subscribe success '' ) end ) -- publish a message with data = hello, QoS = 0, retain = 0 m : publish ( `` / topic '', `` hello '', 0, 0, function ( conn ) print ( `` sent '' ) end ) m : close ( ) ; -- you can call m : connect again UDP client and server -- a udp server s = net. createServer ( net. UDP ) s : on ( `` receive '', function ( s, c ) print ( c ) end ) s : listen ( 5683 ) -- a udp client cu = net. createConnection ( net. UDP ) cu : on ( `` receive '', function ( cu, c ) print ( c ) end ) cu : connect ( 5683, `` 192.168. 18.101 '' ) cu : send ( `` hello '' ) See also ESP8266 ESP32 ESP Easy Internet of things MCU ( Micro Controller Unit ) Lua ( programming language ) References Jump up ^ Kumar, Abhijeet, and Apoorva Sharma. `` Internet of Life ( IOL ). '' ( 2015 ). ISBN 978 - 93 - 5156 - 328 - 0 Jump up ^ Brian Benchoff. `` An SDK for the ESP8266 Wi - Fi chip ''. Hackaday. Missing or empty url = ( help ) ; access - date = requires url = ( help ) Jump up ^ Vowstar. `` NodeMCU Devkit ''. Github. NodeMCU Team. Retrieved 2 April 2015. Jump up ^ Zeroday. `` A lua based firmware for wifi - soc esp8266 ''. Github. Retrieved 2 April 2015. Jump up ^ Hari Wiguna. `` NodeMCU LUA Firmware ''. Hackaday. Retrieved 2 April 2015. ^ Jump up to : Systems, Espressif. `` Espressif Systems ''. Espressif - WikiDevi. Retrieved 3 June 2017. Jump up ^ Brian Benchoff. `` A DEV BOARD FOR THE ESP LUA INTERPRETER ''. Hackaday. Retrieved 2 April 2015. Jump up ^ Mpx. `` Lua CJSON is a fast JSON encoding / parsing module for Lua ''. Github. Retrieved 2 April 2015. Jump up ^ Pellepl. `` Wear - leveled SPI flash file system for embedded devices ''. GitHub. Retrieved 2 April 2015. Jump up ^ Espressif system ( December 30, 2013 ). `` IoT Wi - Fi 802.11 b / g / n integrated SoC implementation of volume production ''. 中国 上海 讯. Retrieved 2 April 2015. Jump up ^ Hong. `` First commit of NodeMCU Firmware ''. Github. Retrieved 2 April 2015. Jump up ^ Huang R. `` Initial design of NodeMCU devkit ''. Github. Retrieved 2 April 2015. Jump up ^ Tuan PM. `` MQTT client library for ESP8266 ''. Github. Retrieved 2 April 2015. Jump up ^ Olikraus ; Daniel Sittig. `` Universal Graphics Library for 8 Bit Embedded Systems ''. Google code. Retrieved 2 April 2015. Jump up ^ Devsaurus. `` U8glib for esp8266 ''. Github. Retrieved 2 April 2015. External links Official website Ambient intelligence Concepts Context awareness Internet of Things Object hyperlinking Profiling Spime Supranet Ubiquitous computing Web of Things Wireless sensor networks Technologies 6LoWPAN ANT+ DASH7 IEEE 802.15. 4 Internet 0 Machine to machine Radio - frequency identification Smartdust Tera - play XBee Platforms Arduino Contiki Electric Imp Gadgeteer ioBridge Netduino Raspberry Pi TinyOS Wiring Xively NodeMCU Applications Ambient device CeNSE Connected car Home automation HomeOS Internet refrigerator Nabaztag Smart city Smart TV Smarter Planet Pioneers Kevin Ashton Gaetano Borriello Adam Dunkels Stefano Marzano Don Norman Roel Pieper Josef Preishuber - Pflügl John Seely Brown Bruce Sterling Mark Weiser Other Ambient Devices AmbieSense Ebbits project IPSO Alliance Retrieved from `` https://en.wikipedia.org/w/index.php?title=NodeMCU&oldid=865935528 '' Categories : Open hardware electronic devices Microcontrollers Internet of things Robotics hardware Hidden categories : Pages using web citations with no URL Pages using citations with accessdate and no URL All articles with unsourced statements Articles with unsourced statements from October 2016 Talk Contents About Wikipedia Deutsch Français Italiano Português 中文 Edit links This page was last edited on 27 October 2018, at 04 : 30 ( UTC ). About Wikipedia

Question: programming language prescribed to be used on iot device nodemcu is
Answer: Lua