Well I am trying make an application with arduino leonardo and GSM Shield. There are conditions if, else if, else .. etc
if (smsMetni.indexOf("DURUM") != -1) {
Serial.println("SMS income");
String temp= String(analogRead(LM35_pin) * 0.48828125);
String temp2 = "Hava " + temp + " derece.";
char tempSMS2[] = "";
temp2.toCharArray(tempSMS2, 30);
Serial.println(tempSMS2);
Kapadokya.smsGonder(gonderilecekTelNumarasi, tempSMS2);
}
After the last line "Kapadokya.smsGonder(gonderilecekTelNumarasi, tempSMS2);" program stopping I watching serial monitor there is no notification or error. just stopping.
If I change those lines and remove String(analogRead(LM35_pin) * 0.48828125) :
String temp= String(analogRead(LM35_pin) * 0.48828125);
String temp2 = "Hava " + temp + " derece.";
and just write like this, it works very well.
String temp2 = "Hava derece.";
maybe you think there is a problem with LM35, even if I change it String(analogRead(LM35_pin) * 0.48828125); with String(30);, it doesn't work again. after the last line it is not continue.
only one sollution I've found if add delay(500) after each line it works but my codes looks ugly with this. are there any solution.