/*
 * combine-tests.c
 *
 * This program will demonstrate the usefulness of the && and || operators.
 * Further, it should demonstrate the need to gather all the sensor data you 
 * need before acting upon it.
 */

#include <MyroC.h>

int
main ()
{
  rConnect("/dev/rfcomm0");

  int leftIR  = rGetIRTxt ("left", 3);
  int rightIR = rGetIRTxt ("right", 3);
  
  if ( leftIR )
    rTurnRight (1, 1);
  else if ( rightIR )
    rTurnLeft (1, 1);
  
  rDisconnect();
  return 0;
}
