代码拉取完成,页面将自动刷新
input.onButtonPressed(Button.A, function () {
naturalScience.microIoT_SendMessage("78", naturalScience.TOPIC.topic_0)
})
input.onButtonPressed(Button.AB, function () {
naturalScience.microIoT_http_post("12", "344", "44")
})
input.onButtonPressed(Button.B, function () {
naturalScience.microIoT_http_TK_GET(
"95",
"12",
"8",
"",
"",
"",
""
)
})
naturalScience.microIoT_WIFI("hitest", "12345678")
naturalScience.microIoT_ThingSpeak_configura("yourKey")
naturalScience.microIoT_http_IFTTT("BBB", "dtpfTlU3Wqa8y0HRh77xXE")
naturalScience.microIoT_MQTT(
"rHpr0RcWR",
"9NtrAg5ZRz",
"DN5FYlDZR",
naturalScience.SERVERS.China
)
naturalScience.setTDSK(1.1)
naturalScience.mototRun(DIR.CW, 100)
basic.forever(function () {
naturalScience.requstdata()
naturalScience.setOLEDShowString(1, 7, 1, "UV:" + naturalScience.getUltraviolet())
naturalScience.setOLEDShowString(8, 16, 1, "-SOD:" + naturalScience.getSound())
naturalScience.setOLEDShowString(1, 7, 2, "TC:" + convertToText(naturalScience.getTVOC(CT.TVOC)))
naturalScience.setOLEDShowString(8, 16, 2, "-CO2:" + convertToText(naturalScience.getTVOC(CT.CO2)))
naturalScience.setOLEDShowString(1, 7, 3, "TE:" + naturalScience.getBME(BME.TEMP))
naturalScience.setOLEDShowString(8, 16, 3, "-WTE:" + naturalScience.getWatertemp())
naturalScience.setOLEDShowString(1, 7, 4, "LI:" + convertToText(naturalScience.getLight()))
naturalScience.setOLEDShowString(8, 16, 4, "-TDS:" + convertToText(naturalScience.getTDS()))
naturalScience.setOLEDShowString(1, 16, 5, "HU:" + naturalScience.getBME(BME.HUM))
naturalScience.setOLEDShowString(1, 16, 6, "PE:" + naturalScience.getBME(BME.PRESSURE))
})
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。