I have a particle photon on a relay shield. I want to add a temp and humidity sensor to the photon, hard wired. Can I wire this into the open slots of header wholes directly next to the pins on the photon? If so then where is the code to add a sensor of such? Thank you
I believe you can use the adjacent header holes to attach sensors and other accessories. You’re asking for code without telling us which sensor you wish to use. If you’re looking for a sensor recommendation, then look at the adafruit lineup: https://www.adafruit.com/category/56. For a more precise recommendation you may want to tell us some more details such as desired budget, accuracy, application or footprint, etc.
Yes, you are right. This sensor looks just like the DHT11 but it has a black board on the back that is slightly larger than it itself. It might be just an older DHT11. ?
If you are sure it is a DHT11, I believe there are multiple DHT libraries in the community libraries. If using Web IDE, just search for DHT under libraries.
Okay, thanks. Is there an easy way to check and see if the sensor does indeed work? Or am I going to need to get the library first?
The DHT11 is a digital sensor. Unlike an analog sensor, you cannot use built-in functions (like ADC) to get the reading. You can write some code yourself to extract the data from the sensor but using a library would be much easier.
If the DHT11 sensor is not faulty it will definetly work with the Photon and the available libraries.
The carrier board is irrelevant, important is what’s written on the sensor itself. It might have some alternative type name, but these alternatives can easily be checked via a web search.
If you have a hi-res photo (sensor front and back) that might help too.