Skip to content

Missing data when reading from USART on Arduino Uno #664

@katediadechko

Description

@katediadechko

I'm trying to buffer USART data before processing it on Arduino Uno. The modified test can be found here.
The test reads the input in 10-byte chunks (or until EOL) and prints the chunks back.
Somehow, the data gets missing after the first chunk. For instance, here are two inputs and the corresponding results.

Hello from Arduino!
01234567890123456789
Got 0123456789
Got 01
abcdefghijklmnopqrstuvwxyz
Got abcdefghij
Got klxyz
Got

I translated the test into an Arduino sketch, and it seems to work just as expected - the device prints 10-byte chunks plus \r, \n.

Hello from Arduino!
Got 0123456789
Got 0123456789
Got 
Got 
Got abcdefghij
Got klmnopqrst
Got uvwxyz
Got 

I can imagine that my Rust code is not correct. Will highly appreciate any help.

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