KY-040 does not respond // Arduino Dehydrator

I think he just wants to isolate where the problem is. Is it reading the decoder, or is it displaying the result.

Anyway, the KY-040 code you're working from has an additional instruction which you don't have. I think it would look like this:

// notice turns
if(clkaktuell != clkletzter) {
// count up if CLK is triggered first
if(digitalRead(DT) != clkaktuell){
solltemperatur ++;
}
// count down if DT is triggered first
else {
solltemperatur --;
}
clkletzter =  clkaktuell;   // <---------------
}

But I think this method of decoding the KY-040 will give you two increments or decrements per detent. And it doesn't provide for switch debouncing. So it turns out that there are reasons for the more complicated decoder versions.