quantenschaum / egg-incubator

adruino controlled incubator for chicken eggs
https://create.arduino.cc/projecthub/quantenschaum/egg-incubator-ef0cf6
GNU General Public License v3.0
50 stars 35 forks source link

Getting NaN errors when trying to select temperature/humidity setpoint. #2

Open lefterisgar opened 5 years ago

lefterisgar commented 5 years ago

Hi! I just finished my egg incubator, and I get NaN errors whenever I try to select temperature and humidity. I opened two threads in Stackexchange and the Arduino forum, but it doesn't seem like anyone knows something about it. I tried everyrhing possible with no success. I am able to see the current temperature and humidity, but I can't put my own. However, here are some pictures of the issue: https://i.stack.imgur.com/agXyy.jpg https://i.stack.imgur.com/olpzd.jpg

pguede commented 5 years ago

Hello! I think that your problem is that Ts and Hs are not set on the EEPROM, so garbage is returned when the program tries to load them on the first run. Check line 164 on the code ( comment). You can write a simple script to load that values. Then, load again this full code and it should not give you this NaN

lefterisgar commented 4 years ago

Thank you soo much @pguede !! Thankfully, my knowledge has increased a lot over time and now I am able to create my own incubator code which is far far better than this one and offers more features, yet it has still plenty of things to be improved. Your answer however was the exact solution to my problem as other people on the forums suggested.

tamager144 commented 4 years ago

@lefterisgarotonios Have the same problem you wouldn't be able to share your improved code?

lefterisgar commented 4 years ago

@tamager144 Hi there. It's been a long time since then and I have learnt to write my own Arduino code. I changed a lot of stuff and probably it's not going to suit your needs because it's too complicated... Thanks for your understanding!

quantenschaum commented 3 years ago

This project is a bit abandoned, sorry for that. as @pguede said, you have to initialize the eeprom by running the programm with https://github.com/quantenschaum/egg-incubator/blob/master/incubator.ino#L164 activated once.

quantenschaum commented 3 years ago

I tried to fix this in 1c7714c3b9f097aa5fb819558bdcf791956871bf

lefterisgar commented 3 years ago

@quantenschaum No, it's okay and I'm very glad that you are still interested in this project!

quantenschaum commented 3 years ago

Glad that you found it useful. No :chicken: here at the moment. Did it work?

lefterisgar commented 3 years ago

@quantenschaum Yes it did but had a couple of other issues and I was forced to learn C++ because of this and I've made an entirely different codebase....