NaN values in Egg Incubator

Hi guys! I decided to make an egg incubator, and soon, I finished the build. I was inspired by this project on Github. This guy made it work, screen, sensors, everything! I fired up my machine, the screen started and everything appeared to be working fine... I can see the temperature and humidity of the egg room, but when I try to select the temperature and humidity I want, errors start their appearance. I get NaN values, and I'm not allowed to select the values I want. The sensor works perfect, since as mentioned above I am able to see the temperature and humidity.

Some of the parts I used: *DHT22 Temperature/Humidity Sensor *Arduino UNO R3 (Clone) *LCD - Keypad shield

The code I used, can be found here. The schematic of the build can be found here.

Something that I found while investigating the code:

 if (key & (UP | DOWN | LEFT | RIGHT)) {
          Ts = max(20, min(50, Ts + (key & (UP | RIGHT) ? +1 : -1) * (key & (UP | DOWN) ? 0.1 : 1)));
          Ts_changed = 10;
        }

Below, there are some pictures of the build and the LCD, displaying the errors: |500x375

|500x375

The egg incubator, is divided in two boxes, where the one has the electronics stuff, and the bigger one, is the place where the eggs will be placed.

|500x281

|500x281

If you have any question, feel free to tell me in the comments! I hope we can solve that freaking problem, go on and hatch some eggs! :) :)

Why not post the code you are using in code tags so that 'we' may be able to figure out why you are getting the Not A Number error?

I put a link to the code and schematic at the beginning. However, here is the link to the code: https://github.com/quantenschaum/egg-incubator/blob/master/incubator.ino

Post the code please, not a link.