Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] ADC and Timer API Update (+some docs fixes) #7906

Merged
merged 5 commits into from
Apr 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 3 additions & 50 deletions docs/source/api/adc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -30,20 +30,20 @@ This function is used to get the ADC raw value for a given pin/ADC channel.

* ``pin`` GPIO pin to read analog value

This function will return analog raw value.
This function will return analog raw value (non-calibrated).

analogReadMillivolts
^^^^^^^^^^^^^^^^^^^^

This function is used to get ADC value for a given pin/ADC channel in millivolts.
This function is used to get ADC raw value for a given pin/ADC channel and convert it to calibrated result in millivolts.

.. code-block:: arduino

uint32_t analogReadMilliVolts(uint8_t pin);

* ``pin`` GPIO pin to read analog value

This function will return analog value in millivolts.
This function will return analog value in millivolts (calibrated).

analogReadResolution
^^^^^^^^^^^^^^^^^^^^
Expand All @@ -62,19 +62,6 @@ Range is 1 - 16 .The default value will be used, if this function is not used.

* ``bits`` sets analog read resolution

analogSetClockDiv
^^^^^^^^^^^^^^^^^

This function is used to set the divider for the ADC clock.

Range is 1 - 255. Default value is 1.

.. code-block:: arduino

void analogSetClockDiv(uint8_t clockDiv);

* ``clockDiv`` sets the divider for ADC clock.

analogSetAttenuation
^^^^^^^^^^^^^^^^^^^^

Expand Down Expand Up @@ -149,17 +136,6 @@ This function is used to set the attenuation for a specific pin/ADC channel. For
* ``pin`` selects specific pin for attenuation settings.
* ``attenuation`` sets the attenuation.

adcAttachPin
^^^^^^^^^^^^

This function is used to attach the pin to ADC (it will also clear any other analog mode that could be on)

.. code-block:: arduino

bool adcAttachPin(uint8_t pin);

This function will return ``true`` if configuration is successful. Else returns ``false``.

ADC API specific for ESP32 chip
*******************************

Expand All @@ -173,30 +149,7 @@ Range is 9 - 12.
.. code-block:: arduino

void analogSetWidth(uint8_t bits);

analogSetVRefPin
^^^^^^^^^^^^^^^^

This function is used to set pin to use for ADC calibration if the esp is not already calibrated (pins 25, 26 or 27).

.. code-block:: arduino

void analogSetVRefPin(uint8_t pin);

* ``pin`` GPIO pin to set VRefPin for ADC calibration

hallRead
^^^^^^^^

This function is used to get the ADC value of the HALL sensor conneted to pins 36(SVP) and 39(SVN).

.. code-block:: arduino

int hallRead();

This function will return the hall sensor value.


Example Applications
********************

Expand Down
4 changes: 2 additions & 2 deletions docs/source/api/espnow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,13 @@ Examples
ESP-NOW Master
**************

.. literalinclude:: ../../../libraries/ESP32/examples/ESPNow/Basic/Master/Master.ino
.. literalinclude:: ../../../libraries/ESP32/examples/ESPNow/ESPNow_Basic_Master/ESPNow_Basic_Master.ino
:language: arduino

ESP-NOW Slave
*************

.. literalinclude:: ../../../libraries/ESP32/examples/ESPNow/Basic/Slave/Slave.ino
.. literalinclude:: ../../../libraries/ESP32/examples/ESPNow/ESPNow_Basic_Slave/ESPNow_Basic_Slave.ino
:language: arduino

Resources
Expand Down
2 changes: 1 addition & 1 deletion docs/source/api/gpio.rst
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ The GPIO peripheral on the ESP32 supports interruptions.
attachInterrupt
***************

The function ``attachInterruptArg`` is used to attach the interrupt to the defined pin.
The function ``attachInterrupt`` is used to attach the interrupt to the defined pin.

.. code-block:: arduino

Expand Down
19 changes: 0 additions & 19 deletions docs/source/api/hall_sensor.rst

This file was deleted.

Loading