You forgot to disable motor safety.
Motor safety kills the robot if you don't pass an update to the motor often enough (if i remember correctly)
Just put this line:
Code:
myRobot.SetSafetyEnabled(false);
before this line:
Code:
while (isOperatorControl()){
This will disable the motor safety (not a bad thing in this case to keep your motors spinning and your code working)