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
#225393
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:
https://github.com/sparkfun/OpenLog_Art ... ensors.ino

As noob I can only understand the comment, not the code.
User avatar
By joe5939
#225398
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.
 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

long long title how many chars? lets see 123 ok more? yes 60

We have created lots of YouTube videos just so you can achieve [...]

Another post test yes yes yes or no, maybe ni? :-/

The best flat phpBB theme around. Period. Fine craftmanship and [...]

Do you need a super MOD? Well here it is. chew on this

All you need is right here. Content tag, SEO, listing, Pizza and spaghetti [...]

Lasagna on me this time ok? I got plenty of cash

this should be fantastic. but what about links,images, bbcodes etc etc? [...]