Add gp8403 docs (#2901)

This commit is contained in:
Jesse Hills 2023-05-08 12:45:14 +12:00 committed by GitHub
parent 4b879d5e7b
commit b52df8e9a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 55 additions and 0 deletions

View File

@ -0,0 +1,53 @@
GP8403 Component
================
.. seo::
:description: Instructions for setting up GP8403 outputs in ESPHome.
:image: gp8403.svg
The ``gp8403`` is a 2-channel DAC output module. It requires an :doc:`/components/i2c` to be setup.
Component/Hub
-------------
.. code-block:: yaml
gp8403:
id: my_gp8403
voltage: 5V
Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **voltage** (**Required**, voltage): The output voltage range of the DAC. Must be one of ``5V`` or ``10V``.
Output
------
.. code-block:: yaml
output:
- platform: gp8403
id: my_gp8403_output_1
gp8403_id: my_gp8403
channel: 0
- platform: gp8403
id: my_gp8403_output_2
gp8403_id: my_gp8403
channel: 1
Configuration variables:
- **id** (*Optional*, :ref:`config-id`): Manually specify the ID used for code generation.
- **gp8403_id** (*Optional*, :ref:`config-id`): The ID of the GP8403 component.
Defaults to the only GP8403 component if there is only one.
- **channel** (**Required**, int): The channel of the GP8403 to use. Must be ``0`` or ``1``.
- All other options from :ref:`config-output`.
See Also
--------
- :doc:`/components/output/esp32_dac`
- :doc:`/components/output/index`
- :ghedit:`Edit`

1
images/gp8403.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" width="405.613" height="25mm" viewBox="0 0 107.318 25"><path d="M5 0h97.318c2.77 0 5 2.23 5 5v15c0 2.77-2.23 5-5 5H5c-2.77 0-5-2.23-5-5V5c0-2.77 2.23-5 5-5Z" style="fill:#000;fill-opacity:1;stroke-width:.133497;stroke-miterlimit:4;stroke-dasharray:none"/><g aria-label="GP8403" style="font-size:10.5833px;line-height:1.25;letter-spacing:1.08479px;fill:#fffffc;stroke-width:.264583"><path d="M17.16 12.515H20.5v6.412q-1.287.971-2.98 1.49-1.693.52-3.41.52-2.46 0-4.425-1.039-1.964-1.061-3.093-2.912-1.106-1.874-1.106-4.223 0-2.348 1.106-4.199Q7.723 6.69 9.71 5.651q1.987-1.06 4.47-1.06 2.078 0 3.771.7t2.845 2.031L18.447 9.49q-1.694-1.784-4.087-1.784-1.513 0-2.687.632t-1.828 1.784q-.655 1.151-.655 2.641 0 1.468.655 2.62.654 1.151 1.806 1.806 1.174.632 2.664.632 1.58 0 2.845-.677zM31.814 4.861q2.1 0 3.635.7 1.558.7 2.393 1.987.835 1.287.835 3.048 0 1.738-.835 3.048-.835 1.287-2.393 1.987-1.535.677-3.635.677H28.63v4.358h-3.657V4.86Zm-.203 8.467q1.648 0 2.506-.7.858-.722.858-2.032 0-1.332-.858-2.032-.858-.722-2.506-.722h-2.98v5.486zM52.225 12.357q1.174.587 1.784 1.535.632.949.632 2.19 0 1.468-.835 2.574-.836 1.084-2.348 1.694-1.513.587-3.5.587t-3.5-.587q-1.49-.61-2.325-1.694-.813-1.106-.813-2.574 0-1.241.61-2.19.632-.948 1.783-1.535-.88-.542-1.354-1.355-.474-.835-.474-1.896 0-1.377.767-2.393.768-1.016 2.145-1.558 1.377-.565 3.161-.565 1.806 0 3.183.565 1.4.542 2.168 1.558.768 1.016.768 2.393 0 1.061-.475 1.896-.474.813-1.377 1.355zm-4.267-5.08q-1.106 0-1.784.542-.654.52-.654 1.445 0 .903.654 1.422.655.52 1.784.52t1.806-.52q.678-.519.678-1.422 0-.926-.678-1.445-.677-.542-1.806-.542zm0 10.973q1.377 0 2.167-.61.813-.632.813-1.67 0-1.04-.813-1.649-.79-.61-2.167-.61-1.355 0-2.145.61t-.79 1.649q0 1.06.79 1.67.79.61 2.145.61zM69.295 14.366h2.574v2.98h-2.574v3.32h-3.567v-3.32h-8.512v-2.46l7.45-10.025h3.839l-6.909 9.505h4.245V11.41h3.454zM80.81 20.937q-1.963 0-3.499-.971-1.535-.971-2.416-2.8-.858-1.851-.858-4.403 0-2.55.858-4.38.88-1.851 2.416-2.822 1.536-.97 3.5-.97t3.5.97q1.535.971 2.393 2.822.88 1.83.88 4.38 0 2.552-.88 4.403-.858 1.829-2.394 2.8-1.535.97-3.5.97zm0-3.094q1.446 0 2.259-1.241.835-1.242.835-3.839 0-2.596-.835-3.838-.813-1.242-2.258-1.242-1.423 0-2.258 1.242-.813 1.242-.813 3.838 0 2.597.813 3.839.835 1.241 2.258 1.241zM97.61 11.296q2.077.339 3.183 1.558 1.107 1.196 1.107 2.98 0 1.377-.723 2.551-.722 1.152-2.213 1.852-1.467.7-3.612.7-1.67 0-3.296-.43-1.603-.45-2.732-1.264l1.422-2.8q.903.678 2.077 1.062 1.197.361 2.439.361 1.377 0 2.167-.52.79-.541.79-1.512 0-1.942-2.957-1.942H93.59v-2.415l3.251-3.68h-6.728V4.86h11.063v2.37z" style="font-weight:700;font-size:22.5778px;font-family:Montserrat;-inkscape-font-specification:&quot;Montserrat, Bold&quot;"/></g></svg>

After

Width:  |  Height:  |  Size: 2.7 KiB

View File

@ -504,6 +504,7 @@ Output Components
BP1658CJ, components/output/bp1658cj, bp1658cj.svg
BP5758D, components/output/bp5758d, bp5758d.svg
X9C Potentiometer, components/output/x9c, x9c.jpg
GP8403, components/output/gp8403, gp8403.svg
Light Components
----------------