Hi. I’m trying to use the Adafruit_BBIO.Encoder library on kernel 4.4.87, but cannot seem to get it working. I think everything initializes ok, but my readings are just continuous ‘0’. I think the issue might be that I can’t configure the pins:
root@bela:~/Robut# config-pin P8.33 qep
P8_33 pinmux file not found!
bash: /sys/devices/platform/ocp/ocp*P8_33_pinmux/state: No such file or directory
Cannot write pinmux file: /sys/devices/platform/ocp/ocp*P8_33_pinmux/state
I have the universal cape loaded:
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,BB-PWM1
5: P-O-L- 1 Override Board Name,00A0,Override Manuf,cape-universaln
6: P-O-L- 2 Override Board Name,00A0,Override Manuf,BB-ADC
I get that for all the pins I try to configure. I went through the HDMI disable in /mnt/boot/uEnv.txt:
disable_uboot_overlay_audio=1
disable_uboot_overlay_video=1
My code is :
from Adafruit_BBIO.Encoder import RotaryEncoder, eQEP2, eQEP1
Enc1 = RotaryEncoder(eQEP1)
Enc1.enable()
Enc1.setAbsolute()
Enc2 = RotaryEncoder(eQEP2)
Enc2.enable()
Enc2.setAbsolute()
print (Enc1.position)
print (Enc2.position)
Is there anything I’m doing wrong or not doing?
Thanks for any help offered!