Problem in Counting the Counter in Programe

Hello !

I m using UNO with SM5100B GSM shield.
i m sending sms through it.
I want to keep the log of the messages. i.e how many sms has been send through.
i simply used a variable i.e. count and then i used "count++" for its increment.
The problem i m encountering is that when i receive sms the counter values are wrong.
the first sms contains 1
second sms contains 4
3rd sms contains 7
4rth sms contains 10
and the conditions i applied for sending sms are :

  1. if (minute() == 1 && second() == 30)
  2. if (minute() == 2 && second() == 30)
  3. if (minute() == 3 && second() == 30)
  4. if (minute() == 4 && second() == 30)

I also tried and changes the conditions, but the result were same :frowning: , the new conditions were :

  1. if (minute() == 2 && second() == 30)
  2. if (minute() == 4 && second() == 30)
  3. if (minute() == 6 && second() == 30)
  4. if (minute() == 8 && second() == 30)

another thing i checked my program on Serial Monitor with out GSM Module.
the result are correct.
Any suggestion or advice to correct the counter. I just want that sms would contain
1st sms: 1
2nd sms: 2
3rd sms: 3
4rth sms: 4

Well, it would be useful to see code, but do you have a retry loop?