mirror of
https://github.com/esphome/esphome-docs.git
synced 2025-01-13 20:11:53 +01:00
Include multi conf and change address for TB6612FNG (#3267)
Co-authored-by: Jesse Hills <3060199+jesserockz@users.noreply.github.com>
This commit is contained in:
parent
ed38318196
commit
c62e7aed59
@ -14,28 +14,10 @@ At the current stage of implementation only DC motor is implemented.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
# Example configuration grove motor
|
||||
# Example configuration
|
||||
grove_tb6612fng:
|
||||
- address: 0x14
|
||||
id: test_motor
|
||||
name: motor_outside
|
||||
address: 0x14
|
||||
|
||||
# Example switch trigger
|
||||
switch:
|
||||
- platform: template
|
||||
name: open_vent
|
||||
id: open_vent
|
||||
optimistic: True
|
||||
on_turn_on:
|
||||
then:
|
||||
- grove_tb6612fng.run:
|
||||
channel: 1
|
||||
speed: 255
|
||||
direction: BACKWARD
|
||||
id: test_motor
|
||||
- delay: 10s
|
||||
- switch.turn_on: stop_motor
|
||||
- switch.turn_off: open_vent
|
||||
|
||||
Configuration variables:
|
||||
************************
|
||||
@ -43,7 +25,6 @@ Configuration variables:
|
||||
- **id** (**Required**, :ref:`config-id`): The id to use for this TB6612FNG component.
|
||||
- **address** (*Optional*, int): The I²C address of the driver.
|
||||
Defaults to ``0x14``.
|
||||
- **name** (**Required**, boolean): The name of the component
|
||||
|
||||
.. grove_tb6612fng.run:
|
||||
|
||||
@ -124,6 +105,21 @@ Set the board to be awake, every esphome is restarted the default mode is set to
|
||||
- grove_tb6612fng.no_standby
|
||||
id: test_motor
|
||||
|
||||
.. grove_tb6612fng.change_address:
|
||||
|
||||
``grove_tb6612fng.change_address`` Action
|
||||
-----------------------------------------
|
||||
|
||||
If you require connecting multiple boards at once, the address can be changed using this action. The address can be changed to a value in the range of ``0x01 - 0x7f`` inclusive.
|
||||
|
||||
.. code-block:: yaml
|
||||
|
||||
on_...:
|
||||
then:
|
||||
- grove_tb6612fng.change_address:
|
||||
address: 0x15
|
||||
id: test_motor
|
||||
|
||||
|
||||
See Also
|
||||
--------
|
||||
|
Loading…
Reference in New Issue
Block a user