feat: création classe abstraite capteur #44
@ -1,47 +1,15 @@
|
|||||||
#ifndef TESTING
|
#ifndef TESTING
|
||||||
|
|
||||||
#include <Arduino.h>
|
#include <Arduino.h>
|
||||||
// #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() {
|
void setup() {
|
||||||
program = new Program();
|
program = new Program();
|
||||||
}
|
}
|
||||||
|
|
||||||
void loop() {
|
void loop() {
|
||||||
// delay(500);
|
program->loop();
|
||||||
Serial.println(balance->getValue());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
Loading…
x
Reference in New Issue
Block a user