From 942827b36f2aa3378e961b8f8f00a68024b66a28 Mon Sep 17 00:00:00 2001 From: pulipakaa24 Date: Tue, 2 Dec 2025 11:47:44 -0600 Subject: [PATCH] Calibration for single yoke apparatus --- loadCellCode/CalibConsts.hpp | 7 +++++++ loadCellCode/loadCellCode.ino | 9 +++++---- 2 files changed, 12 insertions(+), 4 deletions(-) create mode 100644 loadCellCode/CalibConsts.hpp diff --git a/loadCellCode/CalibConsts.hpp b/loadCellCode/CalibConsts.hpp new file mode 100644 index 0000000..2181273 --- /dev/null +++ b/loadCellCode/CalibConsts.hpp @@ -0,0 +1,7 @@ +#ifndef CONSTANTS_H +#define CONSTANTS_H + +#define OFFSET 19532 +#define SCALE 108.633064 + +#endif \ No newline at end of file diff --git a/loadCellCode/loadCellCode.ino b/loadCellCode/loadCellCode.ino index e5e3889..204dc99 100644 --- a/loadCellCode/loadCellCode.ino +++ b/loadCellCode/loadCellCode.ino @@ -6,6 +6,7 @@ #include "HX711.h" +#include "CalibConsts.hpp" HX711 myScale; @@ -24,14 +25,14 @@ void setup() Serial.println(); myScale.begin(dataPin, clockPin); - myScale.set_offset(26784); - myScale.set_scale(106.557518); + myScale.set_offset(OFFSET); + myScale.set_scale(SCALE); } void loop() { - // Serial.println(myScale.get_units()); - calibrate(); + Serial.println(myScale.get_units()); + // calibrate(); }