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.
WORKING, BELIEVE IT OR NOT:
Code link (Online arduino create editor): Note that setup() and loop() are at bottom instead of top.