SensESP 2.7.2
Universal Signal K sensor toolkit ESP32
|
A transform that takes the output of an analog-to-digital converter and outputs the voltage that went into it. (This can be the built-in ADC on the ESP, or it can be an external ADC like the ADS1015/1115.) More...
#include <sensesp/transforms/analogvoltage.h>
Additional Inherited Members | |
Static Public Member Functions inherited from sensesp::TransformBase | |
static const std::set< TransformBase * > & | get_transforms () |
Static Public Member Functions inherited from sensesp::Startable | |
static void | start_all () |
Public Attributes inherited from sensesp::Configurable | |
const String | config_path_ |
Protected Member Functions inherited from sensesp::Configurable | |
virtual void | load_configuration () |
Protected Attributes inherited from sensesp::Configurable | |
String | description_ = "" |
int | sort_order_ = 1000 |
Protected Attributes inherited from sensesp::ValueProducer< P > | |
P | output |
A transform that takes the output of an analog-to-digital converter and outputs the voltage that went into it. (This can be the built-in ADC on the ESP, or it can be an external ADC like the ADS1015/1115.)
It can also be used like the Linear transport since it has a multiplier and an offset.
If you don't need to use the mulitplier or offset, you probably don't need this transform, because the AnalogInput sensor now has the ability to output the original voltage that came into it, using its output_scale
parameter.
max_voltage | is the maximum voltage allowable on the Analog Input pin of the microcontroller, which is 3.3V on most ESP's, but only 1.0V on some. |
multiplier | The raw output of the transform is multiplied by multiplier. Default value is 1.0, so it does nothing if you don't change it. |
offset | Added to (or subtracted from, if it's negative) the value after multiplier has been applied. Default value is 0.0, so it does nothing if you don't change it. |
config_path | The path in the Config UI to configure this transform. |
Definition at line 41 of file analogvoltage.h.
|
overridevirtual |
Returns a configuration schema that specifies the key/value pairs that can be expected when calling get_configuration(), or are expected by set_configuration(). The schema will be in JSON Schema format
Reimplemented from sensesp::Configurable.
Definition at line 34 of file analogvoltage.cpp.
|
overridevirtual |
Returns the current configuration data as a JsonObject. In general, the current state of local member variables are saved to a new object created with JsonDocument::as<JsonObject>() and returned.
Reimplemented from sensesp::Configurable.
Definition at line 19 of file analogvoltage.cpp.
|
overridevirtual |
Sets the current state of local member variables using the data stored in config.
Reimplemented from sensesp::Configurable.
Definition at line 36 of file analogvoltage.cpp.