ESP8266 NodeMCU simulator, with the WiFi simulated and said to be
Mokxi models the NodeMCU V1.0: an ESP-12E with its Xtensa LX106 at 80 MHz, the GPIO block, IO_MUX, the RTC pin that is D0, UART0 and the TOUT converter. The radio is not modeled (WiFi here is simulated, the Arduino API over a network of ours), and neither is a PWM peripheral, because the chip has none.
- 9peripheral areas modeled
- 5projects ready to run
- Real timeon your own machine
What is modeled
Taken from the board's own contract document and put in plain words, with what is missing beside it.
Modeled
- Core
- Xtensa LX106 in the call0 ABI (sixteen registers, no window), one instruction per cycle at 80 MHz
- Memory
- 32 KB of instruction RAM at 0x4010_0000 and 80 KB of data RAM at 0x3FFE_8000, the two segments every ESP8266 linker script names
- GPIO and IO_MUX
- Sixteen ordinary pins at the real offsets, with the pull-up that is the only pull this part has
- GPIO 16
- D0 is the RTC’s pin, in none of the GPIO registers, with a pull-down instead of a pull-up and no interrupt at all
- UART0
- Paced at the configured baud rate, wired to the serial monitor
- The clock
- CCOUNT and CCOMPARE0, which are core registers rather than a peripheral address anyone had to guess, behind millis(), micros() and a delay() that parks the core
- analogRead
- Ten bits of the real voltage on A0, behind the board’s own 220k/100k divider, so the header’s full scale is 3.2 V where the chip’s is 1.0
- analogWrite
- Software PWM from a timer handler, eight pins at once, 0 to 1023, the same range the Arduino ESP8266 core uses
- WiFi, simulated
- WiFi.h, HTTPClient.h and WebServer.h over a network written in software: no radio, no 802.11, and real internet only when you sign in and switch it on
Not modeled
- A radio of any kind. No 802.11, no PHY, no channel, no WPA2. WiFi here is simulated (WiFi.h, HTTPClient.h and WebServer.h over a network written in software, which reaches the real internet only when you sign in and switch it on), and on this chip, whose whole reason to exist is the radio, that is said first rather than last.
- Flash and the cache that maps it, so no PROGMEM read from flash, no SPIFFS, no LittleFS and no OTA.
- FRC1 and FRC2, the two hardware timers. Deep sleep and the RTC. SPI, I2S and the hardware UART1.
- The ADC’s registers are this model’s own. Espressif has never published the ESP8266’s SAR interface (system_adc_read() lives inside the SDK blob), so rather than invent an address and let a reader assume it is the chip’s, the contract says plainly that analogRead is the one call here that would need changing for real hardware.
Open one and press Run
Each of these opens in the editor exactly as it is drawn here.
Every built-in project on the ESP8266 NodeMCU V1.0
Each has its own page with the circuit running, the code and a parts list.
Tutorials that use this board
Each one ends in a running circuit, on this same board.
Questions
Is it free?
Yes. Every board and every part is on the free plan, with no account needed.
Does it do WiFi?
Simulated WiFi, yes, and it is worth being blunt about which half is which. Your sketch uses the real Arduino calls (WiFi.begin, WiFi.status, HTTPClient, WebServer), and the board joins a network, fetches a page and serves one. Underneath there is no radio and no 802.11. Four made-up addresses under .mokxi answer inside this tab. Signed in, you can switch on Real internet in the Cloud panel, and HTTP and HTTPS requests to real hosts go out through Mokxi’s gateway.
Why is digitalWrite(2, HIGH) the wrong pin?
Because D0 to D8 are not GPIO numbers. D4 is GPIO 2, D2 is GPIO 4 and D3 is GPIO 0. The runtime defines D0 to D8, so you can write the name on the silkscreen and mean the pin you are looking at.
Why does my LED light when I write LOW?
Because both on-board LEDs are wired from 3V3 to the pin, so LOW lights them. That is the real board, and it is the mistake this one is best at provoking.
Why is analogWrite(pin, 255) dim?
Because the range here is 0 to 1023, which is what the Arduino ESP8266 core does, so 255 is a quarter. analogWriteRange(255) makes an Uno sketch behave.
Can I compile my own sketch for it?
Yes. Edit the sketch and press Run: it compiles in the tab with clang for Xtensa, and the build panel shows every step. Nothing is uploaded.
Will my firmware run on a real NodeMCU?
Everything but analogRead, which talks to registers this model invented because the chip’s are not public. Section 6 of the contract sorts every other address into as-real-as-this-part-gets and believed.
The other boards
Every one of these runs today, and every one is free.
Looking for the shorter introduction? See the ESP8266 simulator page.
A RISC-V chip at 160 MHz, on the real memory map.
The classic Arduino, with an ATmega328P running at 16 MHz.
The Uno’s chip on a small board that fits a breadboard.
The big Arduino, with 54 digital pins and four serial ports.
An Uno-shaped board whose chip does its own USB serial.
A second RISC-V board, with 31 pins and simulated WiFi.
The classic ESP32 at 240 MHz, with simulated WiFi.
The ESP32-S3 at 240 MHz, with USB serial and an RGB LED.
Try it on your own firmware
What you build here runs on the board on your desk, unchanged. Nothing to install and no account needed.