1#include "EnableInterrupt.h"
4#ifndef J_ENCODER_PWM_ABSOLUTE_PIN_CHANGE_H
5#define J_ENCODER_PWM_ABSOLUTE_PIN_CHANGE_H
26 JEncoderPWMAbsolutePinChange(
byte _encoderPin,
pwmSettings _ps,
bool _reverse =
false,
float _distPerCountFactor = 1.0,
unsigned long _velEnoughTime = 0,
unsigned long _velEnoughTicks = 0,
bool _resetAngleOnStart =
false, uint16_t _zeroPos = 0)
27 :
JEncoderPWMAbsolute(_encoderPin, _ps, _reverse, _distPerCountFactor, _velEnoughTime, _velEnoughTicks, _resetAngleOnStart, _zeroPos)
34 enableInterrupt(
encoderPin, _isrPointer, CHANGE);
reads a PWM signal from an absolute encoder
Definition JEncoderPWMAbsolute.h:23
byte encoderPin
Definition JEncoderPWMAbsolute.h:56
uses a pin change interrupt library to support more pins than attachInterrupt().
Definition JEncoderPWMAbsolutePinChange.h:13
void turnOffInterrupts()
disable interrupts and stop monitoring encoder
Definition JEncoderPWMAbsolutePinChange.h:36
JEncoderPWMAbsolutePinChange(byte _encoderPin, pwmSettings _ps, bool _reverse=false, float _distPerCountFactor=1.0, unsigned long _velEnoughTime=0, unsigned long _velEnoughTicks=0, bool _resetAngleOnStart=false, uint16_t _zeroPos=0)
sets pins and settings for reading the encoder
Definition JEncoderPWMAbsolutePinChange.h:26
void setUpInterrupts(void(*_isrPointer)(void))
set up pins and interrupts
Definition JEncoderPWMAbsolutePinChange.h:31
struct for holding parameters for reading PWM Absolute Encoders
Definition JEncoderPWMAbsolute.h:28