Every time I run my code, the robot freezes with the touch LED set to red. The robot becomes unresponsive, the program cannot be exited by pressing the X button, and the only way to turn off the robot is by taking out the battery. The brain displays no error message.
These are the only 2 blocks of code that set the touch LED.
Here’s my code: https://drive.google.com/file/d/1V4q2k7V1eP-ymJbWWryMPFhY1tOQpcwP/view?usp=sharing (I can’t upload it directly since I’m a new user.)
The code that sets the touch LED is in a loop. When running the code, sometimes the LED cycles between red and purple before freezing on red. Other times, the robot freezes immediately on red.
I have reproduced this error on another VEX IQ robot with the same configuration. Both robots have up-to-date firmware.
This issue has been really confusing for me. To those who see this thread, thank you so much in advance for your time and help!