我在编程方面几乎没有什么技能,但我需要使用各种传感器进行测量,这些传感器连接到我的raspberry pi 3,并将它们发送给thingspeak。我用它作为参考:https://iotdesignpro.com/projects/iot-based-raspberry-pi-weather-station-using-dht11-and-bmp180-sensor。我得到的错误是:enter image description here
我的代码与链接上的代码相同,唯一的区别是api键和gpio引脚
第128行是:main()
,在最末尾
第114行是:(humi, temp)= readDHT()
最后,第104行是:return (str(int(humi)), str(int(temp)))
多谢各位
您无法从以下行中获取信息:
例如,humi没有收到任何价值。您应该验证DHTpin(当前为针脚22)的定义是否与您连接传感器的定义相同
相关问题 更多 >
编程相关推荐