Error when using multiple libraries esp8266 and sim900a

Hello everyone, I am using RTOS to build my project on an Arduino Mega. My project needs to use esp8266 and sim900a in parallel, but when I add the library #define TINY_GSM_MODEM_SIM800
#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>, this problem occurs:

Anybody have any idea I can fix it? This is my first piece of code. Thanks everyone!

#include <Arduino_FreeRTOS.h>
void TaskESP8266( void *pvParameters );
void TaskSIM900A( void *pvParameters );
#define BLYNK_PRINT Serial
#include <TinyGsmClient.h>
#include <BlynkSimpleSIM800.h>
#include <ESP8266_Lib.h>
#include <BlynkSimpleShieldEsp8266.h>
#define SerialAT Serial1
#define EspSerial Serial2
TinyGsm modem(SerialAT);

If you want to use WiFi and GSM in the same sketch then you’ll have problems, which is why @khoih wrote this library:

However, I don’t think it’s compatible with the ESP-01 as an AT modem for the Arduino Mega, and I have no idea if it would run under RTOS.


1 Like

Oh, thank you for your guidance. I will try <3