MCPcopy Create free account
hub / github.com/DexterInd/GoPiGo3 / is_button_pressed

Method is_button_pressed

Software/Python/easysensors.py:1369–1377  ·  view source on GitHub ↗

Checks if the `Grove Button`_ is pressed. :returns: ``True`` or ``False``, if the `Grove Button`_ is pressed. :rtype: bool

(self)

Source from the content-addressed store, hash-verified

1367 raise
1368
1369 def is_button_pressed(self):
1370 """
1371 Checks if the `Grove Button`_ is pressed.
1372
1373 :returns: ``True`` or ``False``, if the `Grove Button`_ is pressed.
1374 :rtype: bool
1375
1376 """
1377 return self.read() == 1
1378##########################
1379
1380

Callers 2

wait_for_buttonFunction · 0.80
handle_buttonFunction · 0.80

Calls 1

readMethod · 0.45

Tested by

no test coverage detected