Vex marble coding
void spin(encoder){ startmotor(spinnermotor, 70); untilEncoderCount(encoder, spinnerEncoder); stopmotor(spinnermotor); startMotor(secondmotor, -40); untilEncoderCount(-135, firstEncoder); stopMotor(secondmotor); wait(2); startMotor(secondmotor, 40); untilEncoderCount(-90, firstEncoder); stopMotor(secondmotor); } task main { int ButtonIsPressed; ButtonIsPressed=0; turnFlashlightOn(flashlight); if (SensorValue[StartButton]==1) { ButtonIsPressed=1; startMotor(firstmotor, -40); untilEncoderCount(90, firstEncoder); stopMotor(firstmotor); startMotor(secondmotor, 40); untilEncoderCount(-90, firstEncoder); stopMotor(secondmotor); } if (SensorValue[EmergencyButton]==1) { ButtonIsPressed=0;