专业版
M10智能开关
7.1k
0
0
16
简介
M10智能开关四键(兼容一二三键), 肤感玻璃面板,最多支持四个按键四个继电器,外壳小贵,但是质感非常不错
简介:M10智能开关四键(兼容一二三键), 肤感玻璃面板,最多支持四个按键四个继电器,外壳小贵,但是质感非常不错开源协议
:GPL 3.0
创建时间:2023-05-05 18:15:03更新时间:2023-12-29 09:38:17
描述
部分物料购买链接:
外壳(M10肤感玻璃,一次购买多个可以叫卖家改邮费):https://detail.1688.com/offer/715509722409.html
按键(H=3.4):https://item.taobao.com/item.htm?spm=a1z09.2.0.0.1a5f2e8d4xnWQb&id=546726731352&_u=omngg8600e1
铜柱(5-6-7-10左图[10+2.5(1.4*3.8)],配套螺丝记得一起买):https://item.taobao.com/item.htm?spm=a1z09.2.0.0.1a5f2e8d4xnWQb&id=674895352599&_u=omngg8613ea
其余元件参照PCB的BOM表购买
另需要购买m2*5沉头自攻螺丝用于面板固定
烧录方式:USB连接+5V、D+、D-、GND直接烧录即可(USB Serial/JTAG)
注意:强弱电连接排针PCB画的都是公头,实际需要一公一母不然没法连接
螺丝安装示例(最多需要上八颗螺丝,我只上了四颗已经够用):
ESPHOME核心配置参考:
#继电器
output:
- platform: gpio
pin:
number: GPIO1
id: out1
- platform: gpio
pin:
number: GPIO2
id: out2
- platform: gpio
pin:
number: GPIO3
id: out3
- platform: gpio
pin:
number: GPIO20
id: out4
#灯实体
light:
- platform: binary
name: ${device_name}-1
output: out1
id: light1
- platform: binary
name: ${device_name}-2
output: out2
id: light2
- platform: binary
name: ${device_name}-3
output: out3
id: light3
- platform: binary
name: ${device_name}-4
output: out4
id: light4
#物理按键
binary_sensor:
- platform: gpio
pin:
number: GPIO5
mode: INPUT_PULLUP
inverted: true
name: bs1
internal: true
on_press:
- light.toggle: light1
- platform: gpio
pin:
number: GPIO7
mode: INPUT_PULLUP
inverted: true
name: bs2
internal: true
on_press:
- light.toggle: light2
- platform: gpio
pin:
number: GPIO0
mode: INPUT_PULLUP
inverted: true
name: bs3
internal: true
on_press:
- light.toggle: light3
- platform: gpio
pin:
number: GPIO10
mode: INPUT_PULLUP
inverted: true
name: bs4
internal: true
on_press:
- light.toggle: light4
设计图
未生成预览图,请在编辑器重新保存一次
BOM
暂无BOM
克隆工程
添加到专辑
0
0
分享
侵权投诉
评论