
7
grovepi.digitalWrite(relay,0)
time.sleep(.05)
except KeyboardInterrupt:
grovepi.digitalWrite(relay,0)
break
except IOError:
print "Error"
3.3.1 Run the program
1. Find the path to the file(According to your own path)
cd GrovePi/Software/Python/
2. Run Program
sudo python grove_switch_relay.py