File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 33Library for NodeMcu / ESP8266 (and Arduino?) for sending measurements to an Influx database.
44
55## Initialization
6- ```
6+ ``` cpp
77 #define INFLUXDB_HOST "192.168.0.32"
88 #define INFLUXDB_PORT "1337"
99 #define INFLUXDB_DATABASE "test"
@@ -20,7 +20,7 @@ Library for NodeMcu / ESP8266 (and Arduino?) for sending measurements to an Infl
2020
2121## Sending a single measurement
2222**Using an InfluxData object:**
23- ```
23+ ```cpp
2424// create a measurement object
2525InfluxData measurement ("temperature");
2626measurement.addTag("device", d2);
@@ -32,13 +32,13 @@ influx.write(measurement);
3232```
3333
3434** Using raw-data**
35- ```
35+ ``` cpp
3636 influx.write(" temperature,device=d2,sensor=dht11 value=24.0" )
3737```
3838
3939## Write multiple data points at once
4040Batching measurements and send them with a single request will result in a much higher performance.
41- ```
41+ ``` cpp
4242
4343InfluxData measurement1 = readTemperature()
4444influx.prepare(measurement1)
You can’t perform that action at this time.
0 commit comments