Skip to content

Is it possible to send binary data (using Serial.write) to achieve better performance and feed more data with the same baud rate? #38

@Inversion-des

Description

@Inversion-des

If we calculate, what the baud rate needed if we send audio samples data at 10kHz from 12-bit analog pin using Serial.println on Windows:

  • Each sample will convert into 4 digits + 2 characters (\r\n) = 6 characters total = 6 bytes * 8 = 48 bits.
  • 10'000 samples/second × (48 bits + 2 (start and end)/sample) = 500'000 bits/second (needed baud rate).
    As we can see, the value is huge here…

With raw data it could be: 10'000 * (12+2) = 140'000 bits/second (baud rate)

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