Tool/software: Code Composer Studio
Hi I need to write a code that tracks the number of times a switch has been pressed, and sends the number to PC in ASCII format at every 10 seconds. For examples, if Switch 1 has been pressed 21 times, the string that will be sent to PC at every 10 seconds is going to be “[21]”. I will start by creating a variable to serve as the count and making it's value increase with every button pressed, but I don't understand how ASCII can be used to send the info "21."