Skip to content
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

smooting any integer/float #14

Closed
bogus105 opened this issue Jun 18, 2018 · 2 comments
Closed

smooting any integer/float #14

bogus105 opened this issue Jun 18, 2018 · 2 comments

Comments

@bogus105
Copy link

Hi,
thank you for great piece of code!
i'm trying to flow meter based on popular hall effect flow sensors. The problem is for small flow rates the pulse frequency is pretty slow and thus noisy. Is your library able to handle variables instead of direct analog pin reading?
For example to make an object like that:
ResponsiveAnalogRead analog(measured_value, true);
where: measured_value can be any float or integer

What you think about it?
Rgds,
Bogi

@dxinteractive
Copy link
Owner

Hi, if you have a positive int then you can do that in a bit of a weird way, look at the "Using your own ADC" heading here: https://github.com/dxinteractive/ResponsiveAnalogRead/blob/master/README.md

For ints that go negative or floats, currently you can't, but I'm working on a version 2 and I'm planning on adding this ability, hopefully it won't be too much longer but I'm expecting that it's maybe a month away.

@bogus105
Copy link
Author

bogus105 commented Jul 3, 2018

Thank you for reply. Positive values only is ok. As I said in the first post i have a flow meter pulse train comming in and i'm averaging calculated flow measurement then i'd like to smooth the result integer. After it is smoothed i can make same math on it to make a float by multiplying/dividing by flow meter callibration factor. Can't wait for your version 2!:)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants