// EyeBot Demo Program: Drive back and forth for transport, T. Bräunl, Dec. 2020
#include "eyebot.h"

int main()
{ int id, senderID;
  char mes[10];

  RADIOInit();
  id = RADIOGetID();
  LCDPrintf("Driving robot ID %d\n", id);
  LCDPrintf("waiting for load ...\n");
  RADIOReceive(&senderID, mes, 10);
  LCDPrintf("received message from %d: %s\n", senderID, mes);
  // any message will start vehicle
 
  while (1)
  { VWStraight(1300, 150);  // 500mm at 150mm/sec
    VWWait();          // wait until completed
    OSWait(3000); // rest 3 sec
  
    VWStraight(-1300, 150);  // drive back
    VWWait();          // wait until completed
    OSWait(3000); // rest 3 sec
  }
}
