Complete the code to start the ADC conversion.
ADC_StartConversion([1]);The ADC0 is the correct ADC module to start conversion for this sensor setup.
Complete the code to read the ADC value from the temperature sensor channel.
uint16_t tempValue = ADC_ReadChannel([1]);Channel 0 is connected to the temperature sensor, so reading from channel 0 gives the correct value.
Fix the error in the code to convert ADC value to temperature in Celsius.
float temperatureC = ([1] * 330.0) / 1023.0;
The variable tempValue holds the ADC reading from the temperature sensor and must be used for conversion.
Fill both blanks to read light sensor value and convert it to voltage.
uint16_t lightRaw = ADC_ReadChannel([1]); float lightVoltage = (lightRaw * [2]) / 1023.0;
The light sensor is connected to ADC channel 1, and the reference voltage is 3.3V for conversion.
Fill all three blanks to create a dictionary mapping sensor names to their converted values.
float sensorValues[] = {temperatureC, lightVoltage};
const char* sensorNames[] = {"Temp", "Light"};
for(int [1] = 0; [1] < 2; [1]++) {
printf("%s: %.2f\n", [2][[1]], [3][[1]]);
}Variable i is the loop counter, sensorNames holds the names, and sensorValues holds the values to print.