Hi there My goal is to connect 16 PEC11 Encoders to the BeagleBone Black. I'm using this Library https://github.com/guyc/py-gaugette. And I'm running the newest debian on my beaglebone.
I created a new device tree overlay as Derek Moloy explained in this video https://www.youtube.com/watch?v=wui_wU1AeQc setting my used gpios to mode7 and I've also read this https://learn.adafruit.com/introduction-to-the-beaglebone-black-device-tree/device-tree-overlays article about exporting device tree overlays. But I don't know how to manipulate the uEnv.txt correctly so that at Boottime my BBB uses only my DTO. This is my uEnv.txt: ##Video: Uncomment to override: ##see: https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/fb/modedb.txt #kms_force_mode=video=HDMI-A-1:1024x768@60e ##Enable systemd systemd=quiet init=/lib/systemd/systemd ##BeagleBone Cape Overrides ##BeagleBone Black: ##Disable HDMI/eMMC #cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G ##Disable HDMI #cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN ##Audio Cape (needs HDMI Audio disabled) #cape_disable=capemgr.disable_partno=BB-BONELT-HDMI #cape_enable=capemgr.enable_partno=BB-BONE-AUDI-02 ##Example #cape_disable=capemgr.disable_partno= #cape_enable=capemgr.enable_partno= ##WIP: v3.14+ capes.. #cape=ttyO1 #cape= ##note: the eMMC flasher script relies on the next line mmcroot=UUID=fa05f7e9-337d-4eb2-bb58-5e2eee8baac7 ro mmcrootfstype=ext4 rootwait fixrtc ##These are needed to be compliant with Angstrom's 2013.06.20 u-boot. console=ttyO0,115200n8 kernel_file=zImage initrd_file=initrd.img loadaddr=0x82000000 initrd_addr=0x88080000 fdtaddr=0x88000000 initrd_high=0xffffffff fdt_high=0xffffffff loadkernel=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${kernel_file} loadinitrd=load mmc ${mmcdev}:${mmcpart} ${initrd_addr} ${initrd_file}; setenv initrd_size ${filesize} loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdtaddr} /dtbs/${fdtfile} loadfiles=run loadkernel; run loadinitrd; run loadfdt mmcargs=setenv bootargs console=tty0 console=${console} ${optargs} ${cape_disable} ${cape_enable} ${kms_force_mode} root=${mmcroot} rootfstype=${mmcrootfsty$ uenvcmd=run loadfiles; run mmcargs; bootz ${loadaddr} ${initrd_addr}:${initrd_size} ${fdtaddr} capemgr.enable_partno=DM-GPIO-Test # I'dont know where excalty i should add capemgr.enable_partno=DM-GPIO-Test. And do I also have to disable any other DTO? My Device-Tree-Overlay: /* * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.com/ * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Purpose License Version 2 as * published by the Free Software Foundation * * Original from: github.com/jadonk/validation-scripts/blob/master/test-capemgr/ * * Modified by Derek Molloy for the example on www.derekmolloy.ie * that maps GPIO pins for the example */ /dts-v1/; /plugin/; /{ compatible = "ti,beaglebone", "ti,beaglebone-black"; part-number = "DM-GPIO-Test"; version = "00A0"; fragment@0 { target = <&am33xx_pinmux>; __overlay__ { pinctrl_test: DM_GPIO_Test_Pins { pinctrl-single,pins = < 0x090 0x17 /* P8_07 MODE7 */ 0x094 0x17 /* P8_08 MODE7 */ 0x09c 0x17 /* P8_09 MODE7 */ 0x098 0x17 /* P8_10 MODE7 */ 0x034 0x17 /* P8_11 MODE7 */ 0x030 0x17 /* P8_12 MODE7 */ 0x024 0x17 /* P8_13 MODE7 */ 0x028 0x17 /* P8_14 MODE7 */ 0x03c 0x17 /* P8_15 MODE7 */ 0x038 0x17 /* P8_16 MODE7 */ 0x02c 0x17 /* P8_17 MODE7 */ 0x08c 0x17 /* P8_18 MODE7 */ 0x020 0x17 /* P8_19 MODE7 */ 0x07c 0x17 /* P8_26 MODE7 */ 0x070 0x17 /* P9_11 MODE7 */ 0x078 0x17 /* P9_12 MODE7 */ 0x074 0x17 /* P9_13 MODE7 */ 0x048 0x17 /* P9_14 MODE7 */ 0x040 0x17 /* P9_15 MODE7 */ 0x04c 0x17 /* P9_16 MODE7 */ 0x15c 0x17 /* P9_17 MODE7 */ 0x158 0x17 /* P9_18 MODE7 */ 0x154 0x17 /* P9_21 MODE7 */ 0x150 0x17 /* P9_22 MODE7 */ 0x044 0x17 /* P9_23 MODE7 */ 0x184 0x17 /* P9_24 MODE7 */ 0x180 0x17 /* P9_26 MODE7 */ 0x1a4 0x17 /* P9_27 MODE7 */ /* OUTPUT GPIO(mode7) 0x07 pulldown, 0x17 pullup, 0x?f no pullup/down */ /* INPUT GPIO(mode7) 0x27 pulldown, 0x37 pullup, 0x?f no pullup/down */ >; }; }; }; fragment@1 { target = <&ocp>; __overlay__ { test_helper: helper { compatible = "bone-pinmux-helper"; pinctrl-names = "default"; pinctrl-0 = <&pinctrl_test>; status = "okay"; }; }; }; }; My little Python Test script so far: import gaugette.rotary_encoder A_PIN = [] B_PIN = [] enc_val =[] encoder = [] A_PIN.append("P8_7") A_PIN.append("P8_9") A_PIN.append("P8_11") A_PIN.append("P8_13") A_PIN.append("P8_15") A_PIN.append("P8_17") A_PIN.append("P8_19") B_PIN.append("P8_8") B_PIN.append("P8_10") B_PIN.append("P8_12") B_PIN.append("P8_14") B_PIN.append("P8_16") B_PIN.append("P8_18") B_PIN.append("P8_26") print "Initial Values" for i in range(len(A_PIN)): encoder.append(gaugette.rotary_encoder.RotaryEncoder(A_PIN[i], B_PIN[i])) enc_val.append(0) delta = encoder[i].get_delta() print "rotate" + str(i) + " %d" %delta + "value" + str(i) + " %d" %enc_val[i] while True: for i in range(len(encoder)): delta = encoder[i].get_delta() enc_val[i] += delta if delta !=0 : print "rotate" + str(i) + " %d" %delta + "value" + str(i) + " %d" %enc_val[i] I would really appreciate if somebody could help me with this. -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
