This document is a correction for homework assignment 2 on programming C for embedded systems. It includes C code to read the value of a light dependent resistor connected to an analog pin and turn on an LED if the light level is below a threshold of 500. The code initializes the ADC, characterizes it, reads the raw value of the LDR, converts it to voltage, and toggles the LED based on if the voltage is above or below the threshold.
This document is a correction for homework assignment 2 on programming C for embedded systems. It includes C code to read the value of a light dependent resistor connected to an analog pin and turn on an LED if the light level is below a threshold of 500. The code initializes the ADC, characterizes it, reads the raw value of the LDR, converts it to voltage, and toggles the LED based on if the voltage is above or below the threshold.
This document is a correction for homework assignment 2 on programming C for embedded systems. It includes C code to read the value of a light dependent resistor connected to an analog pin and turn on an LED if the light level is below a threshold of 500. The code initializes the ADC, characterizes it, reads the raw value of the LDR, converts it to voltage, and toggles the LED based on if the voltage is above or below the threshold.