this post was submitted on 29 Dec 2025
21 points (95.7% liked)
Home Automation
1038 readers
1 users here now
Home Automation, smart home, and related topics.
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
It's just using the ESP to close a NO (normally open) circuit to closed, effectively shorting those two in the same way the momentary switch would. The code causes the ESP to create that short between its GND and the GPIO D5, thus closing the switch.
If this was using any significant amount of current, you'd add a relay in there as the ESP can only handle a tiny amount in this configuration - but for small PCB loads like this, it's normally fine.
Oops - looks like I missed a file extension off. Fixed now, thanks.