 |
Serial Wombat Arduino Library
|
Go to the documentation of this file.
116 uint8_t tx[] = { 202,
_pin,
_pinMode,0x55,0x55,0x55,0x55,0x55 };
119 Pulses = rx[5] + 256 * rx[6];
132 uint8_t tx[] = { 201,
_pin,
_pinMode,0x55,0x55,0x55,0x55,0x55 };
147 uint8_t tx[] = { 202,
_pin,
_pinMode,0x55,0x55,0x55,0x55,0x55 };
151 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:235
Class for a Serial Wombat chip. Each Serial Wombat chip on a project should have its own instance.
Definition: SerialWombat.h:289
uint16_t readPulses()
Definition: SerialWombatPulseTimer.h:186
int16_t begin(uint8_t pin, SerialWombatPulseTimerUnits units=SW_PULSETIMER_uS, bool pullUpEnabled=false)
Initialization routine for SerialWombatPulseTimer.
Definition: SerialWombatPulseTimer.h:100
uint16_t HighCounts
Definition: SerialWombatPulseTimer.h:197
@ HIGH_TIME
The pulse high time in uS. Updated on each high to low transition.
Definition: SerialWombatPulseTimer.h:228
bool MeasurementOverflowOccurred
Definition: SerialWombatPulseTimer.h:211
SerialWombatChip & _sw
Definition: SerialWombatPin.h:163
@ 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:234
uint8_t pin()
Facilitates multi-inheritance.
Definition: SerialWombatPulseTimer.h:265
uint16_t readLowCounts()
Definition: SerialWombatPulseTimer.h:172
uint16_t readHighCounts()
Definition: SerialWombatPulseTimer.h:160
SerialWombatPulseTimerUnits
Definition: SerialWombatPulseTimer.h:35
@ PIN_MODE_PULSETIMER
(18)
Definition: SerialWombat.h:261
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:224
uint8_t _pinMode
Definition: SerialWombatPin.h:164
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:115
@ 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:231
uint8_t swPinModeNumber()
Facilitates multi-inheritance.
Definition: SerialWombatPulseTimer.h:267
@ SW_PULSETIMER_uS
Definition: SerialWombatPulseTimer.h:37
uint16_t LowCounts
Definition: SerialWombatPulseTimer.h:203
void refreshHighCountsPulses()
Definition: SerialWombatPulseTimer.h:145
void refresh()
Retreive the latest values for HighCounts, LowCounts, Pulses, and MeasurementOverflowOccured.
Definition: SerialWombatPulseTimer.h:112
SerialWombatPulseTimer_18AB(SerialWombatChip &serialWombat)
constructor for SerialWombatPulseTimer_18AB
Definition: SerialWombatPulseTimer.h:243
@ 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:1525
@ LOW_TIME
the pulse low time in uS. Update on each low to high transition.
Definition: SerialWombatPulseTimer.h:229
@ 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:236
uint8_t _pin
Definition: SerialWombatPin.h:162
void refreshHighCountsLowCounts()
Retreive the High and Low counts from the Serial Wombat chip in a single transaction.
Definition: SerialWombatPulseTimer.h:130
@ 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:233
@ 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:232
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)
Definition: SerialWombatPin.h:131
SerialWombatPulseTimer(SerialWombatChip &serialWombat)
Class constructor for SerialWombatPulseTimer.
Definition: SerialWombatPulseTimer.h:89
int16_t configurePublicDataOutput(SerialWombatPulseTimer_18AB::publicDataOutput publicDataOutput)
Definition: SerialWombatPulseTimer.h:256
publicDataOutput
Definition: SerialWombatPulseTimer.h:227
uint16_t Pulses
Definition: SerialWombatPulseTimer.h:210
@ PULSE_COUNT
The number of pulses that have occured since initialization. Updated on each high to low transition.
Definition: SerialWombatPulseTimer.h:230