cancel
Showing results for 
Search instead for 
Did you mean: 

terminal text colour

j g
Associate II
Posted on January 08, 2018 at 22:42

what is the correct vt100 code for changing the terminal text colour?

send_usart(0x1B);

send_usart('[');

send_usart(3);

send_usart(4);

send_usart('m');

2 REPLIES 2
Posted on January 09, 2018 at 00:38

send_usart(0x1B); send_usart('['); send_usart('3'); send_usart('4'); send_usart('m');

Or sent as a string

'\x1b[34m'

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
john doe
Lead
Posted on January 09, 2018 at 02:11

this works:

  char colorized[42] = ''\x1b[31;1m A \x1b[32;1m B \x1b[36;1m C \x1b[37;1m D\r\n'';

  HAL_UART_Transmit(&huart2, (uint8_t *)&colorized, 42, 0x00FF);0690X00000609CvQAI.png