This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

I cannot print the error value correctly in the LCD received from the motor controller using the UART protocol.

I am writing a code to receive the UART protocol transmitted from the motor controller and I am decoding the accepted protocol as speed, voltage and error using arrays. The received protocol is in continuous mode so, I captured them in another buffer to keep them constant. When I am receiving an error, suppose when error = 11, I am getting 10 or 00 like that. How to get the correct value. Here are some references.

Help me in completing this.

 This is the code I wrote.

0