Thank you but,If I use part of your code, for stop program still need press key....... int digital:: getch() { int r; unsigned char c; if ((r = read(0, &c, sizeof(c))) < 0) { return r; } else { return c; } } void digital::loop(int motor_pin_1, int motor_pin_2, char key) { unsigned long startTime; pr...