Is there a library that allows the ESP-01 to operate as an external WiFi module for ESP32?

Hi folks,

I have an existing circuit operating fine with a Mega2560 and ESP-01s. The following libraries are used with this hardware:
• ESP8266_Lib.h
• BlynkSimpleShieldEsp8266.h

I’ve recently decided I’d like to change the Mega for an Nano ESP32 for several reasons. However, I’m unable to identify a suitable Blynk library that will allow the ESP-01s to be used as an external WiFi module similar to my existing circuit. The WiFi module built into the Nano ESP32 can not be used, as the device will be submerged in water. The ESP-01s module will be positioned externally where it can connect to a WiFi router.

In the (incomplete) code I’ve attached, I get a compiling error. I believe this is due to the fact that the libraries; ESP8266_Lib.h & BlynkSimpleShieldEsp8266.h are designed for the AVR architecture. Are there alternative libraries for the ESP32?

I’m sure my best option would be to use an ESP32 with an external antenna, but I have several Nano ESP32’s and ESP-01s on hand which I’d like to use if possible.


// Nano ESP32 code: Written with respect to Arduino pin (default) numbering.

/////  Blynk  /////

#define BLYNK_PRINT Serial                                        // Comment this out to disable prints and save space!!
//#define BLYNK_DEBUG


#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>

char ssid[] = "";                                      // ASPI WiFi credentials.
char pass[] = "";                                 

//char ssid[] = "";                             // Sim router WiFi credentials.
//char pass[] = "";                                       

#define EspSerial Serial1
const byte EspRx = 10;                                            // Serial comm lines for Esp-01s
const byte EspTx = 11; 
ESP8266 wifi(&EspSerial);

float BlynkTEMP, BlynkDO, BlynkPH, BlynkOUR;

BlynkTimer timer;                                                 // This function creates the timer object. It's part of Blynk library

void myTimer() 
  Blynk.virtualWrite(V3, BlynkTEMP);                              // e.g. writing sensor value to datastream V3
  Blynk.virtualWrite(V4, BlynkDO);                                // e.g. writing sensor value to datastream V4
  Blynk.virtualWrite(V5, BlynkPH);                                // e.g. writing sensor value to datastream V5
  Blynk.virtualWrite(V6, BlynkOUR);                               // e.g. writing sensor value to datastream V6


/////  YosDO  /////

#define YosSerial Serial2
const byte YosRx = 10;                                            // Serial comm lines for YosDO
const byte YosTx = 11; 


void setup() 

  pinMode(EspRx, INPUT);
  pinMode(EspTx, OUTPUT);

  EspSerial.begin(9600, SERIAL_8N1, EspRx, EspTx);                // Rx=D10, Tx=D11

  Blynk.begin(BLYNK_AUTH_TOKEN, wifi, ssid, pass);

  timer.setInterval(1L, myTimer);                                 // Setting interval to send data to Blynk Cloud to 10000ms. Data will be sent every 10 seconds

  YosSerial.begin(9600, SERIAL_8N1, YosRx, YosTx);              // Rx=D12, Tx=D13

void loop() 
  Serial.println("UART00 controller operational");
  EspSerial.println("UART01 controller operational");
  YosSerial.println("UART02 controller operational");

Have you looked at Blynk NCP ?


No, I’ll have a look.