Ok thank you!
There is much more, here is all of the code in my main. There is more in the robot-config and vex-h, it was all premade though when I loaded the file and connect the motor ports and such. Also, I don’t type in forums very much, so I hope this is what you meant by the `s.
Main:
#include "vex.h"
using namespace vex;
vex::motor RightFrontMotor = vex::motor(vex::PORT1);
vex::motor LeftFrontMotor = vex::motor(vex::PORT2);
void forwBack(){
RightFrontMotor.spin(fwd, -(Controller1.Axis3.position()), pct);
LeftFrontMotor.spin(fwd, (Controller1.Axis3.position()), pct);
}
void leftRight(){
LeftFrontMotor.spin(fwd, Controller1.Axis4.position(), pct);
RightFrontMotor.spin(fwd, Controller1.Axis4.position(), pct);
}
int main() {
// Initializing Robot Configuration. DO NOT REMOVE!
vexcodeInit();
while(1){
forwBack();
leftRight();
`vex::task::sleep(100);`
}
}
Sorry that the spacing is garbo, it won’t let me tab.
Here is the vex-h, I am unaware of what most of this is and I haven’t edited it:
#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "v5.h"
#include "v5_vcs.h"
#include "robot-config.h"
#define waitUntil(condition)
do {
wait(5, msec);
} while (!(condition))
#define repeat(iterations)
for (int iterator = 0; iterator < iterations; iterator++)
Here is the robot-config.h(Same as vex-h, haven’t edited):
using namespace vex;
extern brain Brain;
// VEXcode devices
extern motor frontRight;
extern motor frontLeft;
extern motor backRight;
extern motor backLeft;
extern controller Controller1;
void vexcodeInit( void );
Finally here is the robot-config.cpp
#include "vex.h"
using namespace vex;
using signature = vision::signature;
using code = vision::code;
brain Brain;
motor frontRight = motor(PORT1, ratio18_1, false);
motor frontLeft = motor(PORT2, ratio18_1, false);
motor backRight = motor(PORT3, ratio18_1, false);
motor backLeft = motor(PORT4, ratio18_1, false);
controller Controller1 = controller(primary);
bool RemoteControlCodeEnabled = true;
void vexcodeInit( void ) {
// nothing to initialize
}
Sorry for not having enough info in my first post, thank you for the help.