diff --git a/config.ini b/config.ini index da29dee..133d750 100644 --- a/config.ini +++ b/config.ini @@ -22,7 +22,7 @@ build_flags = -D STEPER_ACC=200 ;-D STEPER_PAS=755.906 ; = 65mm -D STEPER_PAS=58 ; = 5mm - -D STEPER_SPEED=1000 ; 12000 + -D STEPER_SPEED=2700 ;1000 ; 2500 ;;;;;;;;;;;;;;;;;;;;;; ;;; App config ;;; ;;;;;;;;;;;;;;;;;;;;;; @@ -33,7 +33,10 @@ build_flags = ;;;;;;;;;;;;;;;;;;;;;; ;;; Servo config ;;; ;;;;;;;;;;;;;;;;;;;;;; - -D RIGHT_POS=18 - -D MIDDLE_POS=32 + -D RIGHT_POS=14 ;18 + -D MIDDLE_POS=30 ;32 -D LEFT_POS=52 - -D CONVOYER_LEN=150 ;mm + + + + -D CONVOYER_LEN=80 ;mm diff --git a/src/Program.cpp b/src/Program.cpp index 531af4e..a054b3c 100644 --- a/src/Program.cpp +++ b/src/Program.cpp @@ -78,6 +78,7 @@ Program::Program() { lcdScreen->add_log("Initialize M5LCD component...."); this->nfcReader = new NfcReader(NFC_ADDR); this->servo = new ServoMotorComponent(2, 1, 1); + this->servo->setDesiredPosition(Position::MIDDLE); this->grbl = new GRBL(STEPMOTOR_I2C_ADDR); Wire.begin(21, 22); grbl->init(STEPER_SPEED, STEPER_PAS, STEPER_ACC); @@ -156,4 +157,4 @@ void Program::loop() { this->grbl->mouveForward(5); } } -} \ No newline at end of file +}