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

Stuck in endless while loop startmultiple() with _tare set to false #57

Closed
pvakharwala opened this issue Jan 2, 2021 · 4 comments
Closed

Comments

@pvakharwala
Copy link

I am trying to get data from 2 load cells but the startmultiple function returns some arbitrary value when _tare is set to false how shall I combat that? Also the while loop runs endlessly if I use the 2x load cell example.
Please help

@olkal
Copy link
Owner

olkal commented Jan 2, 2021

Hi!

If you set tare false in startmultiple function, the tare offset avlue will not be set and the output value without load will not be zero (it will be some number very far from zero). If you don't wish to let the startmultiple function calculate and set the tare offset, you can do it later in the loop, see example file, "send 't' from serial terminal", line no 87 in the 2x load cell example.

The endless loop issue under discribed circumstances has now been fixed in 1.2.6, thanks.

@pvakharwala
Copy link
Author

Hi!

If you set tare false in startmultiple function, the tare offset avlue will not be set and the output value without load will not be zero (it will be some number very far from zero). If you don't wish to let the startmultiple function calculate and set the tare offset, you can do it later in the loop, see example file, "send 't' from serial terminal", line no 87 in the 2x load cell example.

The endless loop issue under discribed circumstances has now been fixed in 1.2.6, thanks.

How can I set it manually like apply that offset value. Basically what is happening is I calibrate my sensor using the calibration sketch then I load my code and when it runs there is some value other than zero as you described. So will that value be same everytime the sensors and board powers on? And how shall I get that value and store it and use it in my code?

@olkal
Copy link
Owner

olkal commented Jan 3, 2021

Yes the output value will be aprox. the same ea time you start, but be aware that it may change a bit by temperature etc.
If you want to manually apply the zero offset value you first need to obtain the value like this:

  • start without any mass on the loadcell
  • run the function loadcell.tare() or loadcell.tareNoDelay() to calculate the zero offset value
  • run long zero_offset_val = loadcell.getTareOffset() and note the returned value zero_offset_val

You can now use this value to manually set the zero offset in your sketch: loadcell.setTareOffset(zero_offset_val)

@olkal
Copy link
Owner

olkal commented Feb 12, 2021

I’m closing this issue because it has been inactive for some time.
Please reopen if you still encounter this issue with the latest version, or if the postings in this thread don't solve your problem .
Thank you!

@olkal olkal closed this as completed Feb 12, 2021
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