STM32 ADC easy implementation

Опубликовано: 27 Июль 2026
на канале: Steppe School
3,661
38

A short description how to configure and sample analog data using ADC .
STM32 Programming and Robotics Courses:
https://www.steppeschool.com/courses

The board I am using (NUCLEO-L476RG):
https://www.st.com/en/evaluation-tool...

A code that I used to sample data:
HAL_ADC_Start(&hadc1);
HAL_ADC_PollForConversion(&hadc1,1000);
x_axis_value = HAL_ADC_GetValue(&hadc1);
HAL_ADC_PollForConversion(&hadc1,1000);
y_axis_value = HAL_ADC_GetValue(&hadc1);
HAL_ADC_Stop(&hadc1);

0:00 Configuring ADC using the .ioc file
1:27 Writing a code to sample data
2:22 Debugging the code and monitoring the sampled data in real time