twystidceed / CDH-Arduino-Control

Auto Start/Stop for Chinese Diesel Heaters - See Readme
MIT License
0 stars 0 forks source link

Arduino Stability Issues #1

Open wshelley opened 2 years ago

wshelley commented 2 years ago

Thanks for publishing this code, and to the previous authors. Not sure if this is related to the issue that you had but I had some major stability issues with the following line:

Serial.println(heaterstate[heaterstatenum]);

The heater was reporting a state of 96 for a brief period, which caused an issue with the array.

As its really just extra debug information, I've commented this out in my code for stability.

wshelley commented 2 years ago

This would probably fix it:

    if (heaterstatenum >= 0 && heaterstatenum <= 8)
    {
      Serial.println(heaterstate[heaterstatenum]);
    }
wshelley commented 2 years ago

I've created my own fork of the original @Jess-- project and fixed the issue: https://github.com/wshelley/Chinese-Diesel-Heater-Advanaced-Temperature-Controller

twystidceed commented 2 years ago

Thank you ! I didnt have much help besides the original code and it kept shutting my particular heater down.. Im going to try and run your updated coding and see what happens.. its startin to get cold at home base. time to hunker down for the long cold..