Use SIM900 without Serial Monitor

Hello, I want to send a data temperature to server throught HTTP POST.

But I looking for if there any way of send it without use the Monitor Serial, because I want that the SIM900 send data each fifteen minutes. (WITHOUT INITIATE THE MONITOR SERIAL)

This is my code for any doubt:

#include <OneWire.h>
#include <DallasTemperature.h>
#include <SoftwareSerial.h>

SoftwareSerial SIM900(7, 8); 

#define temperatura 4

OneWire wire(temperatura);
DallasTemperature sensor(&wire);

void setup() 
{
  
SIM900.begin(19200);
delay(5000);
Serial.begin(19200);
Serial.println("\nCONECTADO \npresione h para hacer post");
sensor.begin();
Serial.println("Sensor iniciado, presione t para leer temperatura");

}

void loop()
{
  sensor.requestTemperatures();
   float tmp = sensor.getTempCByIndex(0);
   String urluno = String("AT+HTTPPARA=\"URL\",\"http://mail.interseccion.com.mx:8901/Ws_Temperatura?Id_temp=0&Id_Device=1&Valor=");
   String davaruno = String(tmp);
   String urldos = String("&Temperatura_Action=Insert\"");
   String urlfinal = String(String(urluno) + String(davaruno) + String(urldos));

   SIM900.println("AT+CSQ");
   delay(100);

   MostrarDataMonitor();

   SIM900.println("AT+CGATT?");
   delay(100);

   MostrarDataMonitor();

   SIM900.println("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"");
   delay(1000);

   MostrarDataMonitor();

   SIM900.println("AT+SAPBR=3,1,\"APN\",\"internet.movistar.mx\"");
   delay(4000);

   MostrarDataMonitor();

   SIM900.println("AT+SAPBR=1,1");
   delay(2000);
   
   MostrarDataMonitor();

   SIM900.println("AT+HTTPINIT");
   delay(2000);

   MostrarDataMonitor();

   SIM900.println(String(urlfinal));
   delay(1000);

   MostrarDataMonitor();

   delay(1000);

   MostrarDataMonitor();

   SIM900.println("AT+HTTPACTION=1");
   delay(10000);

   MostrarDataMonitor();

   SIM900.println("AT+HTTPREAD");
   delay(10000);

   MostrarDataMonitor();

   SIM900.println("AT+HTTPTERM");
   delay(100);
   
}

/*void tiempocontado()
{
  delay(600000);
  {
  void loop();
  }
}*/

void MostrarDataMonitor()
{
  while(SIM900.available()!=0)
    Serial.write(SIM900.read());
}

/*void loop() 
{
  
  if(Serial.available())
    switch(Serial.read())
    {

      case 't':
      Pedirdatos();
      break;

      case 'h':
      MandarPostSIM900();
      break;
    }
    if(SIM900.available())
      Serial.write(SIM900.read());

}

void MandarPostSIM900()
{
   sensor.requestTemperatures();
   float tmp = sensor.getTempCByIndex(0);
   String urluno = String("AT+HTTPPARA=\"URL\",\"http://mail.interseccion.com.mx:8901/Ws_Temperatura?Id_temp=0&Id_Device=1&Valor=");
   String davaruno = String(tmp);
   String urldos = String("&Temperatura_Action=Insert\"");
   String urlfinal = String(String(urluno) + String(davaruno) + String(urldos));

   SIM900.println("AT+CSQ");
   delay(100);

   MostrarDataMonitor();

   SIM900.println("AT+CGATT?");
   delay(100);

   MostrarDataMonitor();

   SIM900.println("AT+SAPBR=3,1,\"CONTYPE\",\"GPRS\"");
   delay(1000);

   MostrarDataMonitor();

   SIM900.println("AT+SAPBR=3,1,\"APN\",\"internet.movistar.mx\"");
   delay(4000);

   MostrarDataMonitor();

   SIM900.println("AT+SAPBR=1,1");
   delay(2000);
   
   MostrarDataMonitor();

   SIM900.println("AT+HTTPINIT");
   delay(2000);

   MostrarDataMonitor();

   SIM900.println(String(urlfinal));
   delay(1000);

   MostrarDataMonitor();

   delay(1000);

   MostrarDataMonitor();

   SIM900.println("AT+HTTPACTION=1");
   delay(10000);

   MostrarDataMonitor();

   SIM900.println("AT+HTTPREAD");
   delay(10000);

   MostrarDataMonitor();

   SIM900.println("AT+HTTPTERM");
   delay(100);
   
}

void MostrarDataMonitor()
{
  while(SIM900.available()!=0)
    Serial.write(SIM900.read());
}


void Pedirdatos()
{
  sensor.requestTemperatures();
  float tmp = sensor.getTempCByIndex(0);
  Serial.println("La temperatura es de:");
  Serial.println(tmp);
}*/
void tiempocontado()
{
  delay(600000);
  {
  void loop();
  }
}

Why is there a function prototype in the middle of this function? You most certainly do NOT want to call loop() from this function.

What is the problem? There is nothing in your code that REQUIRES that the Serial Monitor application be started.

PaulS:

void tiempocontado()

{
  delay(600000);
  {
  void loop();
  }
}



Why is there a function prototype in the middle of this function? You most certainly do NOT want to call loop() from this function.

What is the problem? There is nothing in your code that REQUIRES that the Serial Monitor application be started.

The function "tiempocontado()" it is some accidental, I don't use it

each time I want send the data, I need start the Monitor Serial, and that is something I don't want: START THE MONITOR SERIAL.

each time I want send the data, I need start the Monitor Serial

Why? I see nothing in the code that REQUIRES that the Serial Monitor application be started.

Of course, without it, you'll have no way of knowing that the Arduino is, or is not, sending the messages.

The function "tiempocontado()" it is some accidental, I don't use it

Then delete it.

If I close the Serial Monitor, the SIM900 doesn't sends anything

This:

SIM900.println();

Is the function responsible to send the AT commands throught Serial Monitor, but to actuate the data sending I need actuate the Serial Monitor.