From 2fefc9f96d5ec3b05897f6ea1d08d2b457f0cbe6 Mon Sep 17 00:00:00 2001 From: Clement Date: Tue, 11 Apr 2023 12:54:53 +0200 Subject: [PATCH] feat: test capteur poids OK --- IOT/src/main.cpp | 43 ++++++++++++++++++++++++++++++++++++------- 1 file changed, 36 insertions(+), 7 deletions(-) diff --git a/IOT/src/main.cpp b/IOT/src/main.cpp index 14f34bd..a5531c1 100644 --- a/IOT/src/main.cpp +++ b/IOT/src/main.cpp @@ -1,12 +1,41 @@ #include -#include "Program.h" +// #include "Program.h" -Program* program; +// Program* program; + +// void setup() { +// program = new Program(); +// } + +// void loop() { +// program->loop(); +// } + + +#include "Balance.h" + +Balance *balance; + +void setup(){ + Serial.begin(MONITOR_SPEED); + balance = new Balance(14,15); + + Serial.print("start calibr : "); + balance->initCalibration(); + + Serial.println("OK"); + + // Serial.print("posé poids"); + // delay(5000); + // Serial.println("OK"); + // balance->calibration(500, MOYENNE_CALIBRATION); + // Serial.println("END calibration"); + + balance->setCalibrationFact(1077); -void setup() { - program = new Program(); } -void loop() { - program->loop(); -} +void loop(){ + // delay(500); + Serial.println(balance->getValue()); +} \ No newline at end of file