UART receiving problem
Posted: Tue Oct 05, 2021 2:11 am
I see all prints outside like
Now I want to receive a char from a terminal
and I put it in a loop
But I get nothing.
I test the RX pin with a scope and I see incoming signals on the pin.
What can be wrong?
Code: Select all
Serial.println("UDP OK");
Now I want to receive a char from a terminal
Code: Select all
void UART_Get()
{
char chr;
if (Serial.available() > 0)
{
chr = Serial.read();
//for debug
Serial.print(chr);
}
}
and I put it in a loop
Code: Select all
void loop()
{
UART_Get();
}
But I get nothing.
I test the RX pin with a scope and I see incoming signals on the pin.
What can be wrong?