9 years, 1 month ago.

Only last sensor is found

I'm using multiple sensors powered from 5V (MBED VU), with 4k7 pull-up resistor on the DQ line to the same 5V power. Your test program founds only the last sensor on the line. How can I read them all ?

Question relating to:

Hi Peter,

I haven't used that library, but I noticed there was another version of it at the bottom of the page (under Notes). According to the description it looks like it might fix some issues with the original library. Have you tried this one?

-Brian

posted by Brian Daniels 25 Feb 2015

1 Answer

9 years, 1 month ago.

That other one does not fix issues with the original one, it is just a different one :).

Also I have to admit I tested it only with a single sensor, but how do you mean it finds the last one only? What do you consider the last one to start with? They should all be parallel, so there is no first/last one.

Accepted Answer

Ok, of course they are parallel. Last means the last in the row, probably it has address which makes it the only working sensor. But the problem exists anyway - the DS1820::unassignedProbe(DATA_PIN)) immediately found the last (by address) sensor and stops.

posted by Peter Kravtsov 26 Feb 2015

You do then make an object with that sensor? If yes then I guess something is wrong with the code, but without multiple DS1820 sensors that is very hard for me to figure out.

I currently have a single DS1820 again, and will try if I can figure out something. But most likely I will need to ask you to run some tests programs when I get there if you are up to it. (Probably can check something in the weekend, but no guarantees).

posted by Erik - 26 Feb 2015

I am now 99% sure I fixed the issue, really stupid one, I think in the original code I started from, but a pain to find :).

posted by Erik - 26 Feb 2015