The outcome of this lab was a successful circuit and code that operated as intended. The circuit consists of a few key components - a temperature sensor, a photosensor, and an LED. The LED turns on when the temperature reading exceeds 75 degrees Fahrenheit. Once the LED has been triggered, the brightness is adjusted based on the reading from the photosensor. If the environment is brighter, the LED shines brighter, and vice versa.
The first step in creating this device was to assemble the circuit and make sure everything was hooked up properly. This involved using a pull-up resistor on the photosensor as well as a current-limiting resistor on the LED. Once the circuit was complete, the code was written to read the values from the sensors and control the LED according to the readings. There were two issues I had when working with the temperature sensor. First, I had to determine how to convert the sensor reading into a useful value. To do this, I looked at the datasheet and found the conversion factor to change the reading to Celsius, and then converted that to Fahrenheit. The second issue was that I needed to change the temperature to actually test my circuit and code. The solution to this was to use my finger to heat up the sensor and trigger my set point to turn on the LED.
During this project, I learned that its important to know what your sensor is actually reading. Datasheets are critical in understanding what you are doing. If you don't know what your sensor is giving you, there is not much you can do with the output. The only thing I would do differently is incorporate a potentiometer instead of the photosensor. The photosensor is a little tricky to work with and it would be easier to use a potentiometer to demonstrate the circuit.