yup that was the problem. In the drive code, the drive motors are on pwms 1 and 2 and the camera also uses those outputs in the camera code. When I combined them I forgot to change the outputs for the drive motors. Man is my face red

... oh well at least it works now. Thank you everyone for your help.