add to mutch colis error
This commit is contained in:
parent
35ecce7d5d
commit
7b975bd9a9
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
|
|
||||||
BigNfcReader::BigNfcReader(){
|
BigNfcReader::BigNfcReader(){
|
||||||
Serial2.begin(115200,SERIAL_8N1,2,3);//TODO: mettre le port série en paramètre
|
Serial2.begin(115200, SERIAL_8N1, 16, 17);//TODO: mettre le port série en paramètre
|
||||||
this->pair = true;
|
this->pair = true;
|
||||||
this->trame = new std::vector<byte>();
|
this->trame = new std::vector<byte>();
|
||||||
}
|
}
|
||||||
|
@ -80,7 +80,8 @@ Program::Program() {
|
|||||||
this->servo = new ServoMotorComponent(2, 1, 1);
|
this->servo = new ServoMotorComponent(2, 1, 1);
|
||||||
this->servo->setDesiredPosition(Position::MIDDLE);
|
this->servo->setDesiredPosition(Position::MIDDLE);
|
||||||
this->grbl = new GRBL(STEPMOTOR_I2C_ADDR);
|
this->grbl = new GRBL(STEPMOTOR_I2C_ADDR);
|
||||||
this->outputReader = new BigNfcReader();
|
this->outputReader = new BigNfcReader();
|
||||||
|
this->outputReader->init();
|
||||||
Wire.begin(21, 22);
|
Wire.begin(21, 22);
|
||||||
grbl->init(STEPER_SPEED, STEPER_PAS, STEPER_ACC);
|
grbl->init(STEPER_SPEED, STEPER_PAS, STEPER_ACC);
|
||||||
struct WifiConfig wifi_c = {WIFI_SSID, WIFI_PASSWORD};
|
struct WifiConfig wifi_c = {WIFI_SSID, WIFI_PASSWORD};
|
||||||
@ -99,7 +100,12 @@ void Program::loop() {
|
|||||||
}
|
}
|
||||||
this->servo->refresh();
|
this->servo->refresh();
|
||||||
this->outputReader->refresh();
|
this->outputReader->refresh();
|
||||||
Serial.printf("Output colis number : ", this->outputReader->getNbTags());
|
Serial.println(this->outputReader->getNbTags());
|
||||||
|
|
||||||
|
if(this->outputReader->getNbTags() >= 2){
|
||||||
|
lcdScreen->set_nfc_message("To mutch colis number detected");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
String nfcId = this->nfcReader->ReadNfc();
|
String nfcId = this->nfcReader->ReadNfc();
|
||||||
//si qqc
|
//si qqc
|
||||||
|
Loading…
x
Reference in New Issue
Block a user