As title goes,
I have
char temp = 128
I'm trying to send this value in temp through USART, which I have both functions
void usart_pstr(char *s) {
while (*s) {
usart_putchar(*s);
s++;
}
}
void usart_putchar(char data) {
while ( !(UCSR0A & (1<<UDRE0)) );
UDR0 = data;
}
But on the receiving end , the serial port program only takes strings. So I'm wondering how do I convert "temp" into string "128\0" (instead of whatever 128 corresponds to in ASCII table) ?