LED not staying on despite the code

I have been following along with the SD card example, the RTC example, and normal LED examples. I am experiencing a strange outcome and request some help to explain it. Maybe its just something so simple? I’m rather new to Arduino. I built a datalogger to monitor the current in a circuit, and when it goes above 0.2Amps the current switch changes state. The arduino monitors it. When I have a simple sketch which just does the LED based on the digital input as interrupt, all works well. The LED lights and stays lit when current is > 0.2A. And turns out when below this 0.2A limit where the switch changes state.

Now I add in my SD card code, the RTC code, and do the datalogging on top of all this. That stuff all works fine, but now the LED flickers on for about 50 ms or so, and then goes out, any time the switch changes state. Is this normal behaviour? Am I taxing the resources too much? I’ve tried Serial.println() functions in various spots to see if I can find out the cause, but so far no red flags. When I compile, I get this result in the window.

Sketch uses 15774 bytes (48%) of program storage space. Maximum is 32256 bytes.
Global variables use 1205 bytes (58%) of dynamic memory, leaving 843 bytes for local variables. Maximum is 2048 bytes.

Post your code, and wiring, it sounds like you are using a pin that the SD interface uses.

It would help if you posted your code and a schematic, not a frizzy thing. Is that normal behavior, depends on the hardware and code. Is the regulator to hot to hold your finger on, if so you have overload it. Are all the grounds connected? There are many other possibilities but without more information the best I can do is guess.

It turns out the SD card is using pin 13 already for clock I believe. I moved to another pin and now it works as expected. I had initially tried to paste the code but it said it was too long for the post.

I guess chalk it up to learning experience! Thank you for idea to check what these libraries are using.