matridium
Well-Known Member
- Joined
- Dec 5, 2018
- Messages
- 119
- Reaction score
- 30
I was actually able to find the address of each sensor by plugging each one in and writing each down. They are all different. However thanks for taking the time to think this through in your last post.I'm wondering if maybe a couple sensors have the same address? Anything is possible from China. I think the way to go would be to rule that out, and/or use a simple sketch to see if three sensors can be detected. If you are feeling froggy, you can use a sketch like this which I use on an Arduino:
To use this on the D1 Mini, you'd change the int inPin = 14; line to be compatible with the D6 assignment from @Thorrak's board. I think that would be 12. Someone should check me on that. Then you'd also comment out the line in void listOneWire() which says pinMode(inPin, INPUT); (I don't think that needs to be specified with the ESP8266). If you monitor the serial port when this starts up you will see a line representing the OneWire address of each connected sensor (only one shown here):Code:#include <OneWire.h> int inPin = 14; // Connect data to pin A0 //int inPin = 18; // Connect data to pin A4 void setup(void) { Serial.begin(9600); listOneWire(); } void listOneWire(void) { byte i; byte present = 0; byte data[12]; byte addr[8]; pinMode(inPin, INPUT); OneWire oneWire(inPin); Serial.print("Looking for 1-Wire devices.\n\r"); while(oneWire.search(addr)) { Serial.print("\n\rFound 1-Wire device with address:\n\r"); for( i = 0; i < 8; i++) { Serial.print("0x"); if (addr[i] < 16) { Serial.print('0'); } Serial.print(addr[i], HEX); if (i < 7) { Serial.print(", "); } } if ( OneWire::crc8( addr, 7) != addr[7]) { Serial.print("CRC is not valid.\n"); return; } } Serial.print("\n\r\n\rComplete.\r\n"); oneWire.reset_search(); return; } void loop(void) { // Nothing here }
The idea here being using a very simple setup to see if the physical/electrical configuration will allow you to connect more than two sensors. If this proves out then there's a software issue. If not, there's a hardware/electrical issue.Code:09:27:30.378 -> Looking for 1-Wire devices. 09:27:30.378 -> 09:27:30.378 -> Found '1-Wire' device with address: 09:27:30.424 -> 0x28, 0xAA, 0x39, 0xBD, 0x37, 0x14, 0x01, 0xDB 09:27:30.471 -> 09:27:30.471 -> Complete.
I tried with the LCD unplugged including the relay board and nothing.
I replaced the controller PCB with another one I finished up today. No luck, also replaced esp board and still no luck. I have ordered a new 5 volt power supply, short of starting over from scratch I'm lost on what could be wrong.. but I really do think the PSU is damaged, probably because of the accidental short I did last week checking that AC main power switch. I'm also going to order new sensors and solder up new connectors just rule them out. I guess I am rebuilding it!!
I'll keep you guys posted.