c
int main(void)
{
MX_GPIO_Init();
MX_USART1_UART_Init();
MX_ADC1_Init();
printf("this is adc\n");
while (1)
{
// Start ADC for channel 1
HAL_ADC_Start(&hadc1);
while((hadc1.Instance->DR)==RESET);
temp1=HAL_ADC_GetValue(&hadc1);
printf("light adc=%d\n",temp1);
// Start ADC for channel 2
HAL_ADC_Start(&hadc2); // Assuming you have hadc2 for the second channel
while((hadc2.Instance->DR)==RESET);
temp2=HAL_ADC_GetValue(&hadc2);
printf("ht adc2=%d\n",temp2);