
Re: Touch Sensor not working?
For reference;
This particular issue was caused by the second while loop not having any braces to encapsulate which code it should control.
If there aren't any braces following a loop or if statement's condition, the loop or if statement will look for the next single line of code to 'control', in this case the 'motor[frontRightMotor] = 127;' command. So, instead of doing nothing while the touch sensor was pressed (which was the intention of the program, to have a 'wait until bump' command to start the program) the program would turn on the frontRightMotor at a power level of 127.
The correct code is:
_________________Check out our
Blog! And our
Facebook page!
Need help? Take a look at our
Wiki and our
Forums.I just met you,
And this is crazy,
But here's my code now,
So fix it, maybe? ~ Carly Rae Jepsen parody