UART receiving problem

jenya7
Posts: 7
Joined: Tue Jun 29, 2021 2:22 pm

UART receiving problem

Postby jenya7 » Tue Oct 05, 2021 3:15 pm

I see all prints outside like

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?

Who is online

Users browsing this forum: No registered users and 4 guests