mirror of
https://github.com/esphome/esphome.git
synced 2025-10-29 22:24:26 +00:00
Add device support: MCP4728 (#3174)
* Added MCP4728 output component. * Added tests to test1.yaml * Added codeowners * Lint fixes * Implemented code review changes * Lint fixes * Added i2c communication check on setup() * Fixed tests * Lint fix * Update esphome/components/mcp4728/mcp4728_output.cpp Changed log function Co-authored-by: Otto Winter <otto@otto-winter.com> Co-authored-by: Otto Winter <otto@otto-winter.com>
This commit is contained in:
@@ -1501,6 +1501,28 @@ output:
|
||||
- platform: mcp4725
|
||||
id: mcp4725_dac_output
|
||||
i2c_id: i2c_bus
|
||||
- platform: mcp4728
|
||||
id: mcp4728_dac_output_a
|
||||
channel: A
|
||||
vref: vdd
|
||||
power_down: normal
|
||||
- platform: mcp4728
|
||||
id: mcp4728_dac_output_b
|
||||
channel: B
|
||||
vref: internal
|
||||
gain: X1
|
||||
power_down: gnd_1k
|
||||
- platform: mcp4728
|
||||
id: mcp4728_dac_output_c
|
||||
channel: C
|
||||
vref: vdd
|
||||
power_down: gnd_100k
|
||||
- platform: mcp4728
|
||||
id: mcp4728_dac_output_d
|
||||
channel: D
|
||||
vref: internal
|
||||
gain: X2
|
||||
power_down: gnd_500k
|
||||
|
||||
e131:
|
||||
|
||||
@@ -2013,6 +2035,9 @@ switch:
|
||||
- output.set_level:
|
||||
id: mcp4725_dac_output
|
||||
level: !lambda "return 0.5;"
|
||||
- output.set_level:
|
||||
id: mcp4728_dac_output_a
|
||||
level: !lambda "return 0.5;"
|
||||
turn_off_action:
|
||||
- switch.turn_on: living_room_lights_off
|
||||
restore_state: False
|
||||
@@ -2393,6 +2418,12 @@ rc522_i2c:
|
||||
ESP_LOGD("main", "Found tag %s", x.c_str());
|
||||
i2c_id: i2c_bus
|
||||
|
||||
mcp4728:
|
||||
- id: mcp4728_dac
|
||||
store_in_eeprom: False
|
||||
address: 0x60
|
||||
i2c_id: i2c_bus
|
||||
|
||||
gps:
|
||||
uart_id: uart0
|
||||
|
||||
|
||||
Reference in New Issue
Block a user