Bellerophontes
Posts: 2
Joined: Mon Nov 16, 2015 12:48 am

info when a wire is pulled out of pin

Mon Nov 16, 2015 1:03 am

Hi to all,
I'm new here (and to Raspi) and have a question:

I want to build a fun game based on "defusing a time bomb". :shock: :lol:

The idea is to have five wires on a breadboard connected to five pins. You have to figure out which wire you have to pull first, second and so on.

But ... I have no idea how to get a signal "wire pulled" from the pin into a variable ...


It's not about the coding (I know a little python) but about the wiring and stuff.


thanks for your help

sprinkmeier
Posts: 410
Joined: Mon Feb 04, 2013 10:48 am
Contact: Website

Re: info when a wire is pulled out of pin

Mon Nov 16, 2015 11:16 am

think of the wire as a button that's being pressed.
pulling out the wire is the same as releasing the button.

Lots of code around to check button presses/releases...

hint: internal pull-up

Bellerophontes
Posts: 2
Joined: Mon Nov 16, 2015 12:48 am

Re: info when a wire is pulled out of pin

Mon Nov 16, 2015 1:51 pm

Thanks for the hints - I will try it later today and give feedback (or more questions, ...)

Return to “Python”