Skip to content

Commit 740c109

Browse files
authored
Update ArduinoCellular.cpp
Fixes an error in the sendSMS function that made it impossible to send SMS.
1 parent 67270bf commit 740c109

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
@@ -127,6 +127,8 @@ Time ArduinoCellular::getCellularTime(){
127127

128128

129129
void ArduinoCellular::sendSMS(String number, String message){
130+
modem.sendAT("+CMGF=1");
131+
modem.waitResponse(1000);
130132
modem.sendAT(GF("+CMGS=\""), number, GF("\""));
131133
if (modem.waitResponse(GF(">")) != 1) { }
132134
modem.stream->print(message); // Actually send the message

0 commit comments

Comments
 (0)