-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Serial latency? #6
Comments
Hello,
so the problem is python? |
Looks like it's not as the latency varies depending on the arduino. e.g using the arduino nano every and the same code I get 1.5 ms instead of 15.5 ms.
|
You could also debug by mocking the arduino (maybe take a look at python serial tests: https://github.com/pyserial/pyserial/blob/master/test/handlers/protocol_test.py): https://github.com/balp/arduino-mock Did you had a look at the |
thanks very much I'm going to try that :) |
@Armandpl what was the fix you later on came to settle into? Did 'low_latency_mode' fix the issue for you or something else? |
@NaiveInvestigator old arduinos e.g the nano have a separate usb serial modem while newer versions such as the nano every have the modem included in the main chip. I don't know why but those are faster. The fix was switching to one of the newer chips, I choose a xiao samd21. |
Hello,
I'm curious to know what kind of latency you were getting and with which arduino?
I'm using a similar technique to try and communicate with my rotary inverted pendulum but I'm running into latency issues. It's taking a long time to send the command and get back an answer from the arduino. To be clear I'm not using this specific library but my code is really close.
Using an arduino nano it takes me 15.5 ms to send and then receive 8 bytes from pyserial. Using a nano every it is much faster and takes only 1.5 ms. I'm trying to investigate what's affecting the speed and to figure out if I've made a mistake somewhere.
Cheers
The text was updated successfully, but these errors were encountered: