How fast in serial?

Hello, This is kind of related to a project i'm working on but feel it doesn't belong there. I was curious about how fast can i send data from the Pc to the arduino? I'm using a python script to send a Hello world from the Pc to an arduino uno?

Joseph

"Hello world" will go fast. It depends on the baud rate.

If this relates to your transfer of an image, you will have to implement a protocol. E.g. send 256 bytes from the PC, wait for an acknowledge indicating that the Arduino has processed the data, send the next 256 bytes etc.

There are standard protocols (I've forgotten the names) that are supported by terminal programs; you only (:smiley:) need to implement the Arduino side.

If your board uses the FTDI serial-to-usb converter (the only official Arduino is the Nano) you can use Xon/Xoff; it does not work for boards that use a different serial-to-usb converter and, from memory, it does not work on 32U4 based boards.

Sending Hello World➜ takes 12 bytes. At 115200 bauds you get roughly 11520 bytes per second so it would take a bit more than 1ms. At 1 million bauds it will take way less.(8.6 times faster)

Of course you better need to make sure the arduino on the other side is ready to deal with the influx of data (interrupts not disabled for example)

This is the real issue.
An inefficient protocol, or lack of receive buffer memory will make the bitrate less important.

1 Like

115200 baud is a good start.
See Serial Input Basics - updated for a tutorial how to read values.

interesting, Thank you @noiasca , @lastchancename , @J-M-L and @sterretje I think I got a better understanding now. Also yes @noiasca the baud rate I'm using will be 115200.

I’ve written a small tutorial on interfacing with Python. See Two ways communication between Python3 and Arduino

1 Like

@J-M-L Thank. I'm looking at it.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.