Your new topic does not fit any of the above??? Check first. Then post here. Thanks.

Moderator: igrr

User avatar
By schufti
#83648 maybe it is just related to the fact that OW lib relies on ARDUINO_ARCH_ESP8266 being set to determine esp.
As this is not the case (only ESP8266 defined) it falls through to "general case" as the warning states:
OneWire. Fallback mode. Using API calls for pinMode,digitalRead and digitalWrite. Operation of this library is not guaranteed on this architecture.


Try changing ARDUINO_ARCH_ESP8266 to ESP8266 in OneWire_direct_gpio.h and OneWire_direct_regtype.h

Edit: it's working for me on 2.4.2 with DS18B20
User avatar
By schufti
#83766 I recommend using the more recent version
https://github.com/orgua/OneWire

still there is the problem with
ARDUINO_ARCH_ESP8266 vs ESP8266 (may also be true for ESP32)
in src/platform.h

nevertheless it has some real errors and minor quirks fixed/removed and works fine on AVR and ESP8266 even with iButtons (parasitic power mode not fully tested yet, DS18B20 missing).

Be aware that examples won't work with some ancient (non multidrop bus compatible) onewire/ibutton devices that don't (correctly) support 0xF0 rom_search (or new 0x33 rom read vs. old 0x0F) e.g. vintage DS2400 serialnumber or act erratic for DS2400 compatibility (DS2401, DS2405)

n.b.: several "original DS18B20" I tested from china suppliers seem to be just "clones". Allthough they work ok in standard powered mode, the totally fail in parasitic powered mode and just clamp the bus to "low".