diff --git a/Core/Src/main.cpp b/Core/Src/main.cpp index 296939b..6eedf3a 100644 --- a/Core/Src/main.cpp +++ b/Core/Src/main.cpp @@ -126,12 +126,12 @@ main(void) HAL_ADC_PollForConversion(&hadc1, 100); //poll ADC1 periph, timeout 100ms rawValue = HAL_ADC_GetValue(&hadc1); - printf("The value is %hu volts.\r\n", rawValue); + printf("ADC raw value: %hu\r\n", rawValue); HAL_Delay(500); volts = ((float)rawValue / 4096) * 3; // convert to voltage from 0 to 3.0 - printf("The value is %f volts.\r\n", volts); + printf("Voltage: %fV\r\n", volts); HAL_Delay(500); @@ -139,7 +139,7 @@ main(void) __HAL_TIM_SET_COMPARE(&htim1, TIM_CHANNEL_1, duty); - HAL_Delay(100); + HAL_Delay(500); /* USER CODE END WHILE */ /* USER CODE BEGIN 3 */ diff --git a/uart.sh b/uart.sh new file mode 100755 index 0000000..9148c6b --- /dev/null +++ b/uart.sh @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +minicom -D /dev/ttyACM0 +