Arduino code help with fade_functions

from the second loop cycle onwards, the new_humd_value is calculated and prints correct (around 150 on average) . But the old value is some abrupt value around (2500+) and this value keeps changing in every cycle