Hi,

Code:
count_remain, count_per_c
DO NOT use that with DS 18B20 ....

That's a first step.

Alain