2023-02-14 21:16:47 +00:00

23 lines
424 B
C++

#include "Lewis.h"
Lewis Morse;
void setup() {
// single recieve (RX) and transmit (TX) pin (simplex)
// Lewis will switch the pin to OUTPUT as required to send
Morse.begin(9);
}
void loop() {
// call checkIncoming often enough to catch the incoming presses
Morse.checkIncoming();
if (Morse.available()) {
char c = Morse.read();
if (c == 'k') {
delay(100);
Morse.print("ok");
}
}
}