Code Solutions

I am looking for the code solutions for the headache challenge - page 8.57 from the Inventor’s Guide (06/30/2005). I looked through the downloads page and could not find it there.

The Inventors Guide directs you to vexrobotics.com, which was hosted by Radio Shack, for solutions to challenges. When Radio Shack decided not to carry the Vex product line, they took their website down and no longer support it. All we were able to do is redirect people from that web site to our web site. Unfortunately, many things that were on the Radio Shack vexrobotics web site are not longer available, and therefore; we are unable to help on this issue. If anyone has these solutions, please email them to us ([email protected]) and we will post them for everyone.

I believe I may have solved one issue. The entire code needs to be inside one WHILE loop, so that the parameters for that loop are 1 == 1 (so the while loop continues until the power is turned off).,

For each turn in the maze, a separate IF / ELSE loop is required. The issue we had is that only the first loop was working. We found out that before each IF/ELSE loop, you must add a different bumper switch block…there will be four total in the routine.

We were also able to copy and paste the first IF/ELSE loop and only have to change two motor modules (left turn vs. right turn).

Something like this:

I/O
Variables
Begin
While (1 == 1)
set motor - initial move forward
set motor - initial move forward
bumper
if (bumper == 1)
set motor - continue moving forward
set motor - continue moving forward
else
set motors - to stop
wait
set motors - reverse
set motors - stop
set motors - turn
set motors - stop
different bumper
if (bumper == 1)

set motor - continue moving forward
set motor - continue moving forward
else
set motors - to stop
wait
set motors - reverse
set motors - stop
set motors - turn
set motors - stop

and so on…