raspberry pin --> auto triggering

Nov 18, 2016 2 Replies

Ok. I spend few hours thinking that there must be something wrong with code or HW but the real problem is quite weird.



I have rsp model 2B adn few programs running on the device. Just one program is using pin 36 as listener for button press.



Now the funny part :-) If the pin has nothing on it, totally nothing, i get correct values. In other words, program is waiting for button press.



If i connect ONE wire ( cca 10 cm wire ) to that pin, WITHOUT to connect the other part of the wire to GND, i get impulse like if the button was pressed ??



If i leave this wire connected and restart the whole rsp i get the same situation, auto triggering. Wtf ?.



I disconnect the wire, everything works OK. Is it possible that there is some static picked up by this wire and if so, how to solve this ?



GM


Resistor to ground or local power (might be able to achieve this by suitable programming)

I added pull up setup with two resistors ( 10 / 1 K ) and it solved the problem. Btw. setting pullup in sw didnt work.

Thank you for your answer anyway ! Regards.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required