The resist function is how to set the internal input resistors. They either are set to Pull Up to 3.3v Pull Down to 0v or Off.
Since your buttons connect the 0v line to the rpi input pin, you want to set the resistor to pull up, and then the "pressed" condition is 0 (This is the default setup of spbd). You should not interface 5 volts with any device that is not isolated from the pi. If 5 volts gets to the input pin, it will fry the input. Your encoder should work fine with 3.3v supply. As for the long press, it was intuitive for me....but then I programmed it :) Short of using a configuration file, I thought this was what made the most sense. b,17,PLAY,2,0,POWR,1500 This will set the pull up resistor on pin 17, when the state of pin 17=0, the software acknowledges the button is pressed. If the button is released before 1.5 seconds, the PLAY command is sent, if the button is held for longer than 1.5 seconds, the POWER command is sent. piCorePlayer a small player for the Raspberry Pi in RAM. Homepage: https://sites.google.com/site/picoreplayer/home Please 'donate' (https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=U7JHY5WYHCNRU&lc=GB¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donateCC_LG%2egif%3aNonHosted) if you like the piCorePlayer ------------------------------------------------------------------------ paul-'s Profile: http://forums.slimdevices.com/member.php?userid=58858 View this thread: http://forums.slimdevices.com/showthread.php?t=107001 _______________________________________________ diy mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/diy
