gfroerli / firmware

Firmware for the water temperature sensor project
GNU General Public License v3.0
6 stars 1 forks source link

Add the one-wire DS18B20 sensor #67

Closed rnestler closed 4 years ago

rnestler commented 4 years ago

Fixes #61

dbrgn commented 4 years ago

In general, it works:

Initialization done
85.00 °C (Bits12), 26.16 °C, 58.41 %RH
25.12 °C (Bits12), 26.16 °C, 58.66 %RH
25.12 °C (Bits12), 26.16 °C, 59.05 %RH

...however that 85.00°C is probably a read error. IIRC the DS18B20 uses a CRC, is that being verified?

Furthermore, the sensor is only detected in release mode. In debug mode, it blocks when scanning. Maybe a timing problem?

rnestler commented 4 years ago

Furthermore, the sensor is only detected in release mode. In debug mode, it blocks when scanning. Maybe a timing problem?

Hmm. Probably due to onewire timings being off / too slow :slightly_frowning_face:

rnestler commented 4 years ago

@dbrgn Getting one-wire to run in the debug build will be hard, without just disabling all safety measures in debug build. I'm not sure if we should just merge this as is?

dbrgn commented 4 years ago

Yep, it's a clear improvement :)

rnestler commented 4 years ago

IIRC the DS18B20 uses a CRC, is that being verified?

This would need to be fixed upstream.