Add MCP47A1 docs (#1780)

This commit is contained in:
Jesse Hills 2022-01-08 21:36:01 +13:00 committed by GitHub
parent 024a59e1de
commit c9180e86eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 97 additions and 1 deletions

View File

@ -0,0 +1,48 @@
MCP47A1 Output
==============
.. seo::
:description: Instructions for setting up MCP47A1 outputs on the ESP.
:image: mcp47a1.svg
The ``mcp47a1`` output component allows to use `6bit external DAC <https://www.microchip.com/en-us/product/MCP47A1>`__
in order to have analog output(s) on any board by using I²C. Devices default address is ``0x2E``
and configurable alternative is ``0x3E``.
.. code-block:: yaml
# Example configuration entry
# Set a global I²C connection
i2c:
sda: 21
scl: 22
scan: true
# Set the output with default (address: 0x2E / global I²C)
output:
- platform: mcp47a1
id: dac_output
on_...:
then:
- output.set_level:
id: dac_output
level: 100%
Configuration variables:
------------------------
- **id** (**Required**, :ref:`config-id`): The id to use for this output component.
- **address** (*Optional*, int): Manually specify the I²C address of
the DAC. Defaults to ``0x2E``.
- All other options from :ref:`Output <config-output>`.
See Also
--------
- :doc:`/components/output/mcp4725`
- :doc:`/components/output/esp32_dac`
- :doc:`/components/output/esp8266_pwm`
- :ghedit:`Edit`

47
images/mcp47a1.svg Normal file
View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<svg
width="117.92471mm"
height="26.178963mm"
viewBox="0 0 117.92471 26.178963"
version="1.1"
id="svg8"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:dc="http://purl.org/dc/elements/1.1/">
<defs
id="defs2" />
<metadata
id="metadata5">
<rdf:RDF>
<cc:Work
rdf:about="">
<dc:format>image/svg+xml</dc:format>
<dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
</cc:Work>
</rdf:RDF>
</metadata>
<g
id="layer1">
<path
style="fill:#000000;fill-opacity:1;stroke-width:0.133497;stroke-miterlimit:4;stroke-dasharray:none"
id="rect833"
width="117.92471"
height="26.178963"
x="0"
y="0"
ry="6.2711163"
d="M 6.2711163,0 H 111.6536 c 3.4742,0 6.27111,2.7969179 6.27111,6.2711163 V 19.907846 c 0,3.474199 -2.79691,6.271117 -6.27111,6.271117 H 6.2711163 C 2.7969179,26.178963 0,23.382045 0,19.907846 V 6.2711163 C 0,2.7969179 2.7969179,0 6.2711163,0 Z" />
<g
aria-label="MCP47A1"
id="text837"
style="font-size:10.5833px;line-height:1.25;letter-spacing:1.08479px;fill:#fffffc;stroke-width:0.264583">
<path
id="path17814"
style="font-weight:bold;font-size:22.5778px;font-family:Montserrat;-inkscape-font-specification:'Montserrat, Bold'"
d="m 33.033203,3.9355469 c -4.651027,0 -7.541015,3.3181235 -7.541015,8.6464841 0,5.305783 2.867878,8.603516 7.451171,8.603516 4.10916,0 6.818284,-2.372085 7.021485,-6.142578 h -3.296875 c -0.225778,2.099736 -1.535031,3.296875 -3.634766,3.296875 -2.619025,0 -4.154297,-2.121068 -4.154297,-5.710938 0,-3.635026 1.603397,-5.8027341 4.267578,-5.8027341 1.964268,0 3.069929,0.9476069 3.521485,2.9570312 h 3.228515 C 39.783595,8.3608016 39.490928,7.4569398 38.791016,6.53125 37.526659,4.8604927 35.494183,3.9355469 33.033203,3.9355469 Z M 6.0957031,4.2070312 V 20.666016 H 9.4824219 V 7.8417969 L 12.441406,20.666016 h 3.386719 L 18.740234,7.8417969 V 20.666016 h 3.386719 V 4.2070312 H 17.023438 L 14.134766,17.300781 11.154297,4.2070312 Z m 37.5039059,0 V 20.666016 h 3.386719 v -5.871094 h 4.222656 c 3.025425,0 4.966797,-2.144814 4.966797,-5.4863282 0,-3.2963589 -1.872861,-5.1015626 -5.304687,-5.1015626 z m 48.140625,0 -5.847656,16.4589848 h 3.453125 l 1.107422,-3.31836 h 6.164063 l 1.082031,3.31836 h 3.478511 L 95.488281,4.2070312 Z M 64.417969,4.6582031 58.570312,14.457031 v 2.664063 h 6.41211 v 3.544922 h 3.162109 v -3.544922 h 1.669922 V 14.501953 H 68.144531 V 4.6582031 Z m 7.904297,0 v 2.8222657 h 7.96875 c -0.970845,1.0385787 -2.889306,3.9517382 -3.521485,5.3515622 -1.106312,2.325513 -1.670631,4.424737 -2.099609,7.833985 h 3.183594 c 0.293511,-5.057428 1.941304,-8.940144 5.734375,-13.5234379 v -2.484375 z m 36.802734,0 c -0.49671,1.8965353 -2.14395,2.8671875 -4.89844,2.8671875 V 9.625 h 3.83789 v 11.041016 h 3.16016 V 4.6582031 Z M 46.986328,7.0292969 h 3.16211 c 1.806224,0 2.640625,0.7901802 2.640624,2.4609375 0,1.6933346 -0.834401,2.4824216 -2.640624,2.4824216 h -3.16211 z m 17.996094,0.6308593 v 6.8417968 h -4.175781 z m 28.5625,0.4296876 2.146484,6.4355472 h -4.291015 z" />
</g>
</g>
</svg>

After

Width:  |  Height:  |  Size: 3.3 KiB

View File

@ -409,6 +409,7 @@ Output Components
SM16716, components/output/sm16716, sm16716.svg SM16716, components/output/sm16716, sm16716.svg
SM2135, components/output/sm2135, sm2135.svg SM2135, components/output/sm2135, sm2135.svg
MCP4725, components/output/mcp4725, mcp4725.jpg MCP4725, components/output/mcp4725, mcp4725.jpg
MCP47A1, components/output/mcp47a1, mcp47a1.svg
BLE Binary Output, components/output/ble_client, bluetooth.svg BLE Binary Output, components/output/ble_client, bluetooth.svg
Modbus Output, components/output/modbus_controller, modbus.png Modbus Output, components/output/modbus_controller, modbus.png
Custom Output, components/output/custom, language-cpp.svg Custom Output, components/output/custom, language-cpp.svg