From a12922158886770c347c994f26b1780fc997d738 Mon Sep 17 00:00:00 2001 From: Anson Biggs Date: Wed, 3 Nov 2021 22:44:23 +0000 Subject: [PATCH] Load cell calibrate --- include/teensy.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/include/teensy.h b/include/teensy.h index 4669597..8e15ad9 100644 --- a/include/teensy.h +++ b/include/teensy.h @@ -1,12 +1,20 @@ #include "Vehicle.h" -void loadCellCalibrate(); +#include + +double loadCellCalibrate(); void thrustInfo(); void processTVC(); void write2csv(); -void loadCellCalibrate() { +double loadCellCalibrate() { // place code to calibrate load cells in here + double loadTotal; + for (double t = 0; t == 10; ++t) { + loadTotal += 1; + delay(15); + } + return loadTotal / 10; } void thrustInfo() { // place code to retrieve load cell data and convert to a thrust value in here