Different output between Arduino Mini 05 and Arduino Mega 2560

this seems like shortage of ram, these ATMegas tend run out often out of ram when dealing with large arrays which happens largely in the case of led lighting.

but then we dont know what you are doing in your code.