File tree Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Expand file tree Collapse file tree 1 file changed +16
-4
lines changed Original file line number Diff line number Diff line change @@ -37,9 +37,6 @@ Installing from PyPI
37
37
.. note :: This library is not available on PyPI yet. Install documentation is included
38
38
as a standard element. Stay tuned for PyPI availability!
39
39
40
- .. todo :: Remove the above note if PyPI version is/will be available at time of release.
41
- If the library is not planned for PyPI, remove the entire 'Installing from PyPI' section.
42
-
43
40
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
44
41
PyPI <https://pypi.org/project/adafruit-circuitpython-ahtx0/> `_. To install for current user:
45
42
@@ -65,7 +62,22 @@ To install in a virtual environment in your current project:
65
62
Usage Example
66
63
=============
67
64
68
- .. todo :: Add a quick, simple example. It and other examples should live in the examples folder and be included in docs/examples.rst.
65
+ .. code-block :: python
66
+
67
+ import time
68
+ import board
69
+ import busio
70
+ import adafruit_ahtx0
71
+
72
+ # Create library object using our Bus I2C port
73
+ i2c = busio.I2C(board.SCL , board.SDA )
74
+ sensor = adafruit_ahtx0.AHTx0(i2c)
75
+
76
+ while True :
77
+ print (" \n Temperature: %0.1f C" % sensor.temperature)
78
+ print (" Humidity: %0.1f %% " % sensor.relative_humidity)
79
+ time.sleep(2 )
80
+
69
81
70
82
Contributing
71
83
============
You can’t perform that action at this time.
0 commit comments