There seems to be an issue with the VexCode IQ Blocks. I have a simple DriveTrain with Gyro configured along with a touch LED and a Bumper. I have the code so that when I touch the touch LED, that the robot moves forward a certain number of distance and displays “Done”. If at any time, the bumper is pressed, then the drive stops.
This works if I don’t hit the bumper in the middle of driving. I can keep on hitting the touch LED over and over again and it will work. However, if I hit the bumper in the middle of driving, the touch LED thread gets stuck because it’s still waiting for it to move the complete distance. Therefore, I can not hit the touch LED again to get it to start working.
I’ve verified that if I manually move my robot to the right distance, I get the “Done” message and I can hit the touch LED again.
Thanks @sankeydd. So what’s the point with the drive forward for “10 inches” ? You have to time things to know the distance? Also what about turning? Turn right for 90 degrees. Do I need to time the turns too? It seems to me, there needs to be a way to break out of an event thread.
This would stop the driving until 5 turns of the wheel or if you push the EUp button. You could add in additional blocks in the OR to include as many conditions as you want. Simply nest the ORS until you have the desired number of spots.