Closed git-Space closed 6 years ago
The following setup works:
2 Arduino Nanos (each simulating 8 DS18B20) plus 2 physical DS18B20 on the same bus, connected to a DS9097U, needs the following value changed to get almost 0 errors:
libraries\OneWireHub\src\OneWireHub_config.h
constexpr timeOW_t ONEWIRE_TIME_MSG_HIGH_TIMEOUT = { 1500000_us };
300 1-Wire bus readings, over 5398 values retrieved (so only 2 readings were lost):
Hello,
I am currently testing the Arduino Nano as a slave in the following setup, two Nanos connected to each other:
Here is what the master sees when polling (COM port output slightly edited for your viewing pleasure):
Obviously, there seems to be an issue with the emulated sensors, the hardware one (at 227ms) is fine!
What I did so far:
The calibration was run, and usually spits out the value 12:
This value has been updated in the AVR section of the \libraries\OneWireHub\src\platform.h file (I found out that this section is used when the compiler runs):
Since the different addresses are transmitted without any issue, my guess is that the bus is working fine. Maybe there is something with the variables (int8, int16, float and so on); here is the code on the slave side, where I tested different ways to set the virtual DS18 temperature values :
Or maybe it's in the OneWireHub library itself ?
shows that the CRC for exemple, is handled in different files:
A last thing I tested, was using another slave library OneWireArduinoSlave with the DallasTemperature/Multiple master from Arduino IDE example sketches. The results are baffling: again, the hardware DS18 is ok, whereas the virtual ones have a CRC value equal 00 (instead of all FF for OneWireHub sensors), and no way to set the temperature values on the virtual DS18 either. I guess there is a common code-base somewhere :)
So, basically that's where I am stuck: The two Nanos communicate through the 1-Wire bus, but somehow I can't get the virtual temperature values transmitted.