Rotary-Dial/examples/dialtoserial/dialtoserial.ino

23 lines
376 B
C++

/**
* Print each digit over Serial as it is dialed.
* See the README for detailed documentation.
*/
#include "RotaryDialer.h"
#define PIN_READY D6
#define PIN_PULSE D5
RotaryDialer dialer = RotaryDialer(PIN_READY, PIN_PULSE);
void setup() {
Serial.begin(115200);
dialer.setup();
}
void loop() {
if (dialer.update()) {
Serial.println(dialer.getNextNumber());
}
}