Skip to content

Arduino Mega2560 - RX pin lose bytes #20

Description

@zxia545

I have config 15 Analog pin to be analog input pin and then I found sometime Arduino did not received correct message that I sent from Python. (I have verified the message send from python is correct)
It seems like a problem with continue reporting back analog pins and digital pins from TX back to python. The RX sometime will lose few bytes.

So, I used oscilloscope to monitor RX pin from Arduino, and sending [0x91, 0x40, 0x01] and [0x91, 0x00, 0x01] each 0.5 second. But sometimes it will drop the last or last two bytes.
MicrosoftTeams-image (2)

This problem can be solved by changing the baud rate from 115200 to 9600, but then for those pins be config as analog input become a problem since the baud rate is dropping. Another way to hide this issue is only setting one or two pins to be analog input pin.

I also try to use an external USB to TTL converter to bypass this issue, it kind of fix the RX issue but the data sending back from Arduino to python is not correct at using the original USB to TTL converter micro in Arduino.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions