I have got the dimmer module but it doesn’t quite dimm my lamp with this sketch.

The lamp is always like 100% on, no matter what dim value is used, but on full dim (100), it is completely off.

The onboard LED however seems to dimm just fine, corresponding to the value.

Any idea what this could be? I tried multiple timerone libraries and have no clue that it could be.

Other approaches with delays dimm the lamp just fine, but i like a solution without delays.

]]>I have not tryed de ds18b20, but wil do in the short future.

For the lm335 and real analog input I will go for a precise reference voltage on de aref pin.

For use with potmeters there is no isue.

]]>For any precise temperature measuring I usually use a DS18B20, specifically because it is more precise than using the Analog input. Not only would you need a stable precision reference voltage but also precision resistors. I am not sure what sensor you use but e.g. the TMP35 has a precision of +/- 2 degrees celsius, The LM335 has 1 degree accuracy (but can get better with Calibration), whereas the ds18B20 has +/- 0.5 degree celsius accuracy.

Anyway, before we make this about the best sensor…… your factor of 1023 is right ]]>

The temperature error on my board was more than 1 degrees and that was to mutch. That why I look further and find the coarse. After making the formula it was correct.

There are 1024 steps but you start with 0 and the 1024ste has a value of 1023, do the binary conversion for 10 ones.

2 bit is 4 steps but the values are 0,1,2 and 3, so not 4.

]]>