Swerve Drive Code

I am tryong to code a Vex swerve drive robot, (similar to this ) but the code that I am using does not work. The major problem is that the motors do not respond to the remote controller, rather they turn off and on continously.

Here is the code that just controls the forward and backward movement ,

void man (void)
    int rm  ''right motor
    int lm   ''left motor

    while (1 == 1)
       GetRx input = rm (channel 2, rx 1)
       GetRx input = lm (channel 3, rx 1)
       Set motor (2, rm );
       Set motor (3, lm );


dont mind the small code errors,

The microcontroller shows that it is not receiving any signal in this code from the remote control and the wheels turn off and on continously

If anyone could help me fix this code or give me the full code for the swerve robot, I would really appreciate it.



im not very good at programing and i may be wrong but you might have to put an if statement so if joystick =? moter go forward/backward
hope that helps but like i said im probably wrong

ok, when building a swerve robot for FTC (i ended up not doing it though),
i programmed the back 4 buttons to move the swerve buttons
and the front joysticks to move the motors, this is very comftorable and easy access controls

just my $0.02

Thats what I ended up doing, but does anyone no what is wrong with the code in the first post.


in easy C its
var = GetRxInput (rx, channel)

Dont mind the small errors, what is wrong overall?

oh shoot i cant believe i didnt see this

the int variables must be unsigned char, srry forgot about this

does this solve your problem?