Hello friends, I hope you all are doing great. Today, I am going to share the ESP-12F Library for Proteus. The ESP-12F is the successor of the famous ESP-12E: the same ESP8266 module with the same 22 pins and the same AT firmware, but with a reworked PCB antenna for a better signal. With this library you can place it in Proteus, wire it to an Arduino, send it AT commands and watch it join the Wi-Fi, switch its own blue LED and run a TCP server that several clients use at the same time - all inside the simulation.

Updates

ESP-12F Library for Proteus

Latest version: V1.0 (October 2026, this tutorial)

Other ESP8266 modules: ESP-01 · ESP-01S · ESP-07 · ESP-07S · ESP-12E · ESP-01 Adapter · WiFi Shield · NodeMCU · NodeMCU V2 · D1 Mini

ESP32 boards and modules: ESP32 DevKit V1 · ESP32-DevKitC V4 · ESP32-S3 DevKitC-1 · ESP32-C3 SuperMini · TTGO T-Display · ESP32-WROOM-32 · AirLift WiFi Shield · AirLift ESP32 Breakout

Helping Tools

This is the twelfth library of our Wi-Fi series, and its demo is a small Wi-Fi chat hub. Our Laptop WiFi Monitor and Mobile WiFi Monitor both connect to the ESP-12F at once; every line one of them types reaches the other, the Arduino's serial monitor joins in, and commands switch the LED and read a pot. Our ESP-07S demo answered one TCP request at a time and our ESP-12E demo broadcast UDP datagrams; this one keeps several TCP connections open together and passes messages between them, the way chat servers, multiplayer games and remote consoles work.

NOTICE: real ESP-12F modules differ between makers: the antenna trace, the shield marking and the flash size vary, the red power LED of our part is a TEP addition, and the +2 dB of the reworked antenna is our model's value, not a measurement. Check your module before you wire it. Your feedback is the fuel that keeps us going, so please tell us what you think in the comments below or in the ESP-12F board of our forum. And if our free libraries help you, you can buy us a coffee. So, let's get started with the ESP-12F Library for Proteus:

Figure: The ESP-12F Library for Proteus: the ESP-12F (U1) with its EN pull-up and GPIO15 pull-down next to our Arduino UNO V4.0, its blue LED on; the UNO's monitor, the laptop and the phone show the same chat.

What is the ESP-12F?

The ESP-12F is one of the Ai-Thinker modules built around the ESP8266 Wi-Fi chip. A metal shield covers the chip, its flash and the crystal, and the antenna is a copper trace on the board itself. It ships with the AT firmware, so an Arduino uses it through a serial port with commands such as AT+CWJAP and AT+CIPSEND. It replaced the ESP-12E in most shops and on many NodeMCU boards: the board, the pins and the firmware stay the same, the antenna layout was reworked.

The real ESP-12F and the ESP-12F in Proteus
Real ESP-12FThis library in Proteus
ChipESP8266 under a metal shield, AT firmwareour AT firmware 1.7.4 model
Antennaa reworked PCB antennaa serpentine trace, +2 dB in the model, glowing while it sends and receives
Pins22: 8 on each side, 6 flash pins on the bottom edge, 2 mm pitchthe same 22, on the 0.1 inch grid of Proteus
Boot pinsEN and RST pulled up, GPIO15 pulled down, GPIO0 high for normal bootchecked at every boot, shown on the panel
LEDa blue LED on GPIO2 (lit when LOW)the blue LED on GPIO2, plus a red PWR LED (TEP addition)
GPIOGPIO0, 2, 4, 5, 12, 13, 14, 15, 16GPIO2, 4, 5, 12, 13, 14, 16 driven with AT+SYSGPIO
Supply3.3 V, about 300 mA peaksVCC on 3.3 V

ESP-12E or ESP-12F?

Last time we shared the ESP-12E Library for Proteus. The two modules have the same size, the same 22 pins in the same places and the same AT firmware, so a circuit and a sketch made for one work with the other. The difference is the antenna: the ESP-12F's trace was redesigned for a better signal. In Proteus our two parts show it the same way - a different trace on the board and, in the model, 2 dB more signal for the ESP-12F: about -43 dBm where the ESP-12E reads about -45 dBm.

The ESP-12E and the ESP-12F side by side
ESP-12EESP-12F
AntennaPCB antenna (zig-zag trace in our part)reworked PCB antenna (serpentine trace in our part, +2 dB)
Pins22 (16 side + 6 flash)the same 22
FirmwareATAT
Blue LEDGPIO2GPIO2
Our Proteus deviceESP-12E WIFI MODULE (TEPESP12E.LIB)ESP-12F WIFI MODULE (TEPESP12F.LIB)

The Boot Pins and the Flash Pins

A bare ESP-12F needs a few resistors. EN (also called CH_PD) must be pulled up, or the chip stays off. RST resets it when it goes low. GPIO15 must be low when the chip starts - pulled down with a resistor - or the ESP8266 tries to boot from an SD card and the AT firmware never runs. GPIO0 low at boot selects the flash mode. Our model checks all four at every boot and the panel shows them. The six pads on the bottom edge - CS0, MISO, GPIO9, GPIO10, MOSI and SCLK - are the lines of the module's own flash: leave them unconnected.

The Blue LED on GPIO2

The ESP-12F has one LED of its own: a small blue one on GPIO2, lit when the pin is low. With the AT firmware your Arduino uses it as a status light: AT+SYSGPIODIR=2,1 makes GPIO2 an output, AT+SYSGPIOWRITE=2,0 lights the LED and AT+SYSGPIOWRITE=2,1 puts it out. In the demo any chat member can switch it with /led on.

Features of the ESP-12F Library for Proteus

  • The ESP-12F as it looks: the black board with its reworked antenna, the metal shield, the LEDs and all 22 gold pads, including the six flash pins on the bottom edge.
  • A live antenna: the trace turns orange while the module sends and green while it receives.
  • Real boot pins: EN low switches the module off, RST low resets it, GPIO15 must be low at boot and GPIO0 low selects the flash mode - the panel shows the state of each.
  • The blue LED on GPIO2, as on the real module, and six more GPIO pins (GPIO4, 5, 12, 13, 14 and 16) for AT+SYSGPIO.
  • The AT firmware 1.7.4 of our ESP-01 Library for Proteus: Wi-Fi join and scan, TCP and UDP, a server with up to five links at once, CIPSTATUS with the address of every link, CIPSEND, UART_CUR, SNTP, PING and more.
  • Wi-Fi in Proteus: a virtual router with DHCP and two neighbours for scans, a phone in the panel that opens your web page, an internet host, and TCP / UDP to every TEP Wi-Fi part in the design.
  • Our Laptop and Mobile WiFi Monitors: a laptop and a phone on the same network, with a browser, TCP and UDP terminals and ping - included in the package.
  • Our pop-up panel: the phone, the module card with the antenna and the boot pins, a Test page with four measuring tools, Settings and Help.
  • A compact package: about 2.54 MB, without the C++ source code of the models.

The ESP-12F Part in Proteus

Figure: The part as the library draws it: the serpentine antenna at the top, the PWR and IO2 LEDs, the metal shield, the PANEL pad, the 16 side pins and the six flash pins on the bottom edge.

Search ESP-12F in Pick Devices; the device ESP-12F WIFI MODULE is in TEPESP12F.LIB. The pins sit where they are on the real module: RST, ADC, EN, IO16, IO14, IO12, IO13, VCC on the left, TXD, RXD, IO5, IO4, IO0, IO2, IO15, GND on the right, and CS0, MISO, IO9, IO10, MOSI, SCLK along the bottom. Its pins sit on the 0.1 inch grid of Proteus while the real module uses a 2 mm pitch, so the part is drawn a little bigger than the real one; next to our UNO it is still small. Click the PANEL pad or the shield to open the panel.

Figure: The ESP-12F placed in a design, before Run: both LEDs off, the antenna trace quiet.

Every State of the ESP-12F

We ran the demo and paused the simulation for each picture. At Run the ESP-12F powers up and prints its boot text; the blue LED flashes during the boot:

Figure: Booting: the red PWR LED on with the 3.3 V supply, the blue LED on GPIO2 lit while the chip starts.
Figure: Joining: the UNO sent AT+CWJAP and the module talks to the router - the antenna trace glows orange.
Figure: On Wi-Fi: the antenna back to normal, the hub listening on port 23, only the PWR LED lit.

While data flows, the antenna shows the direction:

Figure: Receiving: the trace green - a request arriving.
Figure: Sending: orange - the answer going out.
Figure: OUT OF RANGE: the router is gone, so the antenna stays quiet and the module has no IP address (the blue LED is still on from an earlier ON).

Download ESP-12F Library for Proteus

Click the button below to download ESP-12F-Library-for-Proteus-v1.0.zip (about 2.54 MB, without the C++ source code of the models):

ESP-12F Library for Proteus V1.0
  • README.txt: the device, installation, the demo, the pins, the properties, troubleshooting and the limits.
  • Proteus Library Files: TEPESP12F.LIB (the ESP-12F), ArduinoV4TEP.LIB (our Arduino boards V4.0 - the UNO of the demo), TEPLAPTOP.LIB and TEPMOBILE.LIB (our Laptop and Mobile WiFi Monitors).
  • Proteus Model Files: TEPNET.DLL (the ESP-12F, the two monitors and the Wi-Fi network) and TEPARDUINO.DLL (the Arduino boards).
  • Proteus Simulation: the demo project, its HEX file and copies of the DLLs.
  • Arduino Code: the demo sketch. AltSoftSerial is not included - install it from the Library Manager.

No Proteus yet? Read How to Download and Install Proteus 7 and 8. New to libraries? Follow How to Install a New Library in Proteus.

How to Install ESP-12F Library for Proteus

  1. Close Proteus and extract the whole zip file, for example to your Desktop.
  2. Copy the four files from Proteus Library Files into the LIBRARY folder of Proteus (usually C:\Program Files (x86)\Labcenter Electronics\Proteus 8 Professional\LIBRARY).
  3. Copy TEPNET.DLL and TEPARDUINO.DLL from Proteus Model Files into the MODELS folder - replace older copies (this TEPNET.DLL is the first one that knows the ESP-12F, and it still runs all our ESP32 boards, ESP-01, ESP-01S, WiFi Shield, ESP-01 adapter, ESP-07, ESP-07S, ESP-12E and the two monitors).
  4. Delete TEPESP12F.IDX, ArduinoV4TEP.IDX, TEPLAPTOP.IDX and TEPMOBILE.IDX from the LIBRARY folder if they are there.
  5. Start Proteus, press P and search for ESP-12F.

The sketch is a normal UNO sketch: select Arduino Uno in the Arduino IDE, install AltSoftSerial, write your sketch and use Sketch > Export Compiled Binary; then double-click the UNO in Proteus and set its Program File to the HEX (see How to get the HEX file from Arduino).

Demo: A Wi-Fi Chat Hub for the Laptop and the Phone

Open ESP-12F-Chat-Hub-with-Laptop-and-Mobile.pdsprj. On the left is our Arduino UNO Library for Proteus V4.0 (ARD1) with its built-in serial monitor and a pot on A0, in the middle the ESP-12F (U1) with its two resistors, and on the right the laptop (PC1) and the phone (MOB1) - no wires to them, they are on the TEP-WiFi network like the real ones.

Figure: The whole demo: the titles, ARD1 with RV1 on A0, U1 the ESP-12F with R1 and R2, PC1 the Laptop WiFi Monitor and MOB1 the Mobile WiFi Monitor.

The ESP-12F needs VCC on +3.3V and GND, R1 (10k) to pull EN up and R2 (10k) to pull GPIO15 down. Its TXD goes to the UNO's D8 and its RXD comes from D9 through the labels ESP_TXD and ESP_RXD. The LED is the blue one on the module, and RV1 (10k, at 35 %) on A0 gives a reading for the /pot command:

Figure: The circuit around the ESP-12F: R1 10k from EN to +3.3V, R2 10k from GPIO15 to GND, VCC on +3.3V; TXD and RXD go up to the labels ESP_TXD and ESP_RXD; the flash pins at the bottom are left open.

The two tools come from our Laptop WiFi Monitor Library for Proteus and Mobile WiFi Monitor Library for Proteus. In this project their terminals are set to the hub (192.168.1.101, port 23) and their browsers to http://192.168.1.101:23/. The laptop is 192.168.1.21 and the phone 192.168.1.41 on the network:

Figure: PC1 on the sheet: its screen shows the terminal connected to the hub, with the chat.
Figure: MOB1 on the sheet: its terminal with the chat.

One Server, Several Clients

The AT firmware's server can keep up to five links open at the same time, numbered 0 to 4. When a client connects, the firmware prints 0,CONNECT (with its link number); when it leaves, 0,CLOSED; and its data arrives as +IPD,0,<length>:. A hub only has to remember who is on which link, and to send each line to every link except the one it came from. Port 23 is the classic Telnet port, the usual home of text chat.

The firmware has only one server port, so the hub also answers browsers on port 23: a connection whose first line starts with GET is a browser and gets a small status page; any other connection that stays quiet for a second joins the chat.

The Sketch: The Chat Hub

The UNO talks to the module with AltSoftSerial on D8 / D9. The ESP-12F starts at 115200 bps, too fast for a software serial port to receive, so the sketch sends one AT+UART_CUR=9600 at that speed and then talks at 9600:

  espFast.begin(115200);               // the ESP-12F's factory speed
  espFast.print(F("AT+UART_CUR=9600,8,1,0,0\r\n"));
  espFast.end();
  esp.begin(9600);                     // AltSoftSerial takes D9 over
  delay(50);

After the join, three commands start the hub: several connections, the server on port 23, and no timeout, because a chat client may stay quiet for a long time:

  command("AT+CIPMUX=1");              // several connections - one per client
  command("AT+CIPSERVER=1,23");        // the hub
  command("AT+CIPSTO=0");              // a quiet client stays connected

The connection events are short lines. The reader turns them into two small bit masks - one bit per link - so the main loop can handle them even when they arrived in the middle of another command:

      const char* comma = strchr(line, ',');
      if (line[0] >= '0' && line[0] <= '4' && comma == line + 1) {
        if (!strcmp(comma + 1, "CONNECT")) { connected |= 1 << (line[0] - '0'); continue; }
        if (!strcmp(comma + 1, "CLOSED")) { closed |= 1 << (line[0] - '0'); continue; }
      }

Who is on a link? AT+CIPSTATUS lists every open link with its address, so the hub asks it when a client joins:

void onStatus(const char* s) {
  if (strncmp(s, "+CIPSTATUS:", 11)) return;
  const byte link = atoi(s + 11);
  const char* q1 = strchr(s, '"'); if (!q1) return;
  q1 = strchr(q1 + 1, '"'); if (!q1) return;             // after "TCP"
  q1 = strchr(q1 + 1, '"'); if (!q1) return;             // the opening quote of the address
  const char* q2 = strchr(q1 + 1, '"'); if (!q2 || link >= LINKS) return;
  byte n = q2 - q1 - 1; if (n > 15) n = 15;
  memcpy(cip[link], q1 + 1, n); cip[link][n] = '\0';
}

Then the new member gets a welcome, and the others a notice:

void join(byte link) {
  command("AT+CIPSTATUS", 2000, onStatus);
  state[link] = MEMBER;
  snprintf_P(page, sizeof(page), PSTR("Welcome to the ESP-12F chat hub, %s - %d online. Type /help\r\n"), cip[link], online());
  sendOn(link, page, false);
  snprintf_P(page, sizeof(page), PSTR("* %s joined (%d online)\r\n"), cip[link], online());
  toMembers(link);
  Serial.print(page + 2);
}

A chat line goes to every member except its sender, marked with the sender's address:

void toMembers(int skip) {
  for (byte i = 0; i < LINKS; ++i) if (state[i] == MEMBER && i != skip) sendOn(i, page, false);
}
void fromClient(byte link, const char* text) {
  if (text[0] != '/') {
    snprintf_P(page, sizeof(page), PSTR("[%s] %s\r\n"), cip[link], text);
    toMembers(link);
    ++relayed;
    Serial.print(cip[link]);
    Serial.print(F(": "));
    Serial.println(text);
    return;
  }

Lines that start with / are commands. /led on and /led off switch the blue LED and tell everyone who did it; /who, /pot and /help are answered to the sender only:

  if (!strcasecmp(text, "/led on") || !strcasecmp(text, "/led off")) {
    setLed(!strcasecmp(text, "/led on"));
    snprintf_P(page, sizeof(page), PSTR("* %s switched the blue LED %s\r\n"), cip[link], led ? "ON" : "OFF");
    toMembers(-1);
    return;
  }

Two clients can type at the same moment, and the hub may be busy sending. So every complete line goes into a small queue first, and the main loop takes them out one by one:

      if (ipdLeft == 0 && queuedCount < QUEUE) {                 // the data is complete: into the queue
        request[requestLength] = '\0';
        strcpy(queued[queuedCount], request); queuedLink[queuedCount] = newLink; ++queuedCount;
      }

Finally the browser check: the first line of a new connection decides whether it is a page request or a chat client:

    if (link < LINKS && !strncmp(text, "GET ", 4) && state[link] != MEMBER) {   // a browser: the path is the text after "GET "
      char path[32] = "/";
      strncpy(path, text + 4, sizeof(path) - 1); path[sizeof(path) - 1] = '\0';
      char* e = strchr(path, ' '); if (e) *e = '\0';
      state[link] = FREE;
      Serial.print(F("Page: "));
      Serial.println(text);
      readRssi();
      sendPage(link, path);

Press Run and watch the UNO's monitor. The module is found, joins TEP-WiFi, reports the signal of its antenna and opens the hub:

Figure: The UNO's monitor at 9600 baud: the ESP-12F found and switched to 9600 bps, joined to TEP-WiFi with RSSI -43 dBm, the chat hub ready on 192.168.1.101 port 23.
UNO + ESP-12F: a Wi-Fi chat hub for the Laptop and Mobile WiFi Monitors
www.TheEngineeringProjects.com
ESP-12F found, now at 9600 bps
Joining TEP-WiFi... connected
Signal: RSSI -43 dBm (PCB antenna)
Chat hub ready: telnet 192.168.1.101 23 (up to 4 clients)
Monitor: a line goes to every client; /who, /led on, /led off, /pot, /status, /help, AT...

Joining the Chat from the Laptop and the Phone

On the laptop, open Terminal and choose TCP Client: the host 192.168.1.101 and port 23 are already filled in. Click Connect; a second later the hub greets the laptop:

Figure: TCP Client: host 192.168.1.101, port 23, Connect.
Figure: Connected to the ESP-12F on port 23: the welcome - 1 online.

Now the phone: its Terminal app, TCP, the same address and port, Connect. The phone gets its own welcome, and the laptop is told that the phone joined:

Figure: The phone's terminal: TCP, 192.168.1.101, port 23, Connect.
Figure: The phone connected: its welcome - 2 online.

Type a line on the laptop and it appears on the phone with the laptop's address; the phone answers, the laptop sends /who, the phone sends /led on - the blue LED on the module lights and both are told - and the laptop asks /pot. Finally a line typed in the UNO's monitor reaches both as [UNO]:

Figure: The laptop's side of the chat: its own lines in blue, the phone's lines, the answers to /who and /pot, the LED notice and the UNO's line.
Welcome to the ESP-12F chat hub, 192.168.1.21 - 1 online. Type /help
Hello from the laptop
* 192.168.1.41 joined (2 online)
[192.168.1.41] Hi laptop, the phone here
/who
Online (2): 192.168.1.21, 192.168.1.41
* 192.168.1.41 switched the blue LED ON
/pot
Pot (A0): 358 (1.75 V)
[UNO] Hello from the UNO
Figure: The phone's side: the laptop's line, its own line, /led on and the notice, the UNO's line.
Welcome to the ESP-12F chat hub, 192.168.1.41 - 2 online. Type /help
[192.168.1.21] Hello from the laptop
Hi laptop, the phone here
/led on
* 192.168.1.41 switched the blue LED ON
[UNO] Hello from the UNO
Figure: The blue LED on GPIO2 lit - the LED that /led on switches (this picture: switched on with the ON link of the hub page).

The UNO's monitor sees everything: who joined, each chat line with its sender, and each command:

Figure: ARD1's monitor: the joins, the chat lines, the commands and the UNO's own line.
192.168.1.21 joined (1 online)
192.168.1.41 joined (2 online)
192.168.1.21: Hello from the laptop
192.168.1.41: Hi laptop, the phone here
192.168.1.21 sent /who
192.168.1.41 sent /led on
192.168.1.21 sent /pot
Hello from the UNO
UNO: Hello from the UNO
Figure: /help from the laptop: the list of commands.

The Status Page on the Same Port

In the laptop's Browser the address bar already holds the home page http://192.168.1.101:23/ - click Go. The hub sees a GET and answers with its status page instead of a welcome:

Figure: http://192.168.1.101:23/ on the laptop: who is online, the blue LED, the pot, ON / OFF / READ and the counters.

Its OFF link switches the LED off - the same LED the chat switched on:

Figure: After OFF: /off, Blue LED (GPIO2) is OFF.
Figure: View source: the HTTP header and the HTML the UNO sent from port 23.
Figure: The same page on the phone, with buttons for a finger.

The laptop's Network tab can still ping the module while it serves the chat:

Figure: The Network tab: the devices on TEP-WiFi and the ping to 192.168.1.101 - 9 to 15 ms.
Pinging 192.168.1.101:
Reply from 192.168.1.101: bytes=32 time=14ms TTL=255
Reply from 192.168.1.101: bytes=32 time=9ms TTL=255
Reply from 192.168.1.101: bytes=32 time=9ms TTL=255
Reply from 192.168.1.101: bytes=32 time=15ms TTL=255

Leaving the Chat

Click Disconnect on the phone. The firmware reports the phone's link as CLOSED, the hub frees it and tells the others:

Figure: The phone after Disconnect.
Figure: The laptop is told: * 192.168.1.41 left (1 online).
Figure: The phone's Devices app: the laptop, this phone, the ESP-12F U1 at 192.168.1.101 and the panel's phone.
Figure: ARD1's monitor later: the pages served and the phone leaving.

And the whole demo running, with the blue LED on:

Figure: The demo running: ARD1 with RV1, U1 with its blue LED lit, PC1 and MOB1 with the chat.

The ESP-12F Panel

The panel opens at Run, in the look of our TEP Serial Monitor Advance for Proteus. Its Wi-Fi page has a small phone of its own and three cards: the ESP-12F card with the firmware, the mode, the UART speed, the antenna and the boot pins, the WI-FI card and the TRAFFIC card:

Figure: After the set-up: AT 1.7.4.0, 9600 bps (UART_CUR), CIPMUX 1 with the server on port 23; Antenna PCB antenna, reworked (+2 dB); Boot pins EN high, GPIO15 low, GPIO0 high.

In this project the ESP-12F's PAGEPORT property is 23, so OPEN ESP PAGE asks the hub for its page on port 23:

Figure: The panel's phone with the hub page: nobody online yet, the blue LED and the pot.
Figure: After ON: Blue LED (GPIO2) is ON.

The UNO's monitor is part of the chat and a small tool at once: a plain line goes to every client, /who, /led on, /pot and /status work locally, and any line starting with AT goes to the module as it is - here AT+CWLAP shows the raw scan:

Figure: /pot, /who, AT+CWLAP passed to the module, and /status.
/pot
Pot (A0): 358 (1.75 V)
/who
Online (0): nobody
AT+CWLAP
> AT+CWLAP
  < +CWLAP:(3,"TEP-WiFi",-44,"c8:3a:35:a4:26:89",6,-12,0)
  < +CWLAP:(3,"Neighbour_WiFi",-77,"c8:3a:35:d8:03:3c",1,-12,0)
  < +CWLAP:(0,"Guest_Network",-86,"c8:3a:35:1a:40:10",11,-12,0)
  < OK
/status
LED ON, pot 358 (1.75 V), RSSI -45 dBm; 0 online, 0 relayed, 2 pages; up 11 s

WEAK moves the router far away; the reworked antenna still holds the link:

Figure: WEAK: the signal in orange, still connected.
Figure: /status again with the weak signal.

OUT OF RANGE takes the router away; the module loses its IP address until GOOD brings it back and the module joins again:

Figure: OUT OF RANGE: the card on the phone turns red, No IP, the WI-FI card says out of range.

The Test page has four tools that measure the running model: the Wi-Fi join test, the web request test, the cloud upload check and the AT check. Then Settings and Help:

Figure: The Test page: Wi-Fi join, Web request, Cloud upload and AT check.
Figure: Settings: TEP Dark or Light, the text size, open the panel at Run, the window size.
Figure: Help: report a bug, suggest a feature, the article, the user guide, updates, donate, the website, the forum; Copy diagnostics.

One more thing the sketch does: every 30 seconds it checks that the module still answers at 9600. A reset puts the ESP-12F back to 115200 bps without its server, so the sketch finds it again and repeats the set-up:

  if (millis() - lastCheck > CHECK_EVERY) {
    if (!command("AT", 1000) && !command("AT", 1000)) {
      Serial.println(F("The ESP-12F restarted - setting it up again"));
      if (startEsp()) setupModule();
    }
    lastCheck = millis();
  }

Pins of the ESP-12F

The pins of the ESP-12F: left side, right side, then the bottom edge
PinWhat it is
RSTreset, low = in reset (pull it up on a real module)
ADCthe ESP8266's analog input (0 to 1 V) - not read by the AT firmware model
ENCH_PD, the enable pin: high = on, low = off - pull it up with 10k
IO16, IO14, IO12, IO13GPIO pins for AT+SYSGPIO
VCC3.3 V supply - not 5 V
TXDthe module's UART TX, to the Arduino's RX
RXDthe module's UART RX, from the Arduino's TX (3.3 V logic)
IO5, IO4GPIO pins for AT+SYSGPIO
IO0GPIO0: low at boot = flash mode
IO2GPIO2, the blue LED (lit when low); high at boot
IO15GPIO15: must be low at boot - pull it down with 10k
GNDground
CS0, MISO, IO9, IO10, MOSI, SCLKthe module's own flash (bottom edge) - leave them unconnected

Properties of the ESP-12F

Double-click the ESP-12F to change them; every run starts again from the properties
PropertyWhat it does
WIFISSID / WIFIPASSthe router in range (TEP-WiFi / 12345678)
BAUDthe ESP-12F's factory UART speed (115200)
PANELthe phone's tab at start (BROWSER, CLOUD, WIFI)
PAGEPORTthe port OPEN ESP PAGE opens (80; the demo: 23)
CLOCKthe clock for SNTP: PC or a fixed start time

The IP address follows the part's number: U1 gets 192.168.1.101, U2 .102 and so on, so give every Wi-Fi part its own number. The laptop is always 192.168.1.21 and the phone 192.168.1.41.

Troubleshooting

  • "No answer from the ESP-12F": TXD must reach D8 and RXD D9 (AltSoftSerial's fixed pins), VCC 3.3 V and GND the supply - the panel says NO POWER without it, and "EN low - disabled" when EN is low.
  • The panel says "SDIO boot (GPIO15 not low)": GPIO15 needs its pull-down; without it the AT firmware does not start. "flash mode (GPIO0 low)" means GPIO0 was low at boot.
  • The terminal says "Connection refused": connect to port 23, the hub, and wait for "Chat hub ready" in the UNO's monitor.
  • The browser asks whether the server on port 80 is running: the hub's page is on port 23 - open http://192.168.1.101:23/ (in the demo: click Go).
  • No welcome right after Connect: the hub greets a client one second after it connects, after checking that it is not a browser.
  • No panel: click the PANEL pad or the shield, or turn "Open the panel at Run" back on in Settings.

Things to Know Before Using a Real ESP-12F

  • Power: the ESP-12F draws up to about 300 mA while it sends. Use a 3.3 V regulator that can deliver that - not the UNO's 3.3V pin.
  • Levels: the ESP-12F is a 3.3 V part. Put a divider (for example 1k / 2k) between a 5 V Arduino's TX and the module's RXD; the module's TXD can go straight to the Arduino.
  • The 2 mm pitch: the pins do not fit a breadboard. Solder the module to an adapter plate, or use a NodeMCU board that carries it.
  • Boot resistors: on a bare module pull EN, RST, GPIO0 and GPIO2 up with 10k and GPIO15 down with 10k.
  • The flash pins: never connect anything to CS0, MISO, GPIO9, GPIO10, MOSI or SCLK.
  • The antenna: keep metal, ground copper and other parts away from the antenna end of the board.
  • A real chat server: the AT firmware allows five links; a busy hub on a small Arduino should keep its lines short, as our demo does, and drop clients that stay silent for very long.

Limitations of the Simulation

  • The ESP8266 runs our model of the AT firmware 1.7.4, not your own ESP8266 firmware; GPIO0 low gives the flash mode, but nothing can be flashed.
  • In Proteus an open EN or a 10k pull-up to a 3.3 V terminal both count as on - only a low switches the module off. GPIO15 must really be low.
  • Not modelled: the ADC pin, the flash pins (only drawn), the soft access point (CWMODE 2 / 3 are accepted, but nothing can join it), SSL connections, the supply's voltage and current, the radio itself - the join and network times and the antenna's +2 dB are realistic values, not a radio simulation.
  • The PWR LED, the antenna colours, the PANEL pad, the panel, its phone, the router, the two neighbour networks, the internet host and the two monitors are TEP additions.
  • ESP8266 and ESP-12F are names of Espressif and Ai-Thinker; this library is not made or endorsed by Espressif, Ai-Thinker, Arduino or Labcenter.
  • Tested in Proteus 8.5 in October 2026 (the demo as shipped, the UNO, the ESP-12F, the laptop and the phone together at about 0.3 x real time on our PC). Proteus 7 is not supported.

So, that was all about the ESP-12F Library for Proteus. I hope it helps you try the newest ESP-12 module in Proteus before you solder the real one - and build servers that several devices use at once. Our recent demos showed TCP requests with the ESP-07S Library for Proteus, UDP broadcast with the ESP-12E, and now a multi-client hub; our series started with the ESP32 DevKit V1 Library for Proteus V2.0, and the Laptop and Mobile WiFi Monitors talk to every one of our Wi-Fi boards and modules. If you use the ESP-12F Library for Proteus in a project, please share it in the comments or in our forum, and if you have any questions, ask in the comments and I will help you out. Till the next tutorial, take care and have fun!