Calibration for single yoke apparatus
This commit is contained in:
7
loadCellCode/CalibConsts.hpp
Normal file
7
loadCellCode/CalibConsts.hpp
Normal file
@@ -0,0 +1,7 @@
|
|||||||
|
#ifndef CONSTANTS_H
|
||||||
|
#define CONSTANTS_H
|
||||||
|
|
||||||
|
#define OFFSET 19532
|
||||||
|
#define SCALE 108.633064
|
||||||
|
|
||||||
|
#endif
|
||||||
@@ -6,6 +6,7 @@
|
|||||||
|
|
||||||
|
|
||||||
#include "HX711.h"
|
#include "HX711.h"
|
||||||
|
#include "CalibConsts.hpp"
|
||||||
|
|
||||||
HX711 myScale;
|
HX711 myScale;
|
||||||
|
|
||||||
@@ -24,14 +25,14 @@ void setup()
|
|||||||
Serial.println();
|
Serial.println();
|
||||||
|
|
||||||
myScale.begin(dataPin, clockPin);
|
myScale.begin(dataPin, clockPin);
|
||||||
myScale.set_offset(26784);
|
myScale.set_offset(OFFSET);
|
||||||
myScale.set_scale(106.557518);
|
myScale.set_scale(SCALE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop()
|
void loop()
|
||||||
{
|
{
|
||||||
// Serial.println(myScale.get_units());
|
Serial.println(myScale.get_units());
|
||||||
calibrate();
|
// calibrate();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user