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 3
3
Library for NodeMcu / ESP8266 (and Arduino?) for sending measurements to an Influx database.
4
4
5
5
## Initialization
6
- ```
6
+ ``` cpp
7
7
#define INFLUXDB_HOST "192.168.0.32"
8
8
#define INFLUXDB_PORT "1337"
9
9
#define INFLUXDB_DATABASE "test"
@@ -20,7 +20,7 @@ Library for NodeMcu / ESP8266 (and Arduino?) for sending measurements to an Infl
20
20
21
21
## Sending a single measurement
22
22
**Using an InfluxData object:**
23
- ```
23
+ ```cpp
24
24
// create a measurement object
25
25
InfluxData measurement ("temperature");
26
26
measurement.addTag("device", d2);
@@ -32,13 +32,13 @@ influx.write(measurement);
32
32
```
33
33
34
34
** Using raw-data**
35
- ```
35
+ ``` cpp
36
36
influx.write(" temperature,device=d2,sensor=dht11 value=24.0" )
37
37
```
38
38
39
39
## Write multiple data points at once
40
40
Batching measurements and send them with a single request will result in a much higher performance.
41
- ```
41
+ ``` cpp
42
42
43
43
InfluxData measurement1 = readTemperature()
44
44
influx.prepare(measurement1)
You can’t perform that action at this time.
0 commit comments