树莓派3b Node-red dashboard 第一个测试程序

Node-RED实操:CPU温度监测
本文介绍如何使用Node-RED实现CPU温度实时监测并显示,通过注入消息、执行系统命令、处理数据和使用仪表盘组件,完成从数据获取到可视化展示的全过程。

代码:

[{
	"id": "15d4e229.de9d2e",
	"type": "function",
	"z": "e3aca2b9.00ea7",
	"name": "temperature",
	"func": "str=msg.payload;\nmsg.payload=str.substring(5,9);\nreturn msg;",
	"outputs": 1,
	"noerr": 0,
	"x": 470,
	"y": 296.5,
	"wires": [
		["7a0ba386.d5fc24"]
	]
}, {
	"id": "7a0ba386.d5fc24",
	"type": "ui_gauge",
	"z": "e3aca2b9.00ea7",
	"name": "",
	"group": "d6ccf1c9.b74398",
	"order": 0,
	"width": 0,
	"height": 0,
	"gtype": "gage",
	"title": "CPU. Temp",
	"label": "℃",
	"format": "{
  
  {value}}",
	"min": 0,
	"max": "80",
	"colors": ["#00b500", "#e6e600", "#ca3838"],
	"seg1": "",
	"seg2": "",
	"x": 679,
	"y": 333.5,
	"wires": []
}, {
	"id": "bf50d228.72e178",
	"type": "inject",
	"z": "e3aca2b9.00ea7",
	"name": "",
	"topic": "",
	"payload": "",
	"payloadType": "date",
	"repeat": "1",
	"crontab": "",
	"once": false,
	"onceDelay": 0.1,
	"x": 104,
	"y": 305.5,
	"wires": [
		["db3ed94d.c4bdb"]
	]
}, {
	"id": "db3ed94d.c4
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

armcsdn

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值