File tree Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Expand file tree Collapse file tree 3 files changed +17
-6
lines changed Original file line number Diff line number Diff line change @@ -56,7 +56,23 @@ To install in a virtual environment in your current project:
56
56
Usage Example
57
57
=============
58
58
59
- .. todo :: Add a quick, simple example. It and other examples should live in the examples folder and be included in docs/examples.rst.
59
+ .. code-block :: python3
60
+
61
+ import time
62
+ import board
63
+ import busio
64
+ import adafruit_dps310
65
+
66
+ i2c = busio.I2C(board.SCL, board.SDA)
67
+
68
+ dps310 = adafruit_dps310.DPS310(i2c)
69
+
70
+ while True:
71
+ print("Temperature = %.2f *C"%dps310.temperature)
72
+ print("Pressure = %.2f hPa"%dps310.pressure)
73
+ print("")
74
+ time.sleep(1.0)
75
+
60
76
61
77
Contributing
62
78
============
Original file line number Diff line number Diff line change 25
25
26
26
Library for the DPS310 Precision Barometric Pressure Sensor
27
27
28
-
29
28
* Author(s): Bryan Siepert
30
29
31
30
Implementation Notes
Original file line number Diff line number Diff line change @@ -23,14 +23,10 @@ Table of Contents
23
23
.. toctree ::
24
24
:caption: Tutorials
25
25
26
- .. todo :: Add any Learn guide links here. If there are none, then simply delete this todo and leave
27
- the toctree above for use later.
28
26
29
27
.. toctree ::
30
28
:caption: Related Products
31
29
32
- .. todo :: Add any product links here. If there are none, then simply delete this todo and leave
33
- the toctree above for use later.
34
30
35
31
.. toctree ::
36
32
:caption: Other Links
You can’t perform that action at this time.
0 commit comments