ds18b20 readinig error

All ESP8266 boards running MicroPython.
Official boards are the Adafruit Huzzah and Feather boards.
Target audience: MicroPython users with an ESP8266 board.
User avatar
Roberthh
Posts: 3667
Joined: Sat May 09, 2015 4:13 pm
Location: Rhineland, Europe

Re: ds18b20 readinig error

Post by Roberthh » Thu Feb 17, 2022 9:53 am

I have found that using Robert-HH's 1-wire lib to be more successful
Thank, but that is kind of strange, since the lib uses bit-banging at python level for reading. I would expect that at bit reading the built-in C function is more reliable. But anyhow: when working with DS18x20 I have seen not-so-rare reading errors. These have to be caught by a try/except clause.

davef
Posts: 811
Joined: Thu Apr 30, 2020 1:03 am
Location: Christchurch, NZ

Re: ds18b20 readinig error

Post by davef » Thu Feb 17, 2022 10:29 am

Maybe, I learnt something about throwing exceptions using your code. I didn't go back to the official 1-wire library to verify my new-found knowledge :)

Post Reply