//Copy and paste this function into your main.c code. //Call this instead of NU32_WriteUART1 to write data //to the com port void NU32_WriteUART1Async(const char * str) { if (UARTTransmitterIsReady(UART1) ) { while(*str != '\0') { UARTSendDataByte(UART1,*str); ++str; } } } //add these global variable definitions to main.c //Use these as your kp and ki gains respectively float kp,ki; //replace the while loop in main with this code. while(1) { char buffer[100]; NU32_ReadUART1(buffer,99); sscanf(buffer,"%f %f",&kp,&ki); }