Skip to content

Commit 20b77c4

Browse files
author
brentru
committed
update readme to reflect commits
1 parent b814fbe commit 20b77c4

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

README.rst

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,23 @@ Initialize the scale by passing it a data pin and a pin to toggle the units butt
5757

5858
.. code-block:: python
5959
60-
dymo = Scale(board.D3, board.D4)
60+
# initialize the dymo scale
61+
units_pin = digitalio.DigitalInOut(board.D3)
62+
units_pin.switch_to_output()
63+
dymo = adafruit_dymoscale.DYMOScale(board.D4, units_pin)
6164
6265
Get the item's weight from the scale:
6366

6467
.. code-block:: python
6568
66-
dymo.weight
69+
reading = dymo.weight
70+
print(reading.weight)
6771
6872
Get the item's units from the scale:
6973

7074
.. code-block:: python
7175
72-
dymo.units
76+
print(reading.units)
7377
7478
To toggle between units (simulate a button press):
7579

0 commit comments

Comments
 (0)