-
Notifications
You must be signed in to change notification settings - Fork 4
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
Stability issue when sending many values #2
Comments
Hey, I never tried to sync more than 8 values or so at a time. I suspect some buffering issue is responsible for the lag. To know for sure I would need your Processing code and Arduino code to reproduce the problem. If you do provide it, please also tell me what Arduino board you are using and strip the Arduino code from anything that is hardware specific (because I obviously can not reproduce your hardware setup). |
There shouldn't be anything hardware specific in the attached code. I'm using an Arduino Uno (a chinese copy) but it seems to work just fine. Background info: |
Hey, I did not have time yet to try dig out an uno compatible board from the bottom of my hardware box but I had a quick glance at your code (nice code BTW): I did not state this explicitly in the documentation but you only ever should have one instance of a ValueReceiver and a ValueSender on each side. Otherwise they can interfere with each other. That also explains why 6 values work: then you probably had just one sender/receiver pair active. Please try using only one ValueSender<48> on the Arduino side and only one ValueReceiver on the Processing side and report back. What project are you working at? I am always interested in hearing how others use my library. |
Haha, thank you! I've tried with a ValueSender<48> earlier, but actually can't remember the exact result. I'm doing a Technology Specialization on my master in Technology based Business Development, and wanted to use the newest technology in stretch sensing available to make two use cases as commercial as possible. |
Great that it works now! 3-5Hz is not too fast though ... is it enough for your project? |
I managed to get the update rate fixed. I've rewritten the Arduino code to use an array, that I want to sync because I've implemented some smoothing using arrays. So far I've tried to do it manually like this: and like this:
Any ideas for how to do this a clever way? |
I did not completely understand what you did on the Arduino side with the arrays but it sounds cool! |
I actually already solved it by not receiving it as an array, but just normal integers and it works fine as long as you don't screw up the order of values. I just assumed that it had to be the same "int [name]" both for the Processing and the Arduino code, but figured it out because the names aren't transmitted, or I could have seen values and names in the Serial Monitor 😄 |
Exactly. We do not ever send names and only rely on the order! Great that you got it working! |
This is not related to this issue, |
Nice! Makes me happy that I could inspire you to improve upon my work! |
First, thanks for a great library.
I have 48 values that I want to sync from Arduino to Processing, and the sending works great.
But when I try to receive all 48 values in Processing the update speed is very slow - something like 10-15 seconds, but it varies a lot.
If I only try to sync 6 values the speed and stability is good.
Question 1:
Are there a number of maximum recommended values to be kept in sync?
Question 2:
Are there any ways to improve performance/stability?
The text was updated successfully, but these errors were encountered: