Closed GeorgeIoak closed 4 months ago
This lib handles 1-wire master side. The feature you are requesting is related to 1-wire slave side which would lead to completely different interface and implementation, therefore I'm not planning to add this as part of this lib.
I'd rather propose to rise an issue for OneWireHub to fix it there. (Basing on short investigation the OneWireHub sources I see the lib polls 1-wire bus for signal changes on time interval basis. I'd not assume this as optimal solution for such multitasking platforms as ESP32, so I'd recommend to fix this by upgrading the lib into interrupt-bases bus scanning.)
I was wondering how much work it would be to add a feature where this could emulate a DS18B20 sensor. The reason is that it could be used to test other boards that think they are talking to a DS18B20 sensor but we would be able to emulate the response and control the temperature being read.
The only other code doing something like this that I found was https://github.com/orgua/OneWireHub but it's not working well especially with all the ESP32 code updates (Arduino 3.x, IDF-5.x)
I just thought I'd ask in case this made sense to have as a feature