Skip to content

Commit

Permalink
Clean up active-low relay code.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan-in-CA committed Jun 10, 2017
1 parent ca6f8a3 commit 348febd
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions gpio_pins.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ def setup_pins():
pin_sr_clk = gv.pin_map[7]
pin_sr_noe = gv.pin_map[11]
pin_sr_lat = gv.pin_map[15]
pin_tr = gv.pin_map[8]

elif gv.platform == 'bo': # If this will run on Beagle Bone Black:
pin_sr_dat = gv.pin_map[11]
pin_sr_clk = gv.pin_map[13]
Expand Down Expand Up @@ -126,10 +124,7 @@ def setup_pins():
GPIO.output(pin_sr_noe, GPIO.HIGH)
GPIO.output(pin_sr_clk, GPIO.LOW)
GPIO.output(pin_sr_dat, GPIO.LOW)
GPIO.output(pin_sr_lat, GPIO.LOW)
if gv.sd['alr']:
GPIO.setup(pin_tr, GPIO.OUT)
GPIO.output(pin_tr, GPIO.HIGH)
GPIO.output(pin_sr_lat, GPIO.LOW)
except NameError:
pass

Expand Down

0 comments on commit 348febd

Please sign in to comment.