If you guys could either give an answer with an explanation, or provide a link to where I can find the answer to my questions, that would be great!
- How is arcade code formed? Like what is the basic form of it? I know for tank drive you can just use the axis position like this(and modify the amount of power you get by dividing):
leftFront.spin(directionType::fwd, Controller1.Axis3.position()/1.25, pct);
leftBack.spin(directionType::fwd, Controller1.Axis3.position()/1.25, pct);
rightFront.spin(directionType::fwd, Controller1.Axis2.position()/1.25, pct);
rightBack.spin(directionType::fwd, Controller1.Axis2.position()/1.25, pct);
But how would arcade drive work? Could you use motor groups to make it easier to code? I mainly just don’t get the adding and subtracting part. Here’s a sample code I found:
leftFront.spin(vex::directionType::fwd, (Controller.Axis3.value() + Controller.Axis4.value()), vex::velocityUnits::pct);
leftBack.spin(vex::directionType::fwd, (Controller.Axis3.value() + Controller.Axis4.value()), vex::velocityUnits::pct);
rightFront.spin(vex::directionType::fwd, (Controller.Axis3.value() - Controller.Axis4.value()), vex::velocityUnits::pct);
rightBack.spin(vex::directionType::fwd, (Controller.Axis3.value() - Controller.Axis4.value()), vex::velocityUnits::pct);
- How would you make the drivetrain coast instead of brake? I don’t know if this code here will work:
leftFront.setBrake(brakeType::coast);
leftBack.setBrake(brakeType::coast);
rightFront.setBrake(brakeType::coast);
rightBack.setBrake(brakeType::coast);
and where I should put it(usercontrol, preautonomous, etc.)?
-
When building drivetrains or anything that requires a motor, should you just build it with the motor cap only and then attach the motor base later with rubber bands or zipties?
-
When attaching motors, should you screw both screws through the bearing into the motor or do only 1 screw through bearing and another directly into the motor? (apparently someone said that screwing 2 directly into the motor makes it easier for the motor to get loose…idk)
-
Apparently, the motor acts as one bearing so you only need 1 other bearing on the outer c channel? And would you put that bearing in the “deadspace” of the outer c channel? (to save space for screw joints)
-
HS or LS gears for screw joints? And how many holes wide(between the two c channels) is usually the best/average for screw joints?
thanks