Hi @pistache351.
Explanation
Some significant changes were made in the recently released version 3.0.0 of the "esp32" boards platform that adds support to Arduino IDE for your ESP32 Dev Module board.
One of those changes caused the new version of the "esp32" platform to be incompatible with the "OneWire" library.
The bug in the "OneWire" library has already been fixed:
However, there hasn't been a release of the "OneWire" library since the time of that fix, so the release version of the library you get from the Arduino IDE Library Manager still contains the bug.
Resolution
For now, the most simple solution will be to use the development version of the "OneWire" library that contains the bug fix.
I'll provide instructions you can follow to do that:
A. Uninstall the release version of the "OneWire" library
- Select Sketch > Include Library > Manage Libraries... from the Arduino IDE menus to open the "Library Manager" view in the left side panel.
- Type
OneWire
in the "Filter your search..." field. - Scroll down through the list of libraries until you see the "OneWire" entry.
- Hover the mouse pointer over the "OneWire" entry.
- You will see a ●●● icon appear near the top right corner of the library entry. Click on that icon.
A context menu will open. - Select "Remove" from the context menu.
An "Uninstall" dialog will open. - Click the "YES" button in the "Uninstall" dialog to confirm that you want to uninstall the library.
The dialog will close. - Wait for the uninstall process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:
ⓘ Successfully uninstalled library ...
B. Install development version of "OneWire" library
- Click the following link to open the library's GitHub repository homepage in your web browser:
https://github.com/PaulStoffregen/OneWire - Click the "Code ▾" button you see on that page.
- Select Download ZIP from the menu.
A download of the ZIP file of the library will start. - Wait for the download to finish.
- Select Sketch > Include library > Add .ZIP Library from the Arduino IDE menus.
The "Select the zip file containing the library you'd like to add" dialog will open. - Select the downloaded file from the dialog.
- Click the "Open" button.
The dialog will close. - Wait for the installation process to finish, as indicated by a notification at the bottom right corner of the Arduino IDE window:
ⓘ Successfully installed library from ...
Now try compiling or uploading your sketch again. Hopefully this time you won't encounter any errors and everything will work as expected.