Skip to content

Commit 6883351

Browse files
authored
Merge pull request #15 from WolfRorDev/main
Fix sendSMS function
2 parents 34c49f4 + 740c109 commit 6883351

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: src/ArduinoCellular.cpp

+2
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ Time ArduinoCellular::getCellularTime(){
137137

138138

139139
void ArduinoCellular::sendSMS(String number, String message){
140+
modem.sendAT("+CMGF=1");
141+
modem.waitResponse(1000);
140142
modem.sendAT(GF("+CMGS=\""), number, GF("\""));
141143
if (modem.waitResponse(GF(">")) != 1) { }
142144
modem.stream->print(message); // Actually send the message

0 commit comments

Comments
 (0)