add debug poids
This commit is contained in:
parent
922d6e85f0
commit
107ca935b8
@ -41,13 +41,14 @@ boolean Balance::calibration(int poidsRef,int moyenne_calibration) {
|
||||
}
|
||||
|
||||
String Balance::read() {
|
||||
|
||||
int sortie = (int)this->capteur->get_units();
|
||||
this->full = sortie > this->fullVall.toInt();
|
||||
if (this->initialized == true) {
|
||||
return String(this->capteur->get_units());
|
||||
return String(sortie);
|
||||
} else {
|
||||
return "0";
|
||||
}
|
||||
}
|
||||
}//TODO: update isfull
|
||||
|
||||
bool Balance::tar(int val){
|
||||
this->initialized = true;
|
||||
|
@ -14,7 +14,7 @@ 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
|
||||
this->balance = new Balance(POID_DOUT,POID_SCK,"500");//TODO: mettre la valter en donfig
|
||||
this->balance = new Balance(POID_DOUT,POID_SCK,"100");//TODO: mettre la valter en donfig
|
||||
this->balance->tar(1077);
|
||||
}
|
||||
|
||||
@ -28,12 +28,14 @@ void Program::loop(){
|
||||
Serial.println(this->ultrasonic->isFull()?" true":" false");
|
||||
|
||||
//this->api->sendValue(humitemp, TRASHCAN_TWO, this->dht->getValType(), this->dht->isFull());
|
||||
Serial.print("humiTemp = " + this->dht->read());
|
||||
Serial.print("humiTemp = " + humitemp);
|
||||
Serial.println(this->dht->isFull()?" true":" false");
|
||||
|
||||
//this->api->sendValue(poid, TRASHCAN_TWO, this->balance->getValType(), this->balance->isFull());
|
||||
Serial.print("humiTemp = " + this->dht->read());
|
||||
Serial.println(this->dht->isFull()?" true":" false");
|
||||
Serial.print("poid = " + poid);
|
||||
Serial.println(this->balance->isFull()?" true":" false");
|
||||
|
||||
Serial.println();
|
||||
|
||||
delay(1000);
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user