Any pointers would be appreciated.
Cheers,
Ric
This has been very helpful but I have a problem - the position counter only decrements in my python code. The signals from my AMT103-V capacitive encoder from CUI, Inc, look good on my oscilloscope but unplugging P2_33 doesn't change a thing (position continues to decrement) while unplugging P2_24 stops eqep2 from counting. Reversing the two external signal wires produces the same output so this is consistent with P2_24 being the only active pin.
###Code:
from Adafruit_BBIO.Encoder import RotaryEncoder, eQEP0
from Adafruit_BBIO.Encoder import RotaryEncoder, eQEP2
import time
myEncoder0 = RotaryEncoder(eQEP0)
myEncoder2 = RotaryEncoder(eQEP2)
while (1):
cur_position0 = myEncoder0.position
cur_position2 = myEncoder2.position
print cur_position0, cur_position2
time.sleep(1)
################ output of sudo /opt/scripts/tools/version.sh
git:/opt/scripts/:[a890d66119f9b84505b4c162ce90ffce977475b5]
eeprom:[A335PBGL00A21736GPB20285]
model:[TI_AM335x_PocketBeagle]
dogtag:[BeagleBoard.org Debian Image 2018-04-07]
bootloader:[microSD]:[/dev/mmcblk0]:[U-Boot 2018.03-00002-gac9cce7c6a]:[location: dd MBR]
kernel:[4.4.113-ti-r149]
nodejs:[v4.9.1]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/pb_eqep0.dtbo]
uboot_overlay_options:[uboot_overlay_addr1=/lib/firmware/pb_eqep2.dtbo]
uboot_overlay_options:[disable_uboot_overlay_emmc=1]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[disable_uboot_overlay_wireless=1]
uboot_overlay_options:[disable_uboot_overlay_adc=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg:[bb-cape-overlays]:[4.4.20180405.0-0rcnee0~jessie+20180405]
pkg:[bb-wl18xx-firmware]:[1.20180328-0rcnee2~jessie+20180328]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~jessie+20180328]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal netdev i2c bluetooth cloud9ide gpio pwm eqep admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[ 1.218276] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
##############/boot/uEnv.txt
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0
uname_r=4.4.113-ti-r149
#uuid=
#dtb=
###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
uboot_overlay_addr0=/lib/firmware/pb_eqep0.dtbo
uboot_overlay_addr1=/lib/firmware/pb_eqep2.dtbo
#uboot_overlay_addr2=/lib/firmware/<file2>.dtbo
#uboot_overlay_addr3=/lib/firmware/<file3>.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/<file4>.dtbo
#uboot_overlay_addr5=/lib/firmware/<file5>.dtbo
#uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
#uboot_overlay_addr7=/lib/firmware/<file7>.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
disable_uboot_overlay_wireless=1
disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.4.x-ti kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo
###pru_rproc (4.9.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-9-TI-00A0.dtbo
###pru_rproc (4.14.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_uio (4.4.x-ti, 4.9.x-ti, 4.14.x-ti & mainline/bone kernel)