Part Number: TM4C1294NCPDT
Tool/software: TI C/C++ Compiler
I am working with the example echo_tcp of lwip, I have no problems in sending and receiving data but my goal is to send data from the ADC via ethernet, apparently I am not making the conversion correctly or maybe I am not understanding how to send it.
In my code below, it shows how I'm trying, I open a RAW session in putty and I can see the "echo" part working, but when I send the 'a', the buffer does not take anything, I added the UART to verify that it is doing the conversion, and in effect, in the serialt erminal shows my value converted to hexadecimal
if (tcp_buffer[0] == 'a'){
uint32_t adc1 =1054;
char yourstring[6];
snprintf(yourstring,strlen(yourstring) ,"%X04", adc1);
tcp_write( pcb, yourstring, strlen(yourstring), 0 );
tcp_sent( pcb, NULL );
UARTprintf(yourstring);
}
i would appreciate any guidance
Best