I am attempting to use a Nano as a Greenhouse controller, and I can write code to use the DS3231 Real Time Clock and it works great and runs a long time no issues. Then I can write code to use the OSEPP HUMI-01 Temperature and Humidity sensor, again, it works great, no problems. But, when I attempt to use the code for both in the same program, the Nano reboots itself every three to four minutes.
I have used three different Nanos and three different DS3231 and four different HUMI-01 units, and I am getting the same results every time, but inconsistent restarts.
I have tried using different pins for the sensors and clock and that makes no difference either.
. I am using an Acer Z270, well, I will attach the pertinent information about my system.
Even though I have written the software (USING SOME PUBLIC DOMAIN MATERIAL) to handle four relays and a water detection sensor, I have not included that code, but I left the function names.
attached is the code I wrote to use the Nano as a greenhouse controller.
code and result.txt (15.7 KB)
code alone.txt (12.9 KB)