D
D
Dyikot2021-05-18 08:30:21
C++ / C#
Dyikot, 2021-05-18 08:30:21

Why doesn't it translate to a new line in the terminal via uart? How to clear the terminal?

I work for Proteus.
And how else to clear the terminal?
And \r works.

uint8_t tr[8];
  for( int i=0;i<10;i++)
    {
      HAL_UART_Transmit(&huart1,(uint8_t*)"\n",3,100);
      sprintf(tr,"%i",i);
      HAL_UART_Transmit(&huart1,tr,3,100);
      HAL_Delay(500);
    }

60a350838bc09580041815.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wataru, 2021-05-18
@wataru

Try passing "%i\n" to sprintf.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question