Hi I have 2 DS1820's on one pin, and am trying to get them to work properly as 2 typical 52 nodes on a peer.
One node works fine, displays on souliss app correctly.
When I try to add the second node, neither shows correctly on the app.
The debug shows the sensors are being read correctly, just do not seem to update the typical correctly.
Loop: Sensor 1: 24.37 Loop: Sensor 2: 24.12
on the app, slot 1 shows OK status, but reading: 0C
slot 2 shows OK status, and Reading: NaN
I can comment out all code referencing slot 2 and slot 1 then works correctly.
Here are excerpts from my sketch code that is applicable, would appreciate any assistance
Thanks,
Mike
-================================-
slots and defines etc:
// This identify the number of the logic slot
#define MYLEDLOGIC 0
#define DALLAS1 1
#define DALLAS2 2
#include <OneWire.h>
#include <DallasTemperature.h>
#define DALLASPIN 2
OneWire ourWire(DALLASPIN);
DallasTemperature sensors(&ourWire);
byte addr_sensor1[] = {0x28, 0xFF, 0xAC, 0xA3, 0x02, 0x15, 0x04, 0x46 };
byte addr_sensor2[] = {0x28, 0xFF, 0xC2, 0xA3, 0x01, 0x15, 0x02, 0xCC };
-================================-
setup():
Set_SimpleLight(MYLEDLOGIC);
Set_Temperature(DALLAS1);
Set_Temperature(DALLAS2);
-================================-
loop()
FAST_910ms() {
// read sensors
sensors.requestTemperatures();
{
float dallas1 = sensors.getTempC(addr_sensor1);
Serial.print("Loop: Sensor 1: ");
Serial.print(dallas1);
Souliss_ImportAnalog(memory_map, DALLAS1, &dallas1);
}
{
float dallas2 = sensors.getTempC(addr_sensor2);
Serial.print("Loop: Sensor 2: ");
Serial.println(dallas2);
Souliss_ImportAnalog(memory_map, DALLAS2, &dallas2);
}
FAST_2110ms()
{
Logic_Temperature(DALLAS1);
Logic_Temperature(DALLAS2);
}