First of all, thank you to the community that contributes to this forum!
I have read through all the posts in recent days, and as a result was able to successfully get a pCP up and running with a working instance of the SqueezeButtonPi Daemon allowing me to collect the input from a few simple push-buttons on a breadboard despite having no particular experience with "physical computing". I would now like to move beyond the breadboard and replace my prototype push-buttons. I want instead to wire the pCP into an old radio enclosure and use the radio's old 1950s selector buttons. These buttons are mechanical and depressing them shifts a metal contact between two sets of lugs/pins. I am not sure how to capture this action using SBPD and am looking for some help. With the breadboard push-buttons, I had wired one end to a GPIO pin and the other to a ground pin on the Raspberry Pi. I can see that depressing the button momentarily closes the contact between the two before the button pops back, breaking the contact. As far as I can tell the default behaviour for SBPD is to read the breaking of the contact as the button comes back up as a "button push" event. I've started the daemon with this command to define a button using pin 21. sbpd --verbose b,21,CMD1 -f /home/tc/sbpd_commands.cfg This works great, but in the radio enclosure with a different style of switch/button, once pushed, the button stays pushed (in a depressed position). The contact is made, but not subsequently broken (unless and until I push a second selector button). Is there a command option I can pass to sbpd that will recognize the simple action of making, but not subsequently breaking, the contact on a single pin as a button push event? I was hopeful at first that the CMD_LONG option would fire once the specified millisecond period had elapsed, but on testing found again that it only recognizes a button push if I break the contact. I was able to get some function going by starting the daemon with the CMD_LONG option, and by flipping the GPIO pin state option to 1 from 0. sbpd --verbose b,21,RDO1,2,0,RDO2,1500 With that command running, I got the following results: 1) pushing the button down to make the contact - no action; 2) disengaging the button to break the contact, no action; and 3) then finally pushing the button down a second time to re-engage the contact - sbpd finally recognized a long button push. Still, I'm hopeful there is an alternative way to structure this so that the first time I push down one of the radio enclosure's mode selector buttons and connect the circuit that a button push event can be recognized by sbpd. I would really appreciate any ideas or suggestions. I've attached an image of the mode selector buttons if it helps to visualize this. The mechanism allows for any one of the 4 mode selector buttons to be engaged at one time. Pushing any of the other three while one is depressed will disengage the previous selection. There is also a fifth "off" button which disengages whichever of the 4 mode selector buttons may potentially be engaged. 35704 +-------------------------------------------------------------------+ |Filename: IMG_3758.jpg | |Download: http://forums.slimdevices.com/attachment.php?attachmentid=35704| +-------------------------------------------------------------------+ ------------------------------------------------------------------------ Turner1200's Profile: http://forums.slimdevices.com/member.php?userid=72084 View this thread: http://forums.slimdevices.com/showthread.php?t=107001 _______________________________________________ diy mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/diy
