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(); }