#pragma config(Sensor, S1,     ltouch,              sensorTouch)
#pragma config(Sensor, S2,     rtouch,              sensorTouch)

//*!!Code automatically generated by 'ROBOTC' configuration wizard               !!*//

// Remote Control - Master

#include "XbeeTools.h"

task main()
{
  InitRS485();

  while(true)
  {
    if (SensorValue(rtouch) == 1)

      SendString("R1 FwdR"); //fwd right motor

    else
      SendString("R1 OffR");  // off right motor


    if (SensorValue(ltouch) == 1)

      SendString("R1 FwdL");   // fwd right motor

    else

      SendString("R1 OffL");   //off right motor


    wait1Msec(50);

  }

}
