Back to Parent

Working with Sensors

Photoresistor and Temperature Sensor

Add a photocell/resistor to the TMP36 circuit and post both temperature and light readings to the Particle cloud.

I use two separate analog pins for photocell and TMP36. Both the readings of photocell and TMP36 can be retrieved from the Particle cloud. The photocell reading will also serve as a brightness indicator of the LED - I use the reverse mapping. with 0 - 4095 maps to 255-0 as a negative linear relationship. I think it makes more sense since we only need additional lighting (LED in the example) when the ambiance light is low.

The code and video are attached.

Content Rating

Is this a good/useful/informative piece of content to include in the project? Have your say!