-
Notifications
You must be signed in to change notification settings - Fork 124
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
Change number of samples on smooth average #12
Comments
Thanks, I'm glad you like it! First of all, the value that decides the number of samples is a definition, not a variable, hence it can not be changed after compilation. The scetch and the library files are compiled seperatly, and I'm not aware of any way to pass a value from the scetch that will affect the compilation of the library. You could make a way to pass a value in the scetch to reduce the numper of samples actually used by the library, but as the size of the declared dataset array directly affects memory usage it's not a good ida to declare a larger dataset array than you actually need. So the anwer is no, unless someone can come up with a way to do this without making the library more complicated to use, and without using more memory than neccesary. Olav |
Hi, I also would be interested in a way to change the number of samples: I am changing the speed on the fly and would like to adjust the number of samples together with the speed change. Would that be possible? |
Hi |
Thanks, that will help a lot! |
Hi! |
Hi! That helps, thanks a lot! And I can confirm that everything works well on the ADS1231. Just had to do new calibrations because the tare factor changed, but that's no problem at all. I just your old calibration sketch and modified it to give me filtered results, in case you are interested I copy it here:
|
First of all, congratulations for the library. This was the only one I used that managed to get data from multiple HX711 without any problem.
My question: is there a way to change the number of samples used for the smooth average without changing the library (HX711_ADC.h) itself? As far as I noticed there isn't any function to change this variable.
If there isn't indeed, would you accept it as a Pull Request?
The text was updated successfully, but these errors were encountered: