116 uint8_t tx[] = { 202,
_pin,
_pinMode,0x55,0x55,0x55,0x55,0x55 };
118 _sw.sendPacket(tx, rx);
119 Pulses = rx[5] + 256 * rx[6];
132 uint8_t tx[] = { 201,
_pin,
_pinMode,0x55,0x55,0x55,0x55,0x55 };
134 _sw.sendPacket(tx, rx);
147 uint8_t tx[] = { 202,
_pin,
_pinMode,0x55,0x55,0x55,0x55,0x55 };
149 _sw.sendPacket(tx, rx);
151 Pulses = rx[5] + 256 * rx[6];
220This class adds functionality that is specific to the SW18AB firmware in addition
221to generic SerialWombatPulseTimer functionality avaialble on all Serial Wombat chips
260 return _sw.sendPacket(tx);
@ PIN_MODE_PULSETIMER
(18)
SerialWombatPulseTimerUnits
Class for a Serial Wombat chip. Each Serial Wombat chip on a project should have its own instance.
This class name is depricated. Do not use for new development. Use SerialWombatChip instead.
SerialWombatPin(SerialWombatChip &serialWombatChip)
Instantiates a Serial Wombat Pin.
int16_t initPacketNoResponse(uint8_t packetNumber, uint8_t param0=0x55, uint8_t param1=0x55, uint8_t param2=0x55, uint8_t param3=0x55, uint8_t param4=0x55)
uint8_t pin()
Returns the current SW pin number. Used primarily for virtual calls by derived classes.
@ LOW_TIME
the pulse low time in uS. Update on each low to high transition.
@ PERIOD_ON_LTH_TRANSITION
The period of the pulse in uS, based on the previous high and low times, updated on low to high trans...
@ DUTYCYCLE_ON_HTL_TRANSITION
Duty cycle of the pulse as a ratio from 0 to 65535, updated on high to low transition.
@ PULSE_COUNT
The number of pulses that have occured since initialization. Updated on each high to low transition.
@ FREQUENCY_ON_HTL_TRANSITION
The frequency of the pulse in Hz, based on the previous high and low times, updated on high to low tr...
@ DUTYCYCLE_ON_LTH_TRANSITION
Duty cycle of the pulse as a ratio from 0 to 65535, updated on low to high transition.
@ PERIOD_ON_HTL_TRANSITION
The period of the pulse in uS, based on the previous high and low times, updated on high to low trans...
@ HIGH_TIME
The pulse high time in uS. Updated on each high to low transition.
@ FREQUENCY_ON_LTH_TRANSITION
The frequency of the pulse in Hz, based on the previous high and low times, updated on low to high tr...
int16_t configurePublicDataOutput(SerialWombatPulseTimer_18AB::publicDataOutput publicDataOutput)
SerialWombatPulseTimer_18AB(SerialWombatChip &serialWombat)
constructor for SerialWombatPulseTimer_18AB
uint8_t pin()
Facilitates multi-inheritance.
uint8_t swPinModeNumber()
Facilitates multi-inheritance.
void refreshHighCountsPulses()
void refresh()
Retreive the latest values for HighCounts, LowCounts, Pulses, and MeasurementOverflowOccured.
SerialWombatPulseTimer(SerialWombatChip &serialWombat)
Class constructor for SerialWombatPulseTimer.
int16_t begin(uint8_t pin, SerialWombatPulseTimerUnits units=SW_PULSETIMER_uS, bool pullUpEnabled=false)
Initialization routine for SerialWombatPulseTimer.
void refreshHighCountsLowCounts()
Retreive the High and Low counts from the Serial Wombat chip in a single transaction.
bool MeasurementOverflowOccurred
uint16_t readHighCounts()