2018-01-08 01:42 PM
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');
2018-01-08 03:38 PM
send_usart(0x1B); send_usart('['); send_usart('3'); send_usart('4'); send_usart('m');
Or sent as a string
'\x1b[34m'
2018-01-08 05:11 PM
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);