I'm trying to build a small project that monitors a status (on or off) and sends me a a text per sms with the current time the status changed (switched from on to off or from off to on)
For GPS and GSM im using a SIM808 and i programmed the complete project on an Arduino Mega2560.
Everything is working completely fine but when I try to convert the programm to work on a TrinketPro 3,3V the SMS won't be sent.
I used Serial.println AT commands for sending the SMS.
Code: Select all
//******************************** GPS Uhrzeit holen ******************************
if (sim808.getGPS())
{
JAHR = int(sim808.GPSdata.year);
MONAT = int(sim808.GPSdata.month);
TAG = int(sim808.GPSdata.day);
STUNDE = int(sim808.GPSdata.hour);
MINUTE = int(sim808.GPSdata.minute);
SEKUNDE = int(sim808.GPSdata.second);
}
//*********************************** SMS Senden EINGESCHALTET ********************************
if ((Pegel_Testtaster == 0) && (EINE_SMS == 0))
{
digitalWrite (LED_D13, HIGH);
sprintf(MESSAGE_EIN, "MKXX eingeschaltet %02d.%02d.%04d-%02d:%02d:%02d", TAG, MONAT, JAHR, STUNDE, MINUTE, SEKUNDE);
Serial.println("AT+IPR=9600"); //Baudrate synchronisieren um Rückmeldungen des SIM808 Moduls zu erhalten
//updateSerial();
Serial.println("AT+CMGF=1"); //TextModus(SMS) einschalten
//updateSerial();
Serial.println("AT+CMGS=\"+491722996158\"");//Versand der Kurznachricht(SMS) an Telefonnummer
//updateSerial();
Serial.print(MESSAGE_EIN); //Inhalt der SMS
//updateSerial();
Serial.write(26);
EINE_SMS = 1;
}
else
{
digitalWrite (LED_D13, LOW);
Hope anyone has some hints.
greetings
Chris