Skip to content

Commit c0b077e

Browse files
author
ladyada
committed
add example
1 parent 2e15fa4 commit c0b077e

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

README.rst

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,21 @@ This is easily achieved by downloading
3030
Usage Example
3131
=============
3232

33-
.. todo:: Add a quick, simple example. It and other examples should live in the examples folder and be included in docs/examples.rst.
33+
.. code-block:: python
34+
35+
import time
36+
import board
37+
import busio
38+
import adafruit_adt7410
39+
40+
i2c_bus = busio.I2C(board.SCL, board.SDA)
41+
adt = adafruit_adt7410.ADT7410(i2c_bus, address=0x48)
42+
adt.high_resolution = True
43+
44+
while True:
45+
print(adt.temperature)
46+
time.sleep(0.5)
47+
3448
3549
Contributing
3650
============

0 commit comments

Comments
 (0)