Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /* USER CODE BEGIN PV */
- char msg[10];
- uint16_t raw;
- /* USER CODE END PV */
- ...
- (main)
- while(1){
- HAL_ADC_Start(&hadc1);
- HAL_ADC_PollForConversion(&hadc1, HAL_MAX_DELAY);
- raw = HAL_ADC_GetValue(&hadc1); // polecam podzielić sobie tą zmienna np zeby była od 0 do 100 bo moze sb zmieniac wartosci
- sprintf(msg, "%hu\r\n", raw);
- //BSP_LCD_DisplayStringAtLine(0, (uint8_t*)msg); // zeby wyswietlic wartosc
- }
Advertisement
Add Comment
Please, Sign In to add comment