Skip to content

Commit 34878c2

Browse files
committed
2 parents ce9a552 + 4e05923 commit 34878c2

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Library 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
2525
InfluxData measurement ("temperature");
2626
measurement.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
4040
Batching measurements and send them with a single request will result in a much higher performance.
41-
```
41+
```cpp
4242

4343
InfluxData measurement1 = readTemperature()
4444
influx.prepare(measurement1)

0 commit comments

Comments
 (0)