ArduinoBasicIO
1.0
Make basic operations with Arduino easier
|
#include <PulseTrainDetector.h>
Public Member Functions | |
void | setExpectedPulses (uint8_t pulses) |
void | setDelays (unsigned int minDelay, unsigned int maxDelay) |
void | initDetector (uint8_t pulsePin, uint8_t pulseOnLevel) |
boolean | pulseTrainDetected () |
Additional Inherited Members | |
![]() | |
SwitchedInput () | |
SwitchedInput (uint8_t pin, uint8_t onLevel=true) | |
void | initInput (uint8_t pin, uint8_t onLevel=true) |
virtual bool | isOn () |
virtual bool | isOff () |
![]() | |
uint8_t | lastInput |
Detects pulses dinamically. This are not full pulses it just detects the exact desired number of pulses at pulse level with a period between DEFAULT_MIN_DELAY and DEFAULT_MAX_DELAY. TODO improve
|
inline |
Inits detector
pulsePin | Digital pin number for pulses input |
pulseOnLevel | Digital level to consider ON [0,1] |
|
inline |
Checks if a pulse train is detected
|
inline |
Sets delays between pulses. Pulses must occur between these values.
minDelay | Minimum delay between pulses |
minDelay | Maximum delay between pulses. |
|
inline |
Sets the number of pulses to search