cgnuino
CgnPause.cpp
1 
8 #include "Arduino.h"
9 #include "cgnuino.h"
10 
17 CgnPause::CgnPause(byte p, bool b, uint16_t c) {
18  pin = p;
19  stopwhen = b;
20  cycle = c;
21  pinMode(pin, INPUT_PULLUP);
22 }
23 
28  while(digitalRead(pin) == stopwhen) {
29  delay(cycle);
30  }
31 }
32 
void check()
Checks the designated digital-in pin for pausing.
Definition: CgnPause.cpp:27
CgnPause(byte, bool=LOW, uint16_t=100)
Constructor.
Definition: CgnPause.cpp:17