 |
Serial Wombat Arduino Library
|
Go to the documentation of this file.
104 uint8_t tx[] = { 200,
_pin,
_pinMode,pullUpEnabled,(uint8_t)units,0x55,0x55,0x55 };
118 uint8_t tx[] = { 202,
_pin,
_pinMode,0x55,0x55,0x55,0x55,0x55 };
121 Pulses = rx[5] + 256 * rx[6];
134 uint8_t tx[] = { 201,
_pin,
_pinMode,0x55,0x55,0x55,0x55,0x55 };
149 uint8_t tx[] = { 202,
_pin,
_pinMode,0x55,0x55,0x55,0x55,0x55 };
153 Pulses = rx[5] + 256 * rx[6];
@ DUTYCYCLE_ON_LTH_TRANSITION
Duty cycle of the pulse as a ratio from 0 to 65535, updated on low to high transition.
Definition: SerialWombatPulseTimer.h:237
Class for a Serial Wombat chip. Each Serial Wombat chip on a project should have its own instance.
Definition: SerialWombat.h:283
uint16_t readPulses()
Definition: SerialWombatPulseTimer.h:188
uint16_t HighCounts
Definition: SerialWombatPulseTimer.h:199
@ HIGH_TIME
The pulse high time in uS. Updated on each high to low transition.
Definition: SerialWombatPulseTimer.h:230
bool MeasurementOverflowOccurred
Definition: SerialWombatPulseTimer.h:213
SerialWombatChip & _sw
Definition: SerialWombatPin.h:134
@ 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...
Definition: SerialWombatPulseTimer.h:236
uint8_t pin()
Facilitates multi-inheritance.
Definition: SerialWombatPulseTimer.h:265
uint16_t readLowCounts()
Definition: SerialWombatPulseTimer.h:174
uint16_t readHighCounts()
Definition: SerialWombatPulseTimer.h:162
SerialWombatPulseTimerUnits
Definition: SerialWombatPulseTimer.h:35
@ PIN_MODE_PULSETIMER
(18)
Definition: SerialWombat.h:258
Describes a Serial Wombat Pin. Is base class for other pin modes.
Definition: SerialWombatPin.h:38
extends the SerialWombatPulseTimer class with SW18AB specific functionality / This class adds functio...
Definition: SerialWombatPulseTimer.h:226
uint8_t _pinMode
Definition: SerialWombatPin.h:135
A Class which uses a Serial Wombat pin to measure the length of a pulse high and low time.
Definition: SerialWombatPulseTimer.h:82
int sendPacket(uint8_t tx[], uint8_t rx[])
Send an 8 byte packet to the Serial Wombat chip and wait for 8 bytes back.
Definition: SerialWombat.cpp:114
@ 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...
Definition: SerialWombatPulseTimer.h:233
uint8_t swPinModeNumber()
Facilitates multi-inheritance.
Definition: SerialWombatPulseTimer.h:267
@ SW_PULSETIMER_uS
Definition: SerialWombatPulseTimer.h:37
uint16_t LowCounts
Definition: SerialWombatPulseTimer.h:205
void refreshHighCountsPulses()
Definition: SerialWombatPulseTimer.h:147
void refresh()
Retreive the latest values for HighCounts, LowCounts, Pulses, and MeasurementOverflowOccured.
Definition: SerialWombatPulseTimer.h:114
SerialWombatPulseTimer_18AB(SerialWombatChip &serialWombat)
constructor for SerialWombatPulseTimer_18AB
Definition: SerialWombatPulseTimer.h:245
@ SW_PULSETIMER_mS
Definition: SerialWombatPulseTimer.h:38
uint8_t pin()
Returns the current SW pin number. Used primarily for virtual calls by derived classes.
Definition: SerialWombatPin.h:121
This class name is depricated. Do not use for new development. Use SerialWombatChip instead.
Definition: SerialWombat.h:1519
@ LOW_TIME
the pulse low time in uS. Update on each low to high transition.
Definition: SerialWombatPulseTimer.h:231
@ DUTYCYCLE_ON_HTL_TRANSITION
Duty cycle of the pulse as a ratio from 0 to 65535, updated on high to low transition.
Definition: SerialWombatPulseTimer.h:238
uint8_t _pin
Definition: SerialWombatPin.h:133
void refreshHighCountsLowCounts()
Retreive the High and Low counts from the Serial Wombat chip in a single transaction.
Definition: SerialWombatPulseTimer.h:132
@ 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...
Definition: SerialWombatPulseTimer.h:235
void begin(uint8_t pin, SerialWombatPulseTimerUnits units=SW_PULSETIMER_uS, bool pullUpEnabled=false)
Initialization routine for SerialWombatPulseTimer.
Definition: SerialWombatPulseTimer.h:100
@ 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...
Definition: SerialWombatPulseTimer.h:234
SerialWombatPulseTimer(SerialWombatChip &serialWombat)
Class constructor for SerialWombatPulseTimer.
Definition: SerialWombatPulseTimer.h:89
int16_t configurePublicDataOutput(SerialWombatPulseTimer_18AB::publicDataOutput publicDataOutput)
Definition: SerialWombatPulseTimer.h:258
publicDataOutput
Definition: SerialWombatPulseTimer.h:229
uint16_t Pulses
Definition: SerialWombatPulseTimer.h:212
@ PULSE_COUNT
The number of pulses that have occured since initialization. Updated on each high to low transition.
Definition: SerialWombatPulseTimer.h:232