Skip to content

compiling for both ESP8266 and ESP32 with OneWire Libraries #2

Description

@bill-orange

First off, this OneWire library works very well. The CRC errors occurring every minute or so disappeared. Nice. I am however having a problem integrating this library into my Arduino IDE cleanly. This may be a bit off topic since the library works well, but I suspect that I am not alone in encountering this problem.

Installing this library as a Zip using the board manager creates a folder OneWire-master. The existing library is in a folder named OneWire . In order to make the compiler pick your library the OneWire folder has to be deleted.

Unfortunately the OneWire library in OneWire-master will not compile with an ESP8266. I have both ESP8266 and ESP32 boards with code needing OneWire. Restoring the OneWire Folder every time want to compile for an ESP8266 is awkward at best.

I tried placing the .ccp file and .h file in the folder with the sketch and using #include "OneWire.h" rather than #include <OneWire.h>. That generated compiler errors when OneWire could no longer find external components.

I tried renaming OneWire and that also generated compiler errors even with the reference to the .h file within the .cpp revised.

There must be some sort of slick way to handle this. Could Paul's Onewire be modified to also work on ESP8266.

Advice?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions