ESPHome Getting Started 02 - Switch Control (Xiaobai Getting Started - (Relay Control) Switch Bedroom Light)

ESPHome Getting Started 02 - Switch Control (Xiaobai Getting Started - (Relay Control) Switch Bedroom Light)

Now start to officially enter the programming of ESPHome (to be exact, just configure some parameters, don’t worry if you can’t learn it, it’s easy to implement step by step according to the tutorial, and you only need to add a few lines of configuration to realize a switch) The development board used in this section
is NodeMcu (in order to make everyone familiar with various development boards as soon as possible, the follow-up tutorial will replace several other esp01s D1Mini esp32, etc.)

Step 1: Hardware part

Prepare

1> 继电器模块 (懂硬件设计的可以自己准备继电器以及驱动电路)
2> 8266开发板(或者核心板) (本节使用NodeMCU为例  其他8266或者8255或者esp32板均可)

insert image description here
insert image description here

hardware connection

将NodeMcu的D0 <---> 继电器的IN
NodeMcu的VU <---> 继电器VCC (由于继电器需要5V电

Guess you like

Origin blog.csdn.net/yueyeguzhuo/article/details/118060420