硬件
我用的是
RTC模块,提供
精度
属于
.
.
根据xdb的HTTP写语法文档
[2]
:
由于RTC提供的信息是特定于硬件的,因此我假设精度不能更改((怀疑)
解决方案
我用了
precision
我的Arduino草图中HTTP写入语法中的参数如下:
HTTPClient http;
http.begin("http://" + _host + ":" + _port + "/write?db=" + _db + "&precision=s");
http.addHeader("Content-Type", "text/plain");
int httpResponseCode = http.POST(mes_dat);
这个
精度
s
(以秒为单位)。这将以正确的方式将信息保存在InfluxDB中,即。
name: imu
time eul_x eul_y eul_z liac_x liac_y liac_z location nodeid status
---- ----- ----- ----- ------ ------ ------ -------- ------ ------
1537470381000000000 359.31 0 9.81 -0.05 -1.47 9.82 front node1 0
1537470382000000000 359.37 0 10.81 -0.05 -1.72 9.75 front node1 0
1537470383000000000 359.37 -0.06 10.81 -0.06 -1.75 9.71 front node1 0
1537470384000000000 359.37 -0.06 10.81 -0.03 -1.75 9.67 front node1 0
1537470385000000000 359.37 -0.06 10.81 -0.05 -1.76 9.73 front node1 0
1537470386000000000 359.37 -0.06 10.75 -0.05 -1.76 9.72 front node1 0
1537470387000000000 359.37 -0.06 10.75 -0.06 -1.77 9.64 front node1 0
1537470388000000000 359.37 -0.06 10.75 -0.02 -1.76 9.61 front node1 0
1537470389000000000 359.37 -0.06 10.75 -0.04 -1.76 9.61 front node1 0
1537470390000000000 359.37 -0.06 10.75 -0.03 -1.82 9.61 front node1 0
1537470391000000000 359.37 -0.06 10.63 -0.03 -1.78 9.72 front node1 0
1537470393000000000 359.37 -0.06 10.63 -0.05 -1.78 9.63 front node1 0
1537470394000000000 359.37 -0.06 10.63 -0.05 -1.76 9.76 front node1 0
而可视化在Chronograf中是完美的,上面提到的所有问题。
[1] Adafruit's DS3231
[2] InfluxDB HTTP Write Documentation