Good night, I'm a beginner in Arduino, I'm trying to adapt a project for my aquarium, which consists of turning on the LED's at different times, the timing is working well, but I added the function of being able to connect the relays by Bluetooth, that's my problem because if you restart the arduino the bluetooth works fine, but after the timer turns on and off the bluetooth connects well, but does not activate the relays, I have to restart the arduino to work again, someone help me, tell me what is wrong or what is missing from the code.
Thanks
Best regards
Timer_with_bluetooth.ino (13.9 KB)