I am looking for a simple circuit setup for reading external(not PiFace on board buttons) push button event.
I have PiFace and push button, I want to setup a circuit and read button push event using Python 3.
any help will be much appreciated.
I am looking for a simple circuit setup for reading external(not PiFace on board buttons) push button event.
I have PiFace and push button, I want to setup a circuit and read button push event using Python 3.
any help will be much appreciated.
Hi Sharique,
It is described at this URL. According to this, the input connections on the PFD are already internally pulled-up to 5V (meaning through a resistance). Therefore, all you need to do is connect one wire of a switch to the input, and the other wire to 0V.
this is what exactly I was looking for, many thanks.
I am looking for polled based event, basically I am moving object using stepper motor until it reaches the end of rail, so how software is going to know when to stop further rotation once object reach the end? so I come up with an idea of placing a push button at the end of rail. as soon as object reach end of rail it will hit the push button and trigger "push" event and software will know that this is a time to stop.
this is my approach but if you know any batter approach then please let me know.
The button idea isn't bad. you could do something similar with a hall-effect sensor and a 'permanent' magnet. This would improve MTBF, probably. I once made a little tank agitator that just had a stepper motor change direction when it reached its limits. Acme screws and drawer slides on plywood. Worked okay, tended to establish nodes, though.
IMHO you should go for an ISR rather than use polling in this application, although either method can be made to work.