dd

Dependencies:   xtoff2 RF24Network mbed

Fork of xtoff3 by pieter Berteloot

Committer:
gimohd
Date:
Wed Sep 05 07:50:27 2018 +0000
Revision:
16:691649d8a3da
test

Who changed what in which revision?

UserRevisionLine numberNew contents of line
gimohd 16:691649d8a3da 1 #ifndef LoadCell_h
gimohd 16:691649d8a3da 2 #define LoadCell_h
gimohd 16:691649d8a3da 3
gimohd 16:691649d8a3da 4 #include "mbed.h"
gimohd 16:691649d8a3da 5 #include "Maths.h"
gimohd 16:691649d8a3da 6
gimohd 16:691649d8a3da 7 class LoadCell
gimohd 16:691649d8a3da 8 {
gimohd 16:691649d8a3da 9 private:
gimohd 16:691649d8a3da 10 AnalogIn ain;
gimohd 16:691649d8a3da 11 int SAMPLE_AMOUNT;
gimohd 16:691649d8a3da 12 float CALIBRATION_MASS;
gimohd 16:691649d8a3da 13 float TARE_VALUE;
gimohd 16:691649d8a3da 14 float CALIBRATION_VALUE;
gimohd 16:691649d8a3da 15 float OFFSET;
gimohd 16:691649d8a3da 16 float DOWN_OFFSET;
gimohd 16:691649d8a3da 17
gimohd 16:691649d8a3da 18
gimohd 16:691649d8a3da 19 public:
gimohd 16:691649d8a3da 20 LoadCell(PinName pin);
gimohd 16:691649d8a3da 21 float analogRead();
gimohd 16:691649d8a3da 22 float simpleAnalogRead();
gimohd 16:691649d8a3da 23 float calculateMass(float value);
gimohd 16:691649d8a3da 24 float tare();
gimohd 16:691649d8a3da 25 float tareDown();
gimohd 16:691649d8a3da 26 float callibrate();
gimohd 16:691649d8a3da 27 float mass();
gimohd 16:691649d8a3da 28 float simpleMass();
gimohd 16:691649d8a3da 29 void setCalibrationMass(int);
gimohd 16:691649d8a3da 30 void setSampleAmount(int);
gimohd 16:691649d8a3da 31
gimohd 16:691649d8a3da 32 };
gimohd 16:691649d8a3da 33
gimohd 16:691649d8a3da 34 #endif
gimohd 16:691649d8a3da 35
gimohd 16:691649d8a3da 36
gimohd 16:691649d8a3da 37
gimohd 16:691649d8a3da 38
gimohd 16:691649d8a3da 39