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
Eden
January 12, 2020, 11:17pm
2
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)
Deicer
January 12, 2020, 11:21pm
3
there is no ‘backward’
I believe reverse is what you are looking for.
1 Like
Eden
January 12, 2020, 11:25pm
4
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