Migrating from Argon to Photon 2

I have a working Argon monitoring temperature using a DS18B20 temperature sensor. The code and hardware setup uses the D4 pin on the Argon.

My Photon 2 is not working with the DS18B20 temperature sensor and I am trying to debug the system.

Question: Should I assume that the D4 pin that is used by the Argon is the correct pin on the Photon 2?Again, I am trying to collect temperature readings from the DS18B20.

Also, is DS18B20 fully compatible with the Photon 2? If not, is there a better temperature sensor? I am making good use of the 2 foot long wire from the DS18B20 to the Photon 2.

My email address is mm6@andrew.cmu.edu
Thanks in advance.

I am open to a different temperature sensor but would like keep the wire.
If you know of a tutorial for the Photon 2 and temperature sensing, that would be tops.

Thanks Much

The DS18B20 is unlikely to work on the Photon 2 using any existing libraries.

It is possible to use a I2C 1-Wire interface such as the DS2482.

In the future, it's possible that the RTL872x SPI peripheral could be used to implement the timing-sensitive part of the 1-Wire protocol, but this would still require some additional hardware because the SPI peripheral can't be run in open-collector mode, and also would require using the SPI pins instead of any pins. Using a DS2482 is way easier if you have to make a hardware modification anyway.

Using any temperature sensor with an I2C interface, such as the SHT30 or SHT3C, is the best solution if the sensor is within a meter of the Photon 2.


Thank you Sir. I have ordered a SHT30 and will give it a try.


This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.