2018-05-13 11:37:02 +02:00
|
|
|
ADC Sensor
|
|
|
|
==========
|
|
|
|
|
|
|
|
Example Usage
|
|
|
|
-------------
|
|
|
|
|
|
|
|
.. code-block:: cpp
|
|
|
|
|
|
|
|
// Basic
|
|
|
|
App.make_adc_sensor("Analog Voltage", 13);
|
|
|
|
// Custom update interval 30 seconds
|
|
|
|
App.make_adc_sensor("Analog Voltage", 13, 30000);
|
|
|
|
// Custom pinMode
|
|
|
|
App.make_adc_sensor("Analog Voltage", GPIOInputPin(13, INPUT_PULLUP));
|
|
|
|
// ESP32: Attenuation
|
|
|
|
auto adc = App.make_adc_sensor("Analog Voltage", 13);
|
|
|
|
adc.adc.set_attenuation(ADC_11db);
|
|
|
|
|
2018-05-14 21:15:49 +02:00
|
|
|
.. cpp:namespace:: nullptr
|
2018-05-13 11:37:02 +02:00
|
|
|
|
|
|
|
See :cpp:func:`Application::make_adc_sensor`.
|
|
|
|
|
|
|
|
API Reference
|
|
|
|
-------------
|
|
|
|
|
|
|
|
.. cpp:namespace:: nullptr
|
|
|
|
|
|
|
|
.. doxygenclass:: sensor::ADCSensorComponent
|
|
|
|
:members:
|
|
|
|
:protected-members:
|
|
|
|
:undoc-members:
|