// Dead Reckoning, T. Braunl UWA 2021
#include <eyebot.h>

int main()
{ int x, y, phi;

  LCDPrintf("Dead Reckoning Experiment\n");
  LCDMenu("STRAIGHT", "LEFT", "RIGHT", "END");
  while(1)
  { VWGetPosition(&x,&y,&phi);
    LCDPrintf("Position: (%d, %d) Angle: %d\n", x, y, phi);
    switch(KEYGet())
    { case KEY1: VWStraight(250, 125); VWWait(); break;
      case KEY2: VWTurn( 90, 45); VWWait(); break;
      case KEY3: VWTurn(-90, 45); VWWait(); break;
      case KEY4: return 0;
    }
  }
}
