We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent b814fbe commit 20b77c4Copy full SHA for 20b77c4
README.rst
@@ -57,19 +57,23 @@ Initialize the scale by passing it a data pin and a pin to toggle the units butt
57
58
.. code-block:: python
59
60
- dymo = Scale(board.D3, board.D4)
+ # 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)
64
65
Get the item's weight from the scale:
66
67
68
- dymo.weight
69
+ reading = dymo.weight
70
+ print(reading.weight)
71
72
Get the item's units from the scale:
73
74
75
- dymo.units
76
+ print(reading.units)
77
78
To toggle between units (simulate a button press):
79
0 commit comments