跳转至

远程麦克风

《HomeAssistant智能家居实战篇》视频

硬件

  • 麦克风板

  • nodemcu 32s

淘宝购买地址

程序烧写

  • 安装addon: ESPHome
  • 配置与烧写

    • 配置

      esphome: name: distributed_microphone platform: ESP32 board: nodemcu-32s includes: - distributed_microphone.h

      ###########......

      switch: - platform: custom lambda: |- auto my_custom_switch = new MicrophoneSwitch(); App.register_component(my_custom_switch); return {my_custom_switch}; switches: name: "RemoteMic"

      a LED on GPIO17, optional for indicating microphone's state

      output: - platform: ledc id: mic_led pin: GPIO17

      light: - platform: monochromatic name: "MicLight" output: mic_led default_transition_length: 0s effects: - strobe:

    • distributed_microphone.h

远程麦克风使用

配置microphone: 'ip:端口号'

接入HomeAssistant

  • 开关:控制远程麦克风是否拾音
  • 灯:clk引脚的电平

返回课程目录↩