During driver control the intake is working fine. It works perfectly with the code during that section of the match. But during autonomous it doesn’t function at all. here is our code for autonomous
/*----------------------------------------------------------------------------*/
/* */
/* Module: main.cpp */
/* Author: VEX */
/* Created: Thu Sep 26 2019 */
/* Description: Competition Template */
/* */
/*----------------------------------------------------------------------------*/
// ---- START VEXCODE CONFIGURED DEVICES ----
// Robot Configuration:
// [Name] [Type] [Port(s)]
// Drivetrain drivetrain 7, 8, 9, 10
// Motor1 motor 1
// Motor2 motor 2
// Motor3 motor 3
// Motor4 motor 4
// Controller1 controller
// ---- END VEXCODE CONFIGURED DEVICES ----
#include "vex.h"
using namespace vex;
// A global instance of competition
competition Competition;
// define your global instances of motors and other devices here
/*---------------------------------------------------------------------------*/
/* Pre-Autonomous Functions */
/* */
/* You may want to perform some actions before the competition starts. */
/* Do them in the following function. You must return from this function */
/* or the autonomous and usercontrol tasks will not be started. This */
/* function is only called once after the V5 has been powered on and */
/* not every time that the robot is disabled. */
/*---------------------------------------------------------------------------*/
void pre_auton(void) {
// Initializing Robot Configuration. DO NOT REMOVE!
vexcodeInit();
Motor1.setVelocity(100,percent);
Motor2.setVelocity(100,percent);
Motor3.setVelocity(100,percent);
Motor4.setVelocity(100,percent);
// All activities that occur before the competition starts
// Example: clearing encoders, setting servo positions, ...
}
/*---------------------------------------------------------------------------*/
/* */
/* Autonomous Task */
/* */
/* This task is used to control your robot during the autonomous phase of */
/* a VEX Competition. */
/* */
/* You must modify the code to add your own robot specific commands here. */
/*---------------------------------------------------------------------------*/
void autonomous(void) {
Drivetrain.setDriveVelocity(50, percent);
Drivetrain.setTurnVelocity(50, percent);
Drivetrain.driveFor(forward, 18, inches);
Motor4.spinFor(forward, 2, seconds);
Motor2.spin(forward);
Motor3.spin(forward);// Won't spin (Needs fix)
Drivetrain.turnFor(left, 50, degrees);
Drivetrain.driveFor(forward, 3, inches);
Motor1.spin(forward);
Motor4.spin(forward);
wait(5, seconds);