Need help with coding in vex coding studio

hi yall, im new to coding this year I need a little help with my auton heres what i got so far

leftDrive.spin(forward, 50, percent); rightDrive.spin(forward, 50, precent); wait(2,sec); leftDrive.stop(); rightDrive.stop();

leftDrive.spin(backward, 50, percent); rightDrive.spin(backward, 50, precent); wait(2,sec); leftDrive.stop(); rightDrive.stop();

I just need it to go backward for 2seconds then forward fro 2 seconds
I dont know if it works are not so it would be great if someone would verify

you cant really tell people to check your code . You just have to test and if it doesnt work , state how it is not working and show errors (if any)

there is no ‘backward’

I believe reverse is what you are looking for.

1 Like

yeah you could assign it to -50 speed so it will go reverse (backward)

The others are correct about the “backwards” part, and you misspelled percent on one or two of the lines. Otherwise it will work. Also, in the future… just run the code, and if it doesn’t work then come ask for a solution.

1 Like