esphome的初步使用,點亮esp32的板載小燈

 

 

esphome:
  name: test1
  platform: ESP32
  board: nodemcu-32s

wifi:
  ssid: "xxxxxx"      //這裏填寫的是想讓esp32接入的wifi
  password: "xxxxxxxx"

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "Test1 Fallback Hotspot"    //這裏是如果第一個設置的wifi連接失敗啓用熱點連接。
    password: "xxxxxxxx"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:
  password: "hass"   //homeassistant的密碼

ota:
  password: "11111111"

output:
  - platform: ledc
    pin: GPIO2    //這裏是esp32控制燈的GPIO
    id: gpio_2

# Example usage in a light
light:
  - platform: monochromatic
    output: gpio_2
    name: "Kitchen Light"
    

web_server:
  port: 80               //此處開啓esp32的網頁調試模式
 

發佈了62 篇原創文章 · 獲贊 42 · 訪問量 8萬+
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章