Questions tagged [nodemcu]

For questions about NodeMCU, an open source IoT platform which includes firmware for running on the ESP8266.

Filter by
Sorted by
Tagged with
13
votes
4answers
22k views

ESP8266, Arduino IDE vs Lua?

I'm planning to buy an ESP8266. Do I really need to learn Lua to play with it? I have seen some people using it with the standard Arduino IDE. Do you need a custom firmware to use the Arduino IDE ...
12
votes
3answers
50k views

NodeMCU - Vin pin as 5V output?

I know that Vin can be used to power the board but have also been reading that it can be used as a 5V output. Is it possible to assign Vin as an output as I would any other GPIO? If I want to power ...
8
votes
3answers
28k views

Does the Node MCU v3 (LoLin) not have a builtin led?

Trying a simple led blinking program I could not get the builtin led on a LoLin Node MCU v3 working. The LED_BUILTIN constant is set to pin 16 / GPIO16 / D0. Reading several articles and QA I think ...
6
votes
4answers
9k views

NodeMCU - use flash button as input in loop()

I couldn't find a proper answer on the net so I came here as a last resort. So I want to use the FLASH button as an input in the loop() method. Is there a way the check if it's pressed or not?
5
votes
1answer
9k views

Difference between these two NodeMCU boards?

I recently received a NodeMCU (identical to the one shown in the first picture below) and originally, I was unable to connect it to my computer which eventually turned out to be driver issues; however,...
4
votes
2answers
13k views

Simple GET request with ESP8266HTTPClient

I am trying to do a simple GET request. But I always get status code -1. Here is my complete code. #include <Arduino.h> #include <ESP8266WiFi.h> #include <ESP8266HTTPClient.h> ...
3
votes
1answer
423 views

Why Smart Plugs don't require setting port forwarding on router and how to accomplish this with NodeMCU (ESP8266)

I have a NodeMCU (ESP8266) board that I use to control some devices over the internet. To be able to access it I have to enable port forwarding on my router and set the port manually like in the image ...
3
votes
1answer
85 views

Correct way of having loop end when required?

I'm brand new to Arduinos. I'm currently trying to modify a script from here which at the moment, simply turns an LED on or off depending on which HTTP GET request it receives. However, I want to ...
3
votes
1answer
175 views

Flashing an ATtiny85 with a NodeMCU?

I recently purchased a Digispark for some of my smaller electronics projects. After it initially being a great little board, I soon found myself unable to flash the board in the same way I had done ...
3
votes
1answer
3k views

Turn off the second builtin Nodemcu 0.9 led

I'm making a low energy consumption device so I'd like to turn off all the led when I'm idle. Unfortunately the nodemcu turn on a blue led while I'm idle (during delay(ms)) Here is my code: #define ...
3
votes
1answer
3k views

Uni-directional communication between NodeMCU and Arduino spits out garbage

I am sending data from ESP8266 (NodeMCU) to Arduino using serial and 9600 baud rate on both sides. Since it is uni-directional and from NodeMCU to Arduino, I am not using a voltage regulator and I ...
2
votes
2answers
23k views

How to determine Flash size?

I need to determine the flash size of my ESP8266 on my NodeMCU module in order to flash the AT firmware onto the board. Apparently different boards come with differently-sized flash memories. Can ...
2
votes
3answers
14k views

ESP8266 NodeMCU first WS2812 LED lights up green

I'm trying to power some WS2812 LEDs from my ESP8266 ESP-12E NodeMCU board (circuit here). I'm simply trying to use the NeoPixel Strandtest which works perfectly on my Arduino UNO with the same LED ...
2
votes
3answers
13k views

How to change the default name of ESP8266-12E module

Is there any way to change the default name (ESP_xxxxx) that the module generates?
2
votes
2answers
562 views

Setting pinMode(pin,input/output) as per user requirement

I am working on arduino IDE and esp8266 nodemcu. As i am going through the IDE I saw that there is a structure of void loop() and void setup() and all examples in the internet included defining the ...
2
votes
3answers
341 views

I2C interference SENSOR(SCL+SDA) and MasterSlave comm

I am building a weather station with an Arduino slave (dedicated to a rain gauge - depicted below as a reed switch) and a NodeMCU master with some additional sensors. One such sensor, a BMP280 uses ...
2
votes
1answer
2k views

nodeMCU - Millis() - Simple Counter - How long is LED on?

PROGRESS, now I have this (WITH GREAT HELP): void setup() { Serial.begin(9600); // initialize digital pin 13 as an output. } uint32_t timer_start = 0; int timer_running = false; void loop() { // ...
2
votes
1answer
3k views

How to post JSON data from Arduino?

I want to post data that I'm getting from the sensor every 5 seconds to my application in JSON format. Initially, I'm getting data as int and converting into String. For example: if data=15, it is ...
2
votes
4answers
14k views

NodeMCU espcomm_sync failed

I have a NodeMCU ESP12E DevKit V2 from Geekcreit. I had it working some months ago, but now I cannot upload to it. I am using the arduino IDE and I've set the "Additional Boards Manager URLs" to: ...
2
votes
1answer
1k views

ESP8266 Nodemcu create custom PWM with 1.25us resolution

I am trying to control some SMD LEDs WS2812B with the ESP8266-Nodemcu. I am using Arduino environment for coding. Actually I am trying to accomplish a PWM that is precisely able to: Go High for ...
2
votes
1answer
9k views

powering Nodemcu using Vin

Forgive me for this really dumb question. I am an amateur in electronics, and im trying to wrap up my head around this question and im not able to do so. Need your help. Im trying to power up a ...
2
votes
1answer
310 views

Wifi with ESP8266 and Arduino sketches

I have a NodeMcu Lua ESP8266 ESP-12E which i want to use to control to a relais via Wifi network. The first step was to write an Arduino Sketch which scans networks and connects to the network. ...
2
votes
1answer
178 views

ADXL345 becomes 0g when plugin MicroSD Adapter using SPI

Try SD SPI code and ADXL345 SPI code separately and both are fine. When merge the codes, ADXL345 reading okay (not plug in MicroSD Adapter). Pin should bo okay. Every time MicroSD is plugged (the ...
2
votes
1answer
141 views

How to send UDP data packet between two access point?

I am new to arduino programming and nodeMcu boards.I have two ESP8266 bards as access points and one board get some data form WiFi stations and resend that data to other access point. but the problem ...
2
votes
0answers
120 views

Cannot POST to server. HTTP code -1. NodeMCU

I am trying to make a POST request with NodeMCU, but I get a HTTP status code -1. Code: #include <ESP8266HTTPClient.h> #include <ESP8266WiFi.h> #ifndef STASSID #define STASSID "Wifi" #...
2
votes
1answer
826 views

Use external power - nodemcu 0.9

I'd like to deploy my project so I'm looking for a way to power the nodemcu. I'd like to know if there's a way to power it with a 9V battery without any other external circuit. Until now I've found ...
2
votes
1answer
5k views

Can I use NodeMCU 12E (ESP8266) as wifi shield for arduino Nano?

Update: Point 1- I don't want to program ESP, I just want to use it as a wifi shiled. cause I'm not familiar with flashing or writing sketch for ESP, so still feel comfortable with arduino. beside my ...
2
votes
0answers
8k views

UART from Arduino to NodeMCU

I'm trying to connect an Arduino nano to a NodeMCU 1.0 via the hardware UART, in order to send information one way from the Arduino to the NodeMCU (and from there to the network). I'm connecting the ...
1
vote
5answers
53k views

How to make a 5-volt relay work with NodeMCU?

I have hooked up 2 channel 5-volt relays with NodeMCU v1.0 as shown in the fritzing below. Relay are powered with a different power source than NodeMCU. As of now, I am powering the NodeMCU from my ...
1
vote
1answer
3k views

NodeMCU does not boot up when GPIO pin is high

I have a NodeMCU board connected to a door and there is a micro switch that makes one GPIO pin (GPIO15 - D8 in this specific case) go high when the door opens. My problem is if I lose power while the ...
1
vote
1answer
2k views

INPUT_PULLUP not work for D8 in my NodeMCU v3

I changed my arduino NodeMCU application pin mode to use INPUT_PULLUP mode instead of INPUT. D8 input pin is not working as expected, I is always in LOW even the button is pressed or not. I have 3 ...
1
vote
3answers
15k views

Use 5V pH sensor with 3.3V NodeMCU

I'm trying to use a pH probe with NodeMCU, the problem is that NodeMCU is 3.3V and the pH analog sensor requires 5V, at first I thought using the VIN pin but didn't work, then I used the VU pin from ...
1
vote
2answers
16k views

NodeMCU power consumption measurement and DeepSleep

I'm working on a project using a nodeMCU using a ICR14500(3.7V and 700mAh) battery and I'm experienced some issues when I try to estimate the total current consumption. Firstly I experienced some ...
1
vote
1answer
5k views

NodeMCU (Arduino IDE) 'DynamicJsonBuffer' was not declared in this scope

#include <Arduino.h> #include <ESP8266WiFi.h> #include <ESP8266WiFiMulti.h> #include <ArduinoJson.h> #include <ESP8266HTTPClient.h> #define USE_SERIAL Serial ...
1
vote
4answers
12k views

EEPROM put and get not working on ESP8266 (NodeMCU)

The Arduino documentation provides two examples to store data in the EEPROM. https://www.arduino.cc/en/Reference/EEPROMPut stores data in the EEPROM and the EEPROMGet example reads the data back and ...
1
vote
2answers
3k views

Finding ESP8266 in a network

I am connecting an ESP8266 to my home network (WiFi). After successful connection, an IP is assigned to it. I am sending commands to the ESP8266 from an Android app. What can I do to find the ESP8266 ...
1
vote
2answers
2k views

Multiple libraries were found for “WiFiClient.h” using nodemcu

I am trying to send HTTP requests from nodemcu so I started by uploading the esp8266 library but when I run the following code #include <ESP8266HTTPClient.h> #include <ESP8266WiFi.h> ...
1
vote
2answers
828 views

What is the voltage between Vin & GND?

I have NodeMCU ESP8266N Lolin V3, my 5V relay is powered from Vin of the NodeMCU. The NodeMCU is powered from 5V USB. My difficulty is when I measure voltage between Vin & GND, it is of 1.9V, but ...
1
vote
2answers
555 views

How can I update a sketch to a NodeMCU “over the air” with the Arduino IDE?

I’m trying to use a sketch from this repository which uses MQTT to send a notification to Home-Assistant that acts a “presence sensor”. When the NodeMCU comes into range of the specified SSID, the ...
1
vote
1answer
881 views

Read both battery voltage and analog sensor value with NodeMCU ESP8266

I have a soil sensor that reports value once every 5 minutes, deepsleep in between. Is there a way to also report battery voltage (with ESP.getVcc())? To get the battery voltage reading to work I ...
1
vote
1answer
1k views

Connecting LCD TFT shield to NodeMCU

I have the following screen: I want to connect it to a NodeMCU device: I read somewhere that it is not possible. However, I am not interested in the touch ability nor the SD card. I just want to ...
1
vote
1answer
2k views

Wemos: relay shield doesn't work on top of the stack

I connected a SHT30 shield to a Wemos D1 mini (one on top of the other) to measure temperatures. Wemos D1 mini (2.3.0): SHT30 shield: It works great but when I added a relay on the top of the ...
1
vote
2answers
10k views

ESP8266 not connecting to WiFi

I am trying to send the temperatures from an DS18B20 to ThingSpeak, using an ESP8266. You can see the code I am using for that. When I run the code I do not get any errors. In serial monitor it just ...
1
vote
3answers
880 views

Wemos: 16x2 display doesn't show anything

I connected a 16x2 LCD display to a Arduino Uno. Then I tested a "Hello, Word" code and it works perfect. Now I want to do the same with a Wemos D1 Mini but it doesn't work. Here the Wemos is not ...
1
vote
1answer
4k views

NodeMCU serial port - use with computer and device at the same time

I'm trying to understand how serial communication for ESP8266 in NodeMCU actually works. I found a quote saying that normal Serial is mapped to ports GPIO 1 (TX) and GPIO 3 (RX). They are even labeled ...
1
vote
1answer
3k views

NodeMCU : Input pullup in A0 [closed]

I am trying to port a simple project I have working in an Arduino UNO to a NodeMCU but I am stuck as I am using the analog gpio to receive the input from some buttons, I am always getting always low ...
1
vote
1answer
39 views

Programming ESP32 MCUs for production

Before committing to learning about the ESP32 and how to program it, I would like to know if the ESP can be programme the same way for production as it can on évaluation boards (with the Arduino IDE). ...
1
vote
1answer
174 views

Arduino IDE doesn't pick up serial ports

I am fairly new to Arduinos and I recently bought a nodeMCU Amica esp2866 for this tutorial. I have my board connected to my MacBook Air (10.14.5 with Mojave) and only the "/dev/cu.Bluetooth-Incoming-...
1
vote
1answer
58 views

NodeMCU (ESP8266) board controlled over shared hosting database

I have a NodeMCU (ESP8266) board that I want to control over the internet. I am trying to find a solution where I don't have to set up any configurations on my router like port forwarding. I came up ...
1
vote
1answer
105 views

Water tank false trigger

I am trying to make a simple water overflow protection system for my home. I have created it using BC547 and NodeMCU (ESP8266). I have a simple circuit like this: The problem here is I have 2 wires ...