void initMotors(void) { /*********************************************************** * Motor initializations: * param1,2,3,4: * 1,2 - initialize PWM signals on pin PARAM1,PARAM2 * 3 - boolean to set brake mode on/off * 4 - invert motor directions (when motors face opposite * directions) * * Source: RASLib/src/motor.c ************************************************************/ motors[0] = InitializeMotor(PIN_B7, PIN_B6, true, false); motors[1] = InitializeMotor(PIN_E5, PIN_E4, true, false); }
void initWheels(void) { motors[LEFT_WHEEL_MOTOR] = InitializeMotor(LEFT_PIN1, LEFT_PIN2, true, false); motors[RIGHT_WHEEL_MOTOR] = InitializeMotor(RIGHT_PIN1, RIGHT_PIN2, true, false); wheelsInitialized = true; }