// A program to test motor code's interaction with kbhit(). #include #include #include "motors.h" #include "sonar.h" main() { Motors motors; Sonar sonar; motors.init(); printf("hit a key.\n"); while(!kbhit()); getch(); sonar.start(); printf("hit a key.\n"); while(!kbhit()); getch(); sonar.stop(); motors.halt(); }