You have two while loops, the first runs but the second never gets to run. Both commands should be in the same while loop. Also it should just be while(true) or while (1), I’m not sure what while(2) or while (3) will do.
Also, you are missing the comma between joystick value and units
could you possibly be kind enough to just code the tank drive and send it here. i know that is kind of asking for a lot but i have a competition tomorrow.
@Jared_Stark you have the general idea down. You don’t anyone else to code it for you.
Here are some steps
Just put the drive code in 1 while loop.
There should be commas like @Deicer said between value() and velocityUnits
The error you are getting is that you have an extra curly brace. Every curly brace should be in a pair. The error is that you have an extraneous (extra) closing brace. So make sure every curly brace has its pair, and no more.
@Jared_Stark, from what I have seen here, you seem to not be fully understanding how the “while( )” statement functions. This statement will run the code between the braces as long as the comparison in the parentheses is true. For example…
int x = 1;
while(x <= 5){
x = x + 1;
}
This code will run until the number x is six. After the loop finishes, the next lines of code can be run. For a driver control code you want the loop to never stop, so you can declare the loop to be always running by using…
while(true){
"driver control code"
}
Your code you presented should not have two while loops as the first loop will run forever and never allow the second loop to execute.