SparkFun Forums 

Where electronics enthusiasts find answers.

What are we doing right with Artemis? What are we doing wrong? Let us know here!
User avatar
By joe5939
New to coding and really new to Artemis.

Is it possible to get the Artemis Open Log to read loads in pos and neg directions?

I can't get negative values from my load cell (SEN-14727 100gm bar and Qwiic Scale SEN-15242 ) and my Artemis Open Log DEV-16832. I can cheat it by adding weight during the zeroing step of the calibration and removing it when prompted to add it. In my case, zero load had a 260 output. Less than 260 was a load in one direction and more than 260 was a load in the opposite. I'd rather just carry a sign.

Is the source of my problem from line 190 on this code and how do I change that if possible: ... ensors.ino

As noob I can only understand the comment, not the code.
User avatar
By joe5939
Thank you. I ran across that page weeks ago and forgot about it. Though I am still a bit confused. I see a variable(?) listed on that page that I assume I need to change to "allowNegativeWeights = true". If that is the case where do I do that? Do I just type it into OLA setttings file? I don't see a prompt for it in the terminal window.

From tutorial:
float getWeight(bool allowNegativeWeights = false) - Once you've set zero offset and cal factor, you can ask the library to do the calculations for you. By default, negative weights will be returned as 0.
User avatar
By badepalle

Like Joe5939, I would like to be able to record negative values with a NAU7802.
Before I submit a request, did anything change since you had this discussion?


User avatar
By PaulZC
Ah. Regarding negative weights on the OLA - those are (still) currently not supported. It looks like a Feature Request issue was never opened. If you’re wanting to measure negative weights on OLA, please go ahead and open a Feature Request.

Best wishes,
 Topic permissions

You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum