We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 790deb2 commit c6b314cCopy full SHA for c6b314c
Adafruit_BBIO/Encoder.py
@@ -143,6 +143,7 @@ def getPosition(self):
143
position = position_handle.read()
144
print("getPosition(): position: {0}".format(position))
145
#return sysfs.kernelFileIO(position_file)
146
+ return position
147
148
def setFrequency(self,freq):
149
'''
test/test_rotary.py
@@ -1,7 +1,9 @@
1
#!/usr/bin/python
2
3
import Adafruit_BBIO.Encoder as Encoder
4
-# A on P8.11 and B on P8.12
+# P8.11: eqep2b_in
5
+# P8.12: eqep2a_in
6
+# run "config-pin p8.11 qep && config-pin p8.12 qep"
7
qep = Encoder.RotaryEncoder(2)
8
#qep = Encoder.QEP()
9
print qep
0 commit comments