It works a treat, thank you Paul. I've programmed 5 buttons plus the 'push' function of the rotary encoder, and they all work as expected. Even the partially documented CMD_LONG seems to work, as well as the previously documented POWR command. :)
It turns out the 5V is what the rotary encoder uses to generate the high pulses when the encoder is turned. It works just as well with 3.3V. The push function simply connects the SW pin to the GND pin, like any of my other button switches. I discovered that I can't simultaneously use the same pins to control the volume with the rotary encoder and my separate VOL+ and VOL- buttons - I guess that's because of a clash between the pulses generated by the encoder and the pull-up setting for the separate buttons. In my planned installation I probably won't use the rotary encoder at all, just the up and down button, but in testing I got it all to work by just using two different pins for the encoder. Great stuff. So now I can get on with planning an amplifier build with a built-in pCP RPi with some hardware buttons. The amplifier will be based on a Hypex DLCP, so I've been having a go at designing a PCB (my first!) to match the button layout on the DLCP input board - it's symmetric/reversible, so I'll probably mount it to mirror the DLCP buttons. I'm intending that it'll have an input box header to connect to the RPi, plus another to allow daisy-chaining another HAT, plus pin connections to allow the buttons and IR receiver to connect to whichever GPIO pins are still free (allowing for the daisy-chained HAT), either with hard-soldered leads or via header sockets and fly-leads. [image: http://www.cjh.me.uk/MyPhotobucket/cache/DIYHifi/DLCP%20Project/RPi%20Button%20Board%202_512.jpg] [image: https://www.diyclassd.com/img/cache/r_300_166.2_producten_2_dlcp-add-on-set.jpg] ------------------------------------------------------------------------ chill's Profile: http://forums.slimdevices.com/member.php?userid=10839 View this thread: http://forums.slimdevices.com/showthread.php?t=107001 _______________________________________________ diy mailing list diy@lists.slimdevices.com http://lists.slimdevices.com/mailman/listinfo/diy