视频演示 https://v.douyin.com/XDJCvNu2h5k/NodeRed工程流[{id: b6590f52b7e68ea9,type: tab,label: 01-串口控制红外灯,disabled: true,info: ,env: []},{id: 3b7060a45618ee0e,type: inject,z: b6590f52b7e68ea9,name: 开灯ON,props: [{p: payload}],repeat: ,crontab: ,once: false,onceDelay: 0.1,topic: ,payload: 6863000022DC08B20446D5014347454745464646464645464646464646D50143D50143D50143D50143D50143D50143D50143D5014446464646464646464943494346464646D50144D50144D50144D50143D50144D40144D40144D026E50895024B1B16,payloadType: str,x: 250,y: 200,wires: [[db0b91ed05db31ca]]},{id: 2cd7a194de1a0258,type: inject,z: b6590f52b7e68ea9,name: 关灯OFF,props: [{p: payload}],repeat: ,crontab: ,once: false,onceDelay: 0.1,topic: ,payload: 6863000022DE08B50443D5014347454745474547454745474547454745D50143D50143D50143D60143D60143D60143D501424745D60143474547454745474547454745D501434745D50143D50143D50142D60142D50143D50143D326DD089902471616,payloadType: str,x: 260,y: 320,wires: [[db0b91ed05db31ca]]},{id: db0b91ed05db31ca,type: function,z: b6590f52b7e68ea9,name: function 1,func: // 把HEX字符串转串口需要的Buffer\nmsg.payload Buffer.from(msg.payload, \hex\);\nreturn msg;,outputs: 1,timeout: 0,noerr: 0,initialize: ,finalize: ,libs: [],x: 440,y: 260,wires: [[55c25d187cdd8ff4]]},{id: 55c25d187cdd8ff4,type: serial out,z: b6590f52b7e68ea9,name: COM7,serial: ,x: 690,y: 260,wires: []},{id: 114c904f3fe21316,type: global-config,env: [],modules: {node-red-node-serialport: 2.0.3}}]
001-使用串口控制红外设备
视频演示 https://v.douyin.com/XDJCvNu2h5k/NodeRed工程流[{id: b6590f52b7e68ea9,type: tab,label: 01-串口控制红外灯,disabled: true,info: ,env: []},{id: 3b7060a45618ee0e,type: inject,z: b6590f52b7e68ea9,name: 开灯ON,props: [{p: payload}],repeat: ,crontab: ,once: false,onceDelay: 0.1,topic: ,payload: 6863000022DC08B20446D5014347454745464646464645464646464646D50143D50143D50143D50143D50143D50143D50143D5014446464646464646464943494346464646D50144D50144D50144D50143D50144D40144D40144D026E50895024B1B16,payloadType: str,x: 250,y: 200,wires: [[db0b91ed05db31ca]]},{id: 2cd7a194de1a0258,type: inject,z: b6590f52b7e68ea9,name: 关灯OFF,props: [{p: payload}],repeat: ,crontab: ,once: false,onceDelay: 0.1,topic: ,payload: 6863000022DE08B50443D5014347454745474547454745474547454745D50143D50143D50143D60143D60143D60143D501424745D60143474547454745474547454745D501434745D50143D50143D50142D60142D50143D50143D326DD089902471616,payloadType: str,x: 260,y: 320,wires: [[db0b91ed05db31ca]]},{id: db0b91ed05db31ca,type: function,z: b6590f52b7e68ea9,name: function 1,func: // 把HEX字符串转串口需要的Buffer\nmsg.payload Buffer.from(msg.payload, \hex\);\nreturn msg;,outputs: 1,timeout: 0,noerr: 0,initialize: ,finalize: ,libs: [],x: 440,y: 260,wires: [[55c25d187cdd8ff4]]},{id: 55c25d187cdd8ff4,type: serial out,z: b6590f52b7e68ea9,name: COM7,serial: ,x: 690,y: 260,wires: []},{id: 114c904f3fe21316,type: global-config,env: [],modules: {node-red-node-serialport: 2.0.3}}]