Graph is not displaying correctly
- December 26, 2022
- 3 replies
- 1924 views
Receiving data by UART and display it by TOUCHGFX cause some lost data in my screen, graph is not displayed correctly.
There are 2 boards one which is been receiving the signals by sensors and the second one is LCD board which has been configured by TOUCHGFX.
I want to receive data by UART from the first board and show them in LCD.
But some graph is not shown correctly.
Here is the code:
```
HAL_UART_Receive_IT(&huart1,(uint8_t*)RxBuf,20);
HAL_UART_RxCpltCallback(&huart1);
HAL_Delay(1);
```
I put ```HAL_Delay(1); ``` in order to receive data correctly but it does not make sense.
And the data shown by graph:
```
if(i<123){
dynamicGraph1.addDataPoint(RxBuf[1]+25);
}else
i=0;
```
Note : in image, the first graph is displaying by UART and as you see suddenly a drop appears... and I don't know how to solve it, and the second graph (from above) is the correct signal.
How can I solve it?
Thanks again.
