Vex Motor Code, need help

3.3V power and ground going out of frame to something.

A 5V level output pin going out of frame to something.

Red and black wires coming in frame from something going to something.

I'm afraid I can't even begin to venture a guess as to what might be going wrong based on that. I can see that you have an R3 with wires attached to it but that's about it.

A picture that showed where all those wires were going would be a better start. A schematic showing the same would be great.