我现在正在使用USB Weatherboard V3。在
数据每隔1秒从/dev/ttyUSB*连续发送一次。。。我试图用PySerial获取数据,但还是失败了。在
我只需要在输出控制台中进行“重置”。我拿不到数据。在
我想要的是这样的输出:
SHT15 temperature: 2.5 75.1 deg F
SHT15 humidity: 65%
SHT15 dewpoint: 62.7 deg F
BMP085 pressure: 2 2011, 10:05:235.967 in Hg FAIL
BMP085 temperature: 75.3 deg F
TEMT6000 light: 0.1%
Weather meters wind speed: speci0.0 MPH FAIL
Weather meters wind direction: -1 degrees FAIL
Weather meters rainfall: 0.00 inches FAIL
External power: 0.00 Volts FAIL
^来自unix的串行程序。在
有人能帮我吗?在
顺便说一句,这是我目前的代码:
^{pr2}$请帮助我更正,或者如果有人在我之前有代码,请与我分享:)
{a1数据表:^a1}
Weatherboard v3产品:https://www.sparkfun.com/products/10586
从串行设备读取所有行,然后返回。由于您的设备正在无限量地发送数据,因此您应该在写入数据的同时对其进行迭代以获取行,如下所示:
^{pr2}$相关问题 更多 >
编程相关推荐