mirror of
https://github.com/xiaozhou233/RiverWaterQualityMonitoring.git
synced 2026-12-05 13:05:53 +08:00
更新UART数据传输格式,修改输出信息
This commit is contained in:
1 parent
8d356fb4b1
commit
18560c2402
1 file changed
+12
-8
@@ -126,16 +126,20 @@ int main(void)
|
||||
TURBIDITY_Calc(raw.turbidity, &tur);
|
||||
PH_Calc(raw.ph, &ph);
|
||||
|
||||
sprintf(uart_buf,
|
||||
"PH=%.2f;TDS=%.2f;TUR=%.2f\r\n",
|
||||
ph.ph,
|
||||
tds.tds,
|
||||
tur.ntu);
|
||||
sprintf(uart_buf,
|
||||
"UPLOAD:ph=%.2f;tds=%.2f;turbidity=%.2f\r\n",
|
||||
ph.ph,
|
||||
tds.tds,
|
||||
tur.ntu);
|
||||
|
||||
HAL_UART_Transmit(&huart3,
|
||||
(uint8_t*)uart_buf,
|
||||
strlen(uart_buf),
|
||||
100);
|
||||
HAL_UART_Transmit(&huart1,
|
||||
(uint8_t*)uart_buf,
|
||||
strlen(uart_buf),
|
||||
100);
|
||||
(uint8_t*)uart_buf,
|
||||
strlen(uart_buf),
|
||||
100);
|
||||
|
||||
HAL_Delay(500);
|
||||
/* USER CODE END WHILE */
|
||||
|
||||
Reference in new issue
Block a user