Do you have a code for auto-answering a call using ESP32 and SIM800L? What I want is, I will call the number that is inserted in the SIM800L and I am expecting it to answer automatically. I am trying to make a code but I can't get it. I am expecting to get an accurate code for my concern.
#include <SoftwareSerial.h>
SoftwareSerial sim800l(7, 8); // RX, TX
void setup() {
Serial.begin(9600);
sim800l.begin(9600);
delay(1000); // Set auto answer mode to 1 ring
sim800l.println("AT+ATS0=1");
}
void loop() {
if (sim800l.available()) {
Serial.write(sim800l.read());
}
if (Serial.available()) {
sim800l.write(Serial.read());
}
}