Weird problem

Hello!

I have a strange error with my problem. I wrote the code for an XBee and SD card, and now, when adding the one for Adafruit GPS, the board acts very strange. If i comment some function declarations, then it works. It seems that it's too much code in my project, but it is only 77%. Anyone had this problem before?

Thanks!

cyb3rman:
I have a strange error with my problem. I wrote the code for an XBee and SD card, and now, when adding the one for Adafruit GPS, the board acts very strange. If i comment some function declarations, then it works. It seems that it's too much code in my project, but it is only 77%. Anyone had this problem before?

Probably. If you are using an Uno, you may be running out of SRAM. You might try using the F() macro to keep static strings in program memory.

Thanks
I forgot to mention: the board resets ~10 times right after the first Serial.println() when i open the COM port in Visual Studio.
I'll try what you said and come back with an answer.

cyb3rman:
I forgot to mention: the board resets ~10 times right after the first Serial.println() when i open the COM port in Visual Studio.

That sounds about right for an Uno running out of SRAM. Sometimes they lock up. Sometimes they reset.

Thank you for the answers!
I had a lot of strings printed through Serial for debug purposes, and I just put them into Flash memory with F()
It works perfect now.. (for the moment).

OFFTOPIC: It's a little frustrating with all these limitations... Is there a list with microcontrollers that are compatible with arduino bootloader?

cyb3rman:
OFFTOPIC: It's a little frustrating with all these limitations... Is there a list with microcontrollers that are compatible with arduino bootloader?

I guess they call them 'micro' for a reason... :slight_smile: