Update encoder.java
This commit is contained in:
parent
c68329989d
commit
f66dbacc92
1 changed files with 4 additions and 1 deletions
|
@ -1,5 +1,8 @@
|
|||
DcMotor.setMode(DcMotor.RunMode.STOP_AND_RESET_ENCODER); // tare the encoder
|
||||
|
||||
DcMotor.setZeroPowerBehavior(DcMotor.ZeroPowerBehavior.BRAKE);
|
||||
// Position droite = 8 ticks
|
||||
// position initiale = 0 ticks
|
||||
// position allongée = - 16 ticks
|
||||
// in opMode:
|
||||
int pos_to_go = ...; // position to go
|
||||
DcMotor.setTargetPosition(pos_to_go); // set target position, the motor will run to this pos
|
||||
|
|
Loading…
Reference in a new issue