Home | History | Annotate | Download | only in python

Lines Matching defs:relay

26 # Create the relay switch object using GPIO pin 0
27 relay = grove.GroveRelay(0)
29 # Close and then open the relay switch 3 times,
30 # waiting one second each time. The LED on the relay switch
34 relay.on()
35 if relay.isOn():
36 print relay.name(), 'is on'
38 relay.off()
39 if relay.isOff():
40 print relay.name(), 'is off'
43 # Delete the relay switch object
44 del relay