PiStorms  4.015
PiStorms Library Reference by mindsensors.com
 All Classes Namespaces Files Functions Variables
GroveDevices.Grove_Button Class Reference

This class supports the Grove Button v1.1. More...

Inheritance diagram for GroveDevices.Grove_Button:
PiStorms_GRX.GrovePort

Public Member Functions

def __init__
 
def isPressed
 @ return True if the button is pressed, False if the button is released
 
- Public Member Functions inherited from PiStorms_GRX.GrovePort
def __init__
 

Additional Inherited Members

- Public Attributes inherited from PiStorms_GRX.GrovePort
 comm
 
 readValue
 
 writeValue
 

Detailed Description

This class supports the Grove Button v1.1.

The Grove Button is a momentary push button. The button will release when you let go.

Documentation: http://wiki.seeed.cc/Grove-Button/

1 import GroveDevices
2 # initialize a button connected to Bank A digital 1
3 button = GroveDevices.Grove_Button("BAD1")
4 if (button.isPressed()):
5  print("Pointless button pressed (warning: pointless).")

The documentation for this class was generated from the following file: