MCP4725 输出
MCP4725 输出组件允许使用 12 位外部 DAC
,通过 I2C 在任何开发板上获得模拟输出。设备的默认地址为 0x60
,可配置的备用地址为 0x61。
# Example configuration entry
# Set a global i2c connectioni2c: sda: 21 scl: 22 scan: true
# Set the output with default (address: 0x60 / global i2c)output: - platform: mcp4725 id: dac_output
on_...: then: - output.set_level: id: dac_output level: 100%使用高于 3.3v 的电压
Section titled “使用高于 3.3v 的电压”为了驱动高于 3.3v 电压的模拟模块,请使用 TTL 双向电平转换器
请注意你使用的转换器,其中一些通道标记为 RX 和 TX,
在这种情况下只有 TX 通道是双向的(因此你必须使用 2 个 TX 通道才能让 I2C 工作)。