Bit more consistent error handling / status updates for Pi GPIO node

This commit is contained in:
dceejay
2015-02-03 17:22:32 +00:00
parent 07acc6642f
commit a22f819f40
2 changed files with 40 additions and 22 deletions

View File

@@ -19,6 +19,10 @@ import sys
bounce = 20 # bounce time in mS to apply
if sys.version_info >= (3,0):
print("Sorry - currently only configured to work with python 2.x")
sys.exit(1)
if len(sys.argv) > 1:
cmd = sys.argv[1].lower()
pin = int(sys.argv[2])