Files
2026-10-05 11:27:21 +02:00

32 lines
641 B
C++

#include "Keyboard.h"
#include "Pelican.h"
#include "TimerSet.h"
#include <cctype> // provides toupper()
static TimerSet theTimerSet;
int main() {
Keyboard kbd;
Pelican thePelican(30, 0);
char c = 0;
while (std::toupper(c) != 'Q') { // loop until 'Q' is pressed
while (!kbd.isCharAvail()) {
theTimerSet.pollAllTimers(); // no key press to process, poll the timers
}
c = kbd.getChar(); // get the character
if (c == ' ') {
// it's a space, so press the WAIT button
thePelican.press();
}
}
return 0;
}