Hot answers tagged

28 votes
Accepted

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

the ESP8266 has a builtin led that is attached to D4 as labeled on LoLin boards which maps to GPIO2. One thing to Note is that the led is active low. In other words ... setting PIN 2 to '0' will turn ...
user avatar
  • 396
25 votes
Accepted

NodeMCU - Vin pin as 5V output?

There is confusion about what is and what isn't possible with this board. This is because there are different versions with different power arrangements. NodeMCU 0.9 In this board the USB's 5V and the ...
user avatar
  • 101k
21 votes
Accepted

Difference between these two NodeMCU boards?

The top one is a real NodeMCU version 1 board (ESP-12E module). The bottom one is a knock-off copy - looks like the same module on it. The biggest difference is the USB interface. The real one uses ...
user avatar
  • 101k
15 votes
Accepted

NodeMCU - use flash button as input in loop()

The Flash button on NodeMCU is connected between io 0 and ground. You can use it as a button. Set pinMode(0, INPUT_PULLUP) and you will read io 0 LOW if the button is pressed. NodeMCU schema To ...
user avatar
  • 16k
14 votes

ESP8266, Arduino IDE vs Lua?

Lua, like many scripting languages, tends to make you a lot more productive as a programmer: things become far easier as you work at a higher abstraction level and do not worry about trivial things ...
user avatar
  • 35.5k
13 votes
Accepted

ESP8266, Arduino IDE vs Lua?

Using the Arduino IDE is custom firmware. That's what you're writing. You don't need any new firmware because the new firmware is what you are writing. I can't think of any downsides to using C++ to ...
user avatar
  • 101k
10 votes
Accepted

NodeMCU does not boot up when GPIO pin is high

Certain pins of the ESP8266 perform special functions at bootup. GPIO15, when HIGH, makes the ESP8266 boot from an SD card. You can read more about the special functions of the pins here. The ...
user avatar
  • 101k
9 votes

How to determine Flash size?

Arduino's ESP8266 support includes an example sketch called CheckFlashConfig. This probes the board, and prints the flash memory size.
user avatar
  • 231
8 votes
Accepted

In ESP-12E NodeMCU, what's the pin number of A0?

The numeric value of A0 is 17, as defined here. But unlike on an Arduino board, you can't use it as a digital pin. It only work for pin numbers 0-16. If you are using as a parameter for analogRead, ...
user avatar
  • 1,645
8 votes
Accepted

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

I have several of these modules. They have an optional opto-isolator built-in, but you have to remove the jumper to use it. Connect your GPIO trigger as you have it Run the relay's Vcc and Gnd pins ...
user avatar
  • 1,016
7 votes

How to determine Flash size?

The easiest way (windows at least) is to use Espressif's flash download tool - don't select anything to flash to the device, select the appropriate com port, click start, and the details of the device ...
user avatar
7 votes

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

I have nodeMCU v3 and Pin 2 worked for me. #define LED_BUILTIN 2 void setup() { pinMode(LED_BUILTIN, OUTPUT); // Initialize the LED_BUILTIN pin as an output } // the loop function runs over ...
user avatar
  • 171
7 votes
Accepted

NodeMCU and expected ';' before wrong ' " '

In C you can not use quotation marks inside quotation marks (thus nested). Replace message2 += " <meta name="viewport" content="width=device-width, initial-scale=1">"; to message2 += " <...
user avatar
7 votes
Accepted

INPUT_PULLUP not work for D8 in my NodeMCU v3

Pin D8 is esp8266 pin 15. This pin is one of the boot configuration pins and for use on a dev board, it must be pulled down at boot. So the NodeMcu has a pull down circuit on this pin and internal ...
user avatar
  • 16k
7 votes
Accepted

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

Port forwarding is required to allow a device outside your router to access a device inside a router that performs NAT (Network Address Translation). When a NodeMCU is acting as a simple server to ...
user avatar
  • 6,922
7 votes
Accepted

What is difference between NodeMCU and esp8266?

From https://forum.arduino.cc/index.php?topic=616324.0: NodeMcu is the name of the firmware originally for the ESP8266 microcontroller, with support for the ESP32 microcontroller added more ...
user avatar
7 votes

What is difference between NodeMCU and esp8266?

ESP8266 is a microcontroller with WiFi capability. it requires external flash memory and some antenna to work. There are different modules and development boards with this system. Some development ...
user avatar
  • 16k
6 votes

NodeMCU - Vin pin as 5V output?

my 2 cents: A LoLin NodeMCU V3 when powered via USB in the Vin pin reads 2.2 V (don't know why) but... in the VV pin you can get the 5V coming from the USB; so if you need 5V use that pin. The board ...
user avatar
6 votes

Multiple libraries were found for "WiFiClient.h" using nodemcu

Simply Switch #include <ESP8266HTTPClient.h> #include <ESP8266WiFi.h> to #include <ESP8266WiFi.h> #include <ESP8266HTTPClient.h>
user avatar
  • 161
6 votes

Vin & VU pins of NodeMCU V3

On the NodeMCU “v3” (and only on the v3) there’s a pin called VU (Vusb) that is connected to the +5V on the USB bus of the NodeMCU socket. This pin can be used to feed external components when it’s ...
user avatar
  • 1,370
6 votes
Accepted

Why is this extremely simple code not working?

The problem is: for (int x = 0; x > 10; x++) { That can be rewritten, in pseudo code, as: X is zero While X is greater than 10: Increment X You see the problem? X is zero. It's not greater than ...
user avatar
  • 101k
5 votes
Accepted

ESP8266 NodeMCU first WS2812 LED lights up green

So here comes my solution: I was playing around with NeoPixelBus by Makuna and the examples. I noticed in one of his examples, it said: // You can also use one of these for Esp8266, // each having ...
user avatar
5 votes

EEPROM put and get not working on ESP8266 (NodeMCU)

The ESP8266 doesn't have any EEPROM. Instead it emulates it using Flash. In order not to wear out your flash you have to "commit" changes to the flash once they have been queued for writing - ...
user avatar
  • 101k
5 votes
Accepted

NodeMCU power consumption measurement and DeepSleep

An ammeter is basically a small resistor in series over which the voltage drop is measured. That resistance will play a part in the effective output impedance of your power source (battery). This ...
user avatar
  • 101k
5 votes

ESP8266 not connecting to WiFi

Maybe you have a space in your WIFI SSID so you should check this in your router. Also maybe your WIFI is on 5Ghz and the ESP can't see it because it is only for 2.4 Ghz. Also if your WIFI AP is on a ...
user avatar
  • 668
5 votes
Accepted

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

This error is caused by using a 6.x.x version of the ArduinoJson library with code that was written for a pre-6.x.x version of the library. You have two options to solve the problem: A. Downgrade ...
user avatar
  • 3,834
5 votes

NodeMCU - use flash button as input in loop()

I recommend you EasyButton library, you can use pin 0 (D3) in NodeMCU, if you want use a external button module, you can wire your button between D3 pin and GND. https://github.com/evert-arias/...
user avatar
5 votes
Accepted

How to / is it possible to change Vendor Name in ESP8266-12E?

No. The Vendor Name is associated with the OUI. The OUI is the first three parts of the MAC address. The OUI's are all registered with IEEE here and Espressif's entries are: 18-FE-34 (hex) ...
user avatar
  • 101k
5 votes
Accepted

FastLED: Can't address led individually

The description in the link of where you bought the strip says: Description: LED Type: 5050SMD with External IC WS2811 (1 IC control 3leds) So, this is probably as intended. Note the ...
user avatar
  • 6,922
5 votes
Accepted

Arduino slave with 2 masters sharing the same I2C Bus?

The situation you describe is called MultiMaster. It is normally done in hardware using the I2C peripheral in the MCU. However the ESP8266 doesn't have one (or if it does, it's not used), and uses bit-...
user avatar
  • 101k

Only top scored, non community-wiki answers of a minimum length are eligible