Hi, i have a problem and i didnt know how to solve. I have an ds18b20 sensor and i want to take the temperature reading in two microcontrollers. The first is a sonoff th controller that is works with the sensor right now and show me the temp of water boiler. My project is to take the digital signal of the sensor and read it with an arduino nano at the same time with the sonoff. I try it and i didnt take measure in sonoff ether in arduino. I try to isolate the digital signal with optocouple but i have the same problem, no measure from sensor. How i can do this. Any idea? If i have two arduinos i do this with spi and with master-slave connection to microcontrollers. But know with sonoff i cant do this. I think must find an hardware solution for my problem.
You cannot read the same sensor with two microcontrollers. Either use a second DS18B20 or read the sensor with one microcontroller and transfer the read data to the other one.
I understand. Can i read the sensor with the arduino and export from a digital output pin to sonoff input?
You may be able to "listen in" on the Sonoff's communication with the sensor.
Try googling 1 wire sniffer arduino
Always better to use a seperate sensor , that way you have better confidence in the temperature , rather than being given to you by the device you are presumably monitoring . These sensors are very cheap !