Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not working with concurrent sms and call functions #34

Open
Sandeepvardhan08 opened this issue Oct 26, 2024 · 0 comments
Open

Not working with concurrent sms and call functions #34

Sandeepvardhan08 opened this issue Oct 26, 2024 · 0 comments

Comments

@Sandeepvardhan08
Copy link

Sandeepvardhan08 commented Oct 26, 2024

im facing a problem with this code , im getting only calls but not the messages actually.
i dont know why im not getting messages. Correct me if anything is wrong within the code .
im only receiving sms 1 time after uploading the code to aurdino, from next im only receiving calls.

help me ASAP
Regards.

Heres the code:

#include <Sim800L.h> // Include the revised SIM800L library
#include <SoftwareSerial.h>

// SIM800L configuration
Sim800L Sim800L(7, 8); // RX, TX for SIM800L

// Phone number for alerts
const char* phoneNumber = "+911234567890"; // Replace with your phone number
char message = "hellow from aurdino"

void setup() {
// Initialize serial communication for debugging
Serial.begin(9600);

// Initialize SIM800L module
Sim800L.begin(9600);

}

void loop() {

// Send SMS

bool smsSent = Sim800L.sendSms(phoneNumber,message);
delay(15000);
if (smsSent) {
Serial.println("SMS sent successfully");
} else {
Serial.println("Failed to send SMS");
}

//Make a call
Sim800L.callNumber(phoneNumber);
Serial.println("Calling...");
delay(30000); // Call duration of 30 seconds
Sim800L.hangoffCall();
delay(10000);

}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant