馬達控制
加入馬達
PROS
pros::Motor motor(MOTOR_PORT);pros::Motor motor1(1); // 數字代表port號碼
pros::Motor motor2(-2); // 負號表示反轉okapi::Motor motor(MOTOR_PORT);okapi::Motor motor1(1); // 數字代表port號碼
okapi::Motor motor2(-2); // 負號表示反轉控制馬達轉動
// move with specific voltage
motor.move_voltage(std::int32_t voltage);
// move with specific velocity
motor.move_velocity(std::int32_t velocity);
// move to a relative position
motor.move_relative(double position, std::int32_t velocity);
// move to an absolute position
motor.move_absolute(double position, std::int32_t velocity);
// 更多指令:https://pros.cs.purdue.edu/v5/api/cpp/motors.html#move-velocity// move with specific voltage
motor.moveVoltage(std::int32_t voltage);
// move with specific velocity
motor.moveVelocity(std::int32_t velocity);
// move to a relative position
motor.moveRelative(double position, std::int32_t velocity);
// move to an absolute position
motor.moveAbsolute(double position, std::int32_t velocity);
// 更多指令:https://okapilib.github.io/OkapiLib/classokapi_1_1AbstractMotor.html#ae811cd825099f2defadeb1b7f7e7764c設定馬達煞車模式
遙控底盤
基礎底盤控制Last updated