Questions tagged [nodemcu]

NodeMCU is an open-source firmware that offers a Lua API for ESP8266, ESP8285, and ESP32. There is also a ESP8266 devkit with the same name. However, questions here should relate to writing Lua code on top of the firmware. Also if you need help understanding the NodeMCU API SO is the right place. Issues with firmware development are best addressed on GitHub. Hardware or general questions can be asked on esp8266.com.

The NodeMCU project is a Lua based firmware that runs directly on ESP8266, ESP8285, and ESP32 hardware, providing a easy and low cost solution. Build-deploy-test cycles are extremely short (contrary to e.g. Arduino) because you only build the firmware once and then simply update scripts on the device.

It provides access to almost all APIs in the Espressif C SDK. Hardware/SDK access is abstracted through close to 60 specific modules. The firmware comes with either integer or floating point support depending on your needs.

975 questions
2
votes
0 answers

ESP8266 (NodeMCU) Creating a sqlite3 database (with lua) is not possible

I want to use a sqlite3 database at my ESP8266 NodeMCU microproessor. The firmware is: NodeMCU custom build by frightanic.com branch: master commit: 67027c0d05f7e8d1b97104e05a3715f6ebc8d07f SSL: false modules:…
Kleinlaut
  • 21
  • 2
2
votes
1 answer

Cannot connect to wi-fi network from NodeMCU board

I am trying to connect to my wifi network on my NodeMCU board. Not sure if it's a hardware or software problem, but I could not find any help on the issue. I am trying to use this code for connecting to the…
Konrad Klimczak
  • 1,474
  • 2
  • 22
  • 44
2
votes
1 answer

Espruino save code and start on initialization

I have making a cool project. I have more or less finalized my code, which will go on a NodeMCU running Espruino. I have trouble to save this code on the Espruino. This code should do this on each boot: connect to wifi, declare all functions and…
Austris
  • 49
  • 9
2
votes
1 answer

Sending GET Request with NodeMCU ESP8266

I'm trying to send a standard http GET request to my website using the NodeMCU example client code however for some reason it is not working. If I type into my browser: snackrefill.com/GetData.php?username=aaaa&pin=bbbb&cost=cccc then it will…
DiscreteTomatoes
  • 769
  • 1
  • 14
  • 30
2
votes
0 answers

nodemcu lua - Heap size goes on decreasing continuously and software reset occurs

I am new to lua and nodemcu. I have a script that runs in the following way: 1) Search for two configuration file in flash, if both are present, then configure the wifi AP in station mode(wifi configuration is stored in file). Then create a one shot…
2
votes
2 answers

NodeMCU, a simple GET request is quite the challenge

I have a project going on using two NodeMCUs and LUA. One NodeMCU (server) is hosting a simple web server that reacts to specific URL parameters. For example, I go to: http://192.168.1.179/?pin=ON1 in my browser and it's LEDs light up etc. I want…
datguy.dev
  • 31
  • 1
  • 5
2
votes
1 answer

Domain name resolution for NodeMCU as an access point

I was reading through the NodeMCU documentation on enduser setup Module, and now I have a little confusion about the following statement: Connect to that SSID and then navigate to the root of any website (e.g., http://example.com/... A web page…
Vinit Shandilya
  • 1,643
  • 5
  • 24
  • 44
2
votes
1 answer

How to get data from web by NodeMCU

I'm using NodeMCU v3, and can already send some information on its server. But how can I receive some information from other web pages, let say for beginning, a plain text?
Bohdan
  • 424
  • 1
  • 4
  • 15
2
votes
1 answer

How to send/receive binary data over TCP using NodeMCU?

I've been trying to mount a custom protocol over the TCP module on the NodeMCU platform. However, the protocol I try to embed inside the TCP data segment is binary, not ASCII-based(like HTTP for example), so sometimes it contains a NULL char (byte…
thePiGrepper
  • 183
  • 7
2
votes
1 answer

How to catch errors in elua (namely NodeMCU)

Let's say I'm importing something with: t = require("ds18b20") t.setup(1) temperatura = t.read() How do I catch an error like "Failed import"? Doing stuff like pcall(t.setup(1)) just returns a syntax error.
Nephilim
  • 494
  • 5
  • 25
2
votes
2 answers

Are Lua scripts loaded into the memory before execution?

I stumbled across a problem where I am able to save my code onto the flash memory of an ESP8266 successfully, but as soon as it starts I get a "not enough memory" error. The code itself doesn't create a lot of objects. It appears to me as if the…
Forivin
  • 14,780
  • 27
  • 106
  • 199
2
votes
1 answer

NodeMCU - ESPlorer unable to use custom builds ESP8266

I have ESP-01, ESP8266, 8Mb I'm able to flash the nodemcu_float_0.9.5 ok, and then use ESPlorer on baud 9600. Responds ok, I'm able to connect and load innit files. I tried to use the custom nodemcu firmware builder with the latest flasher tool,…
2
votes
2 answers

How to use HTTPS post request in NodeMCU HTTP module

I am using following code with HTTP module of the NodeMCU firmware. As per the documentation both HTTP and HTTPS URLs should work. https://nodemcu.readthedocs.io/en/master/en/modules/http/#httppost Though I am getting error when I use 'https'.…
MarsTelnet
  • 471
  • 7
  • 18
2
votes
2 answers

Micropython HC-SR04 - ESP8266

I am trying to get the NodeMCU ESP8266 dev board to work with an HC SR04 Ultrasonic Sensor. I keep getting a reading of "0", which is not the reality. I have the ground and 5v pins of the sensor hooked up to a 5v source, and the Echo and Trigger…
LukeVenter
  • 439
  • 6
  • 20
2
votes
1 answer

Create an Apple Homekit accessory with NodeMCU (ESP8266)

My goal is to create a simple LED controlled by my iPhone through Homekit. I'd like to do it using only a NodeMCU (ESP8266). I found lots of solutions using a NodeJS library (HAP-NodeJS), which works well on my PC, but obviously can't run on a…
RikyTres
  • 676
  • 9
  • 31