Hello i have been reading this splendid forum for a long time but now i even had to register because i have a really strange behaviour with my sms texting distance meter that i cant figure out.

At specific times it takes measurements an compares values and if they exceed a threshold value it sends a text to me. So far so good, until yesterday i discovered that if the time for sending message is (any hour):01 and all the way up to 09 it doesent send the text. In the function sendMessage() that i have made i have a flag that gets set at the last row in the function and it gets set.

But if the time is (any hour):10 up to 59 it works every time, flag gets set and i also receive a text. It doesent matter if i set the time in the code with a 0 before 1 or just 1. Any other action based on time in the code accepts minutes below 10 with or without a 0 before digit.

So to the question i have, has any one stumbled upon this behaviour or any clues or guesses?

Greetings from Sweden

could you post the code?

Sure. But its pretty darn ugly, so be prepared. :)

The version attached has my external time adjustments removed. I have had it so i adjust time for read old value, read new value and alarm time with a potentiometer and two buttons. Thought that was the problem so removed that and set time in code, no difference.

Seems hard to remove and alter a fileā€¦

LCDI2CRTCUNO.ino (9.24 KB)

Well i seem to have found the "not below 10 bug" now.

I shortened the text message with a few rows and now it works flawlessly. Strange though that a to long message would be minute dependant. As i wrote before it did send ok if time was "right".

Well, thank to you that took some of your time and read my post and wasted some thought on it.