![]() |
Serial Wombat Arduino Library
|
extends the SerialWombatPulseTimer class with SW18AB specific functionality More...
#include <SerialWombatPulseTimer.h>
Public Types | |
enum | publicDataOutput { HIGH_TIME = 0, LOW_TIME = 1, PULSE_COUNT = 2, PERIOD_ON_LTH_TRANSITION = 3, PERIOD_ON_HTL_TRANSITION = 4, FREQUENCY_ON_LTH_TRANSITION = 5, FREQUENCY_ON_HTL_TRANSITION = 6, DUTYCYCLE_ON_LTH_TRANSITION = 7, DUTYCYCLE_ON_HTL_TRANSITION = 8 } |
![]() | |
enum | Period { PERIOD_1mS = 0, PERIOD_2mS = 1, PERIOD_4mS = 2, PERIOD_8mS = 3, PERIOD_16mS = 4, PERIOD_32mS = 5, PERIOD_64mS = 6, PERIOD_128mS = 7, PERIOD_256mS = 8, PERIOD_512mS = 9, PERIOD_1024mS = 10 } |
enum | OutputValue { RAW = 0, FIRST_ORDER_FILTERED = 1, AVERAGE = 2 } |
enum | Transform { NONE = 0, SCALE_RANGE = 1, LINEAR_MXB = 2 } |
Public Member Functions | |
SerialWombatPulseTimer_18AB (SerialWombatChip &serialWombat) | |
constructor for SerialWombatPulseTimer_18AB More... | |
int16_t | configurePublicDataOutput (SerialWombatPulseTimer_18AB::publicDataOutput publicDataOutput) |
configures which measurement is the Public Data Output of this pin mode More... | |
uint8_t | pin () |
Facilitates multi-inheritance. More... | |
uint8_t | swPinModeNumber () |
Facilitates multi-inheritance. More... | |
![]() | |
SerialWombatPulseTimer (SerialWombatChip &serialWombat) | |
Class constructor for SerialWombatPulseTimer. More... | |
void | begin (uint8_t pin, SerialWombatPulseTimerUnits units=SW_PULSETIMER_uS, bool pullUpEnabled=false) |
Initialization routine for SerialWombatPulseTimer. More... | |
void | refresh () |
Retreive the latest values for HighCounts, LowCounts, Pulses, and MeasurementOverflowOccured. More... | |
void | refreshHighCountsLowCounts () |
Retreive the High and Low counts from the Serial Wombat chip in a single transaction. More... | |
void | refreshHighCountsPulses () |
Retreive the High counts and number of pulses Serial Wombat chip in a single transaction. More... | |
uint16_t | readHighCounts () |
Retreives the most recent Counts in the configured units for the most recent high pulse. More... | |
uint16_t | readLowCounts () |
Retreives the most recent Counts in the configured units for the most recent low pulse. More... | |
uint16_t | readPulses () |
Retreives the number of pulses. More... | |
![]() | |
SerialWombatPin (SerialWombatChip &serialWombatChip) | |
Instantiates a Serial Wombat Pin. More... | |
SerialWombatPin (SerialWombatChip &serialWombatChip, uint8_t pin) | |
Instantiates a Serial Wombat Pin. More... | |
uint16_t | readPublicData () |
Read the 16 Bit public data associated with this pin. More... | |
void | pinMode (uint8_t mode) |
Set pin to INPUT or OUTPUT. More... | |
void | pinMode (uint8_t mode, bool pullDown, bool openDrain) |
Set pin to INPUT or OUTPUT, with options for pull Ups and open Drain settings. More... | |
void | digitalWrite (uint8_t val) |
Set output pin High or Low. More... | |
int | digitalRead () |
Reads the state of the Pin. More... | |
uint16_t | writePublicData (uint16_t value) |
Write a 16 bit value to this pin. More... | |
uint8_t | pin () |
Returns the current SW pin number. Used primarily for virtual calls by derived classes. More... | |
uint8_t | swPinModeNumber () |
Returns the Mode number. Used primarily by derived classes to populate packet data. More... | |
![]() | |
SerialWombatAbstractProcessedInput (SerialWombatChip &sw) | |
Constructor for the SerialWombatAbstractScaledOutput Class. More... | |
int16_t | writeInverted (bool inverted) |
if enabled subtract the input value from 65535 before doing any other processing. More... | |
int16_t | writeFirstOrderFilteringConstant (uint16_t constant) |
Set a first order filtering constant to be applied to the signal Higher is heavier filtering. More... | |
int16_t | writeAveragingNumberOfSamples (uint16_t numberOfSamples) |
Set a number of samples to average for each update of the downstream signal. More... | |
int16_t | writeExcludeBelowAbove (uint16_t low, uint16_t high) |
Sets input value ranges which are discarded rather than processed. More... | |
int16_t | configureQueue (SerialWombatQueue *queue, Period period, bool queueHighByte=true, bool queueLowByte=true) |
Sets up the queueing feature for this pin mode. Queue must have been initialized prior to this queue. More... | |
int16_t | configureOutputValue (OutputValue outputValue) |
Configures whether the pin's public data value is averaged, filtered, or neither. More... | |
int16_t | writeTransformScaleRange (uint16_t min, uint16_t max) |
Scale incoming values to a range of 0 to 65535. More... | |
int16_t | writeTransformLinearMXB (int32_t m, int32_t b) |
Scale incoming values based on an mx+b linear equation. More... | |
int16_t | writeProcessedInputEnable (bool enabled) |
Enables or disables all input processing functions If disabled, the raw input value is placed directly in the pin's 16 bit public data buffer. More... | |
uint16_t | readMinimum (bool resetAfterRead=false) |
Retreive the maximum public data output value since the last call with reset= true. More... | |
uint16_t | readMaximum (bool resetAfterRead=false) |
Retreive the minimum public data output value since the last call with reset= true. More... | |
uint16_t | readAverage () |
Retreive the last completed averaged value. More... | |
uint16_t | readFiltered () |
Retreive the filtered value. More... | |
Additional Inherited Members | |
![]() | |
uint16_t | HighCounts = 0 |
Count in selected units of last retreived high pulse. More... | |
uint16_t | LowCounts = 0 |
Count in selected units of last retreived low pulse. More... | |
uint16_t | Pulses = 0 |
Count of last retreived pulses. More... | |
bool | MeasurementOverflowOccurred = false |
![]() | |
uint8_t | _pin = 255 |
SerialWombatChip & | _sw |
uint8_t | _pinMode = 0 |
extends the SerialWombatPulseTimer class with SW18AB specific functionality
This class adds functionality that is specific to the SW18AB firmware in addition to generic SerialWombatPulseTimer functionality avaialble on all Serial Wombat chips
SerialWombatPulseTimer_18AB::SerialWombatPulseTimer_18AB | ( | SerialWombatChip & | serialWombat | ) |
constructor for SerialWombatPulseTimer_18AB
serialWombat | reference to the SerialWombat chip on which the SerialWombatPulseTimer_18AB will run |
int16_t SerialWombatPulseTimer_18AB::configurePublicDataOutput | ( | SerialWombatPulseTimer_18AB::publicDataOutput | publicDataOutput | ) |
configures which measurement is the Public Data Output of this pin mode
This function sets what data is avaialble through the public data This function is only avaialble on the Serial Wombat 18AB chip
publicDataOutput | An enumerated type indicating what data to output |
|
inlinevirtual |
Facilitates multi-inheritance.
Implements SerialWombatAbstractProcessedInput.
|
inlinevirtual |
Facilitates multi-inheritance.
Implements SerialWombatAbstractProcessedInput.