File: C:\Users\597406\Documents\try2.
c
#pragma config(Sensor, in1,    linefollower,     sensorLineFollower)
#pragma config(Sensor, in2,    pot,              sensorPotentiometer)
#pragma config(Sensor, in3,    light,            sensorReflection)
#pragma config(Sensor, dgtl1, limit,             sensorTouch)
#pragma config(Sensor, dgtl2, bump,              sensorTouch)
#pragma config(Sensor, dgtl3, op,                sensorQuadEncoder)
#pragma config(Sensor, dgtl5, ultra,             sensorSONAR_inch)
#pragma config(Sensor, dgtl12, greenled,         sensorLEDtoVCC)
#pragma config(Motor, port10,             flash,          tmotorVexFlashlight, ope
#pragma config(Motor, port2,             rightmotor,     tmotorVex393_MC29, openLo
#pragma config(Motor, port3,             leftmotor,      tmotorVex393_MC29, openLo
#pragma config(Motor, port9,             servo,          tmotorServoStandard, open
//*!!Code automatically generated by 'ROBOTC' configuration wizard
/*
     Project Title:A3_1_2_Part1
     Team Members:Ronald Khong, Darren Lin, Victoria Chen
     Date: 2/4/2019
     Section:
     Task Description:
  */
task main()
{
while(1 ==1)
{
  if(SensorValue(bump)==1)//if bumpon
  {
     startMotor(leftmotor, 127); //motor starts at full
     wait(2);                     //goes for 2 sec
     stopMotor(leftmotor);        //left motor off
  }
  if(SensorValue(limit)==1)    //if limit on
  {
     startMotor(rightmotor, 127);       //right motor starts un fill
       wait(2);                   //waits 2
       stopMotor(rightmotor);     //STOPS RIGH MOTOR
  }
}
}
                                     Page 1 of 1