My project combines the Elegoo avoidance sensor and the DHT11 temperature and humidity. The objective is to determine if the temperature and humidity have changed since the initialization of the device. I use the avoidance sensor to tell the Argon that I want to know the temperature and humidity. These values, along with the change in humidity, are visualized on an RGB LED. In addition, the change in temperature and humidity is posted on Tumblr through IFTTT.DHT11 Sensor
I used the Adafruit_DHT library in the Particle IDE to read the data from the DHT11 sensor. I use the heat index to get the temperature and the humidity command to get humidity. It is connected to pin 2 and wired as shown in the image below.
Obstacle Avoidance Sensor
The avoidance sensor puts out a HIGH or LOW value based upon whether there is a shiny surface above the sensor. It outputs a 0 when there is an obstacle. It is connected to pin 6 and wired as shown in the image below.
I used an RGB LED as one method of representing the environmental conditions. The LED I am using is a common cathode LED with the pins in the order of red, cathode, blue, green. The red is the temperature mapped on a scale of 255, the blue is the humidity mapped on a scale of 255, and the green is the absolute value of the change in humidity mapped on a scale of 255. I connected the red to pin 5, the blue to 4, and the green to 8. There are 220-ohm resistors between the power and the LED pins. The wiring is pictured below.
The other way I am expressing the data is through a service called If This, Then That. I monitor when the Argon publishes an event and the value of the change in temperature or humidity. There are separate IFTTT actions for temperature and humidity.
Finally, the data is put into text posts on Tumblr.