Not sure this is the right forum to post in, but I'm working with a GPRS shield so here goes. I've been developing a sketch which initializes and talks to the modem to eventually connect to a remote TCP endpoint (also developed locally)
Everything has been going along fine until yesterday.
I have a large block of code which should be in my loop() function which will kick in and handle the various communication aspects - that is, connect to the TCP endpoint, run through the intialization steps of my simple protocol then handle messages as they arrive.
The problem is, if this large block of code is included in my sketch (not actually called, loop() is empty, all I have to do is add a new function and NOT call it) then strange stuff starts happening. Code which I've previously tested as fine stops working, random things like startsWith (String method) stops working, or the arduino restarts my sketch when I call Serial.Write.
I've spent the last half day going through code with a fine tooth comb, commenting various blocks out to see if it's a particular statement that causes it and I've narrrowed it down to two if statements inside that loop function. Let me just reiterate, this code is not actually invoked, it's just included in the sketch and not called.
I am not sure where to go from here, I'm nowhere close to the 32kb limit of code, sitting somewhere around 11kb with all my debugging statements included. Does anyone have any suggestions? I've tried two different Arduino Unos now and they both exhibit the symptoms.
If I add the code in, the sketch doesnt work, I take it out, it works again... but it's not called - so it has to be some sort of linking or compilation issue, right?
Thanks in advance