Merge remote-tracking branch 'origin/master' into refactor/class-abstraite-capteur
This commit is contained in:
@ -13,8 +13,8 @@ Program::Program(){
|
||||
|
||||
//////CAPTEUR/////
|
||||
this->ultrasonic = new Ultrason(ULTRA_SOUND_TRIGD, ULTRA_SOUND_ECHO, "10");//TODO: mettre la valeur en config
|
||||
|
||||
this->dht = new HumiTemp(DHTPIN, DHTTYPE, "20:30/60:80");//TODO: mettre la valeur en config
|
||||
|
||||
}
|
||||
|
||||
void Program::loop(){
|
||||
|
@ -1,16 +1,47 @@
|
||||
#ifndef TESTING
|
||||
|
||||
#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() {
|
||||
program = new Program();
|
||||
}
|
||||
|
||||
void loop() {
|
||||
program->loop();
|
||||
void loop(){
|
||||
// delay(500);
|
||||
Serial.println(balance->getValue());
|
||||
}
|
||||
|
||||
#endif
|
Reference in New Issue
Block a user