Audio stuttering over serial #1805
-
I am brand new to arduino-audio-tools, and pretty new to microcontrollers in general. I am currently trying to generate a sine wave in python and pass it over serial to the arduino, then play it on a headphone. I believe I should have that working, but it is extremely choppy, cutting in and out multiple times a second. As a test, I have a modified version of the send-8bit-receive.ino example that outputs to a headphone and uses UART0, which is the one exposed over USB. It works as expected when bridging TX and RX. However, if I use a very simple python script to echo serial back out, it is still super choppy. Any idea what could be causing this? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
Try to measure the thruput that you can achieve via your connection. It can also be that your host is causing the choppiness, then you might need to add a buffer on the receiving size and fill it before you start. |
Beta Was this translation helpful? Give feedback.
-
No from the readme: Different Buffer Implementations for QueueStream |
Beta Was this translation helpful? Give feedback.
Try to measure the thruput that you can achieve via your connection.
From that you can calculate the max sample rate!
It can also be that your host is causing the choppiness, then you might need to add a buffer on the receiving size and fill it before you start.