Hello everyone, as per title I have problems with sending an array with the Sim800L module. I briefly explain my program, every day I go to read data from a sensor and save them in an array at the weekend I would like to send the array containing the data divided into several days.
I found a program already made that allows me to send only one word I would use this program to send an array. Does anyone know how to do it?
This is the working part for sending a single word:
void SendTextMessage()
{
Serial.println("Sending Text...");
Serial1.print("AT+CMGF=1\r"); // Set the shield to SMS mode
delay(100);
Serial1.print("AT+CMGS=\"+41786719708\"\r");
delay(100);
if(OnOff > 0){
Serial1.println(CosaScrivere);
}
Serial1.print("\r"); //the content of the message
delay(100);
Serial1.print((char)26);//the ASCII code of the ctrl+z is 26 (required according to the datasheet)
delay(100);
Serial1.println();
Serial.println("Text Sent.");
delay(10000);
}
I thought I'd do it this way:
void SendTextMessage()
{
Serial.println("Sending Text...");
Serial1.print("AT+CMGF=1\r"); // Set the shield to SMS mode
delay(100);
Serial1.print("AT+CMGS=\"+41762957962\"\r");
delay(100);
if(OnOff > 0){
Serial1.println(CosaScrivere);
}
if(Settimana > 0){
for (Giorno = 1; Giorno <= 7; Giorno++) {
Serial1.println(Giorni[Giorno]);
Serial1.println(a);
ValoriArray[Giorno][1];
Serial1.println(b);
ValoriArray[Giorno][2];
Serial1.println(c);
ValoriArray[Giorno][3];
Serial1.println(d);
ValoriArray[Giorno][4];
Serial1.println(e);
ValoriArray[Giorno][5];
Serial1.println(f);
ValoriArray[Giorno][6];
Serial1.println(g);
ValoriArray[Giorno][7];
Serial1.println(h);
ValoriArray[Giorno][8];
}
}
Serial1.print("\r"); //the content of the message
delay(100);
Serial1.print((char)26);//the ASCII code of the ctrl+z is 26 (required according to the datasheet)
delay(100);
Serial1.println();
Serial.println("Text Sent.");
delay(500);
Settimana = 0;
}
but unfortunately it doesn't send me the message....
Can you tell me where you're wrong? ![]()