SOLAR TRACKING PROJECT - CONFLICT W/STEPPER SHIELD AND SD CARD - OR RAM ISSSUE

Hi. I have a 2 axis solar tracking project using Arduino, Adafruit stepper shield v2, Adafruit microsd breakout, and DS1307 RTC breakout. To try to make a long story short, I have many individual helper functions for working with the steppers and SD and rtc individually, and all goes well upon compile as long as I am not using the stepper motors.

No error is given. I have each function displaying debug info in serial monitor. All functioning just stops, not caught in a loop or stuck in a conditional loop. Halfway through printing a line in serial monitor for example will not update.

As an example: I have a tracking function (2 axis, 2 steppers) for finding sun, a homing function for each axis that finds reference position on wakeup, once finished tracking values are sent to sd... So if I run the homing functions, one for each axis, the file will not be available on the sd card. IF I ONLY HOME ONE AXIS (identical code), the code works fine, the sd card file is available and working.

^So this led me to think this is possibly a ram issue. Could I just be running out of ram in this? I will paste the code, all functions are in one file. Any global variables are at the top. The main 2 functions having conflict now are Track3() in conjunction with sdReplaceLine() in the code if you care to sift through 1300 lines lol. But if there is offender, it is between these 2 functions and any functions they call within themselves, or with overall program size.

Here is the code and screenshots of error received in serial monitor. And thanks in advance.

NOT WORKING: |500x253

WORKING, BELIEVE IT OR NOT: |500x251

Code link (Online arduino create editor): Note that setup() and loop() are at bottom instead of top.

Try to cut it down to the smallest possible program which displays the error. Cut out all the complex functions. Add them back one at a time.

Usually this will reveal the error to you. If it doesn't, then you have a small program to show us here: INLINE please, with [ code ] tags.

The code was too long for one message. I may have found the issue. Trying to maximize ram, I used Serial.print(F()) instead of normal and all works as of now. So further similar issues I will suspect ram first.

No error is given. I have each function displaying debug info in serial monitor. All functioning just stops, not caught in a loop or stuck in a conditional loop. Halfway through printing a line in serial monitor for example will not update.

Are you sure you don't have a power supply problem?