Skip to content

Commit f3bf36f

Browse files
committed
readmedox
1 parent c7a3d54 commit f3bf36f

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

README.rst

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,6 @@ Installing from PyPI
3737
.. note:: This library is not available on PyPI yet. Install documentation is included
3838
as a standard element. Stay tuned for PyPI availability!
3939

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-
4340
On supported GNU/Linux systems like the Raspberry Pi, you can install the driver locally `from
4441
PyPI <https://pypi.org/project/adafruit-circuitpython-ahtx0/>`_. To install for current user:
4542

@@ -65,7 +62,22 @@ To install in a virtual environment in your current project:
6562
Usage Example
6663
=============
6764

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("\nTemperature: %0.1f C" % sensor.temperature)
78+
print("Humidity: %0.1f %%" % sensor.relative_humidity)
79+
time.sleep(2)
80+
6981
7082
Contributing
7183
============

0 commit comments

Comments
 (0)