feat: 2nd in site test

This commit is contained in:
Clement 2024-01-26 11:35:26 +01:00
parent 23258e2682
commit 3f77acd600
2 changed files with 9 additions and 5 deletions

View File

@ -22,7 +22,7 @@ build_flags =
-D STEPER_ACC=200 -D STEPER_ACC=200
;-D STEPER_PAS=755.906 ; = 65mm ;-D STEPER_PAS=755.906 ; = 65mm
-D STEPER_PAS=58 ; = 5mm -D STEPER_PAS=58 ; = 5mm
-D STEPER_SPEED=1000 ; 12000 -D STEPER_SPEED=2700 ;1000 ; 2500
;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;
;;; App config ;;; ;;; App config ;;;
;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;
@ -33,7 +33,10 @@ build_flags =
;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;
;;; Servo config ;;; ;;; Servo config ;;;
;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;
-D RIGHT_POS=18 -D RIGHT_POS=14 ;18
-D MIDDLE_POS=32 -D MIDDLE_POS=30 ;32
-D LEFT_POS=52 -D LEFT_POS=52
-D CONVOYER_LEN=150 ;mm
-D CONVOYER_LEN=80 ;mm

View File

@ -78,6 +78,7 @@ Program::Program() {
lcdScreen->add_log("Initialize M5LCD component...."); lcdScreen->add_log("Initialize M5LCD component....");
this->nfcReader = new NfcReader(NFC_ADDR); this->nfcReader = new NfcReader(NFC_ADDR);
this->servo = new ServoMotorComponent(2, 1, 1); this->servo = new ServoMotorComponent(2, 1, 1);
this->servo->setDesiredPosition(Position::MIDDLE);
this->grbl = new GRBL(STEPMOTOR_I2C_ADDR); this->grbl = new GRBL(STEPMOTOR_I2C_ADDR);
Wire.begin(21, 22); Wire.begin(21, 22);
grbl->init(STEPER_SPEED, STEPER_PAS, STEPER_ACC); grbl->init(STEPER_SPEED, STEPER_PAS, STEPER_ACC);