Please let me know if you know any good library for DS2482 I2C to 1-Wire bridge. I tried to use the DS2482_OneWire library but I got errors when trying to run the library examples (Read_temp_sensors and Scan_1Wire_Bus):

Error for Read_temp_sensors:

Read_temp_sensors:2:10: fatal error: DallasTemperature.h: No such file or directory

Error for Scan_1Wire_Bus:

C:\Users\myuser\Documents\Arduino\libraries\DS2482_OneWire-master\OneWire.cpp: In member function 'uint8_t OneWire::waitOnBusy()':
C:\Users\myuser\Documents\Arduino\libraries\DS2482_OneWire-master\OneWire.cpp:121:3: error: 'delayMicroseconds' was not declared in this scope
exit status 1 Error compiling for board Arduino Nano.**

Thank you.


1 Answer 1


I guess to solve the first error, you also need this library, which contains the DallasTemperature.h file. The file get's included, but is not contained in the DS2482 library. Unfortunately there is no clue for that in the readme of the library. The author didn't commit anything since 2014, so the development of the library can be considered dead from that side. Though some people have forked the library to make little changes.

And the solution to the second error is described in this issue of the DS2482 library (just adding an include of "Arduino.h" in the OneWire.cpp file).

  • Hello @chrisl, Thank you for your prompt answer. I don't know how to implement it: "// Constructor with no parameters for compatability with OneWire lib OneWire::OneWire()"... ecc " I still get an error for the second issue: bool isAllZeros(const uint8_t* const scratchPad, const size_t length = 9); ^~~~~~~~~~ Maybe you can still help me... Commented Feb 6, 2020 at 21:12
  • Please include your current code into your question, then I can test this myself
    – chrisl
    Commented Feb 6, 2020 at 21:14
  • Hello @chrisl. Thank's again for your time. Firstly I just want to run the examples included in the library. So the last error presented before was associated with Scan_1Wire_Bus. Please let me know if you are able to run all the ex file. Thank you Commented Feb 8, 2020 at 21:32
  • I dowloaded the DS2482 library and also the Arduino-Temperature-Control library, as described in my answer. After adding include "Arduino.h" to the top of OneWire.cpp I could successfully compile the example sketch Scan_1Wire_Bus.ino` from the DS2482 library for the Arduino Nano. I use Arduino IDE 1.8.9
    – chrisl
    Commented Feb 8, 2020 at 22:27
  • Hello @chrisl.Unfortunately,for me is still not working.If I install only 2 libraries that you recommend before I'm getting errors when I'm using #include <DallasTemperature.h>.If I install the OneWire library directly from Manage Library I will not receive errors for the inclusion of "DallasTemperature.h": but I'm getting new errors I think because both libraries (DS2482/OneWire) has the same name "OneWire ".Because of this the object defineded in DS2482 are not visible anymore (class OneWire'has no member named 'checkPresence') Please let me know if I'm doing something wrong now . Thank you Commented Feb 11, 2020 at 21:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.