Skip to content

Commit 51b7cd9

Browse files
author
caternuson
committed
updated usage in doc
1 parent 1fdbecf commit 51b7cd9

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,11 @@ Usage Example
2828

2929
.. code-block:: python
3030
31+
>>> import board
32+
>>> import busio
33+
>>> i2c = busio.I2C(board.SCL, board.SDA)
3134
>>> import adafruit_tsl2561
32-
>>> tsl = adafruit_tsl2561.TSL2561()
33-
>>> tsl.enabled = True
35+
>>> tsl = adafruit_tsl2561.TSL2561(i2c)
3436
>>> tsl.light
3537
3294.37
3638

0 commit comments

Comments
 (0)