I'm trying to send an SMS from my UNO. The code I'm using is:
[/
void Do_the_switch(void){
if((Pos=="U1Front")&&(Switch_state=="on")){//verify light position and switch state to be.
digitalWrite(U1Frontsw,on); //Switch on this light.
Temp='\"'+Phone_Num+'\"'; //format the Phone Number as read from the SMS
Serial.print("Temp=");
Serial.println(Temp);
mySerial.print("AT+CMGS=\"+27716758370\"\r"); //initiate SMS sending
delay(5000);
mySerial.println("U1Front is switched on"); //Send the confirmation SMS of the switching done.
}code]
It doesn't seem to initiate the sending of the SMS. The confirmation SMS also is not sent.
Can someone respond?