mirror of
https://github.com/esphome/esphome-docs.git
synced 2024-12-25 17:17:54 +01:00
ESP32 DAC output documentation (#617)
* Add documentation for ESP32 DAC output * Fix SEO * Update images/dac.svg Co-authored-by: Guillermo Ruffino <glm.net@gmail.com> Co-authored-by: Guillermo Ruffino <glm.net@gmail.com>
This commit is contained in:
parent
c81ef96526
commit
083d7ddd33
46
components/output/esp32_dac.rst
Normal file
46
components/output/esp32_dac.rst
Normal file
@ -0,0 +1,46 @@
|
||||
ESP32 DAC
|
||||
=========
|
||||
|
||||
.. seo::
|
||||
:description: Instructions for setting up ESP32 digital-to-analog converter.
|
||||
:image: dac.svg
|
||||
|
||||
The ESP32 DAC platform allows you to output arbitrary voltages using the 8-bit DAC on the ESP32. Two pins are supported: GPIO25 (Channel 1) and GPIO26 (Channel 2).
|
||||
|
||||
The output level is a percentage of VCC (3.3V).
|
||||
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration entry
|
||||
output:
|
||||
- platform: esp32_dac
|
||||
pin: GPIO25
|
||||
id: dac_output
|
||||
|
||||
# Example usage
|
||||
on_...:
|
||||
then:
|
||||
- output.set_level:
|
||||
id: dac_output
|
||||
level: 50%
|
||||
|
||||
|
||||
Configuration variables:
|
||||
------------------------
|
||||
|
||||
- **pin** (**Required**, :ref:`Pin Schema <config-pin_schema>`): The pin to use DAC on. Only GPIO25 and GPIO26 are supported.
|
||||
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
|
||||
- All other options from :ref:`Output <config-output>`.
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
||||
- :doc:`/components/output/index`
|
||||
- :doc:`/components/output/ledc`
|
||||
- :doc:`/components/output/esp8266_pwm`
|
||||
- :doc:`/components/light/monochromatic`
|
||||
- :doc:`/components/fan/speed`
|
||||
- :doc:`/components/power_supply`
|
||||
- :apiref:`esp32_dac/esp32_dac.h`
|
||||
- :ghedit:`Edit`
|
1
images/dac.svg
Normal file
1
images/dac.svg
Normal file
@ -0,0 +1 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 0h24v24H0V0z" fill="none"/><path d="M20 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2z"/><path d="M3.7 8.8h1.8c1.9 0 3.1 1 3.1 3.2s-1.2 3.3-3 3.3H3.7V8.8zm1.7 5.4c1 0 1.7-.5 1.7-2.1s-.7-2-1.7-2h-.2v4.1h.2zm5.7-5.4h1.8l2 6.5h-1.6l-.8-3.3c-.2-.7-.4-1.4-.5-2.1-.2.7-.3 1.5-.5 2.1l-.8 3.3H9.1l2-6.5zm-.7 3.9h3.1v1.1h-3.1v-1.1zm5.1-.6c0-2.2 1.4-3.4 3.1-3.4.8 0 1.5.4 1.9.8l-.8.9c-.3-.3-.7-.5-1.1-.5-.9 0-1.6.8-1.6 2.1s.7 2.1 1.7 2.1c.5 0 .9-.2 1.2-.6l.8.9c-.5.6-1.3 1-2.1 1-1.7.1-3.1-1.1-3.1-3.3z" fill="#fff"/></svg>
|
After Width: | Height: | Size: 611 B |
@ -199,6 +199,7 @@ Output Components
|
||||
ESP8266 Software PWM, components/output/esp8266_pwm, pwm.png
|
||||
Slow PWM, components/output/slow_pwm, pwm.png
|
||||
GPIO Output, components/output/gpio, pin.svg
|
||||
ESP32 DAC, components/output/esp32_dac, dac.svg
|
||||
ESP32 LEDC, components/output/ledc, pwm.png
|
||||
AC Dimmer, components/output/ac_dimmer, ac_dimmer.svg
|
||||
PCA9685, components/output/pca9685, pca9685.jpg
|
||||
|
Loading…
Reference in New Issue
Block a user