Skip to content

Commit

Permalink
added shebang line to example.py
Browse files Browse the repository at this point in the history
  • Loading branch information
gandalf15 committed Sep 5, 2017
1 parent aeab2db commit 1af6aa3
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion example.py
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
#!/usr/bin/env python3
from hx711 import HX711 # import the class HX711
import RPi.GPIO as GPIO # import GPIO
import time
Expand All @@ -8,7 +9,7 @@
# If you do not pass any argument 'gain_channel_A' then the default value is 128
# If you do not pass any argument 'set_channel' then the default value is 'A'
# you can set a gain for channel A even though you want to currently select channel B
hx = HX711(dout_pin=20, pd_sck_pin=21, gain_channel_A=128, select_channel='B')
hx = HX711(dout_pin=21, pd_sck_pin=20, gain_channel_A=128, select_channel='B')

result = hx.reset() # Before we start, reset the hx711 ( not necessary)
if result: # you can check if the reset was successful
Expand Down

0 comments on commit 1af6aa3

Please sign in to comment.