I think I fixed it, I deleted the constant int for the times, and put the times directly in the delay function. Seems to work fine overnight.
thank you all for the help. If I keep having issues I will use a external power source.
Here is the link to the board I am using. It is supposed to be able to handle the power directly, using the recommended power supply (9V)
