Skip to content

Commit c32e498

Browse files
committed
Add docs folder
1 parent 1f0a793 commit c32e498

File tree

2 files changed

+121
-0
lines changed

2 files changed

+121
-0
lines changed

docs/api.md

Lines changed: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# ArduinoLPS22HB library
2+
3+
## Methods
4+
5+
### `begin()`
6+
7+
Initialize the pressure sensor.
8+
9+
#### Syntax
10+
11+
```
12+
BARO.begin()
13+
```
14+
15+
#### Parameters
16+
17+
None.
18+
19+
#### Returns
20+
21+
1 on success, 0 on failure.
22+
23+
#### Example
24+
25+
```
26+
if (!BARO.begin()) {
27+
Serial.println("Failed to initialize pressure sensor!");
28+
while (1);
29+
}
30+
```
31+
32+
#### See also
33+
34+
* [end()](#end)
35+
* [readPressure()](#readPressure)
36+
37+
### `end()`
38+
39+
De-initialize the pressure sensor.
40+
41+
#### Syntax
42+
43+
```
44+
BARO.end()
45+
```
46+
47+
#### Parameters
48+
49+
None.
50+
51+
#### Returns
52+
53+
None.
54+
55+
#### Example
56+
57+
```
58+
if (!BARO.begin()) {
59+
Serial.println("Failed to initialize pressure sensor!");
60+
while (1);
61+
}
62+
63+
// ...
64+
65+
BARO.end();
66+
```
67+
68+
#### See also
69+
70+
* [begin()](#begin)
71+
* [readPressure()](#readPressure)
72+
73+
### `readPressure()`
74+
75+
Read the sensor's measured pressure value.
76+
77+
78+
#### Syntax
79+
80+
```
81+
BARO.readPressure()
82+
BARO.readPressure(units)
83+
```
84+
85+
#### Parameters
86+
87+
* _units_: `PSI` to read the pressure in PSI (pounds per square inch), `MILLIBAR` to read the pressure in millibars and `KILOPASCALS` to read the pressure in kilopascals. If unit parameter is not provided, default is kilopascals .
88+
89+
#### Returns
90+
91+
The pressure in PSI, millibar or kilopascal, depending on the units requested.
92+
93+
#### Examples
94+
95+
```
96+
float pressure = BARO.readPressure();
97+
98+
Serial.print("Pressure = ");
99+
Serial.print(pressure);
100+
Serial.println(" kPa");
101+
```
102+
103+
#### See also
104+
105+
* [begin()](#begin)
106+
* [end()](#end)

docs/readme.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# ArduinoLPS22HB library
2+
3+
4+
The ArduinoLPS22HB library allows you to use the LPS22HB sensor available on the Arduino® Nano 33 BLE Sense board to read the air pressure.
5+
6+
To use this library:
7+
8+
```
9+
#include <Arduino_LPS22HB.h>
10+
```
11+
12+
Main features of the HTS221 sensor:
13+
14+
- Absolute pressure range: 260 to 1260 hPa.
15+

0 commit comments

Comments
 (0)