Buttons stop working over time

I’m using python3.7 on a raspberry pi. I have a bunch of buttons to control a relay. Just after starting my script they work as expected, but after a little time they just don’t work.
I’d appreaciate any help. Thanks.

Could be badly written code, power supply issues or a number of other issues, but the information you’ve provided does t really help us to help you.


Everything else in my code works as expected, handling a write to virtual pin is just 1 line of code so there is not much margin for error.
In the fuctions that trigger when the buttons are pressed, I have a print statement to I can check in the console if it registered. Again, it works when I just start it. I’ve noticed that sometimes it still works after a while, and sometimes it doesn’t, but I wouldn’t like to be away from home and not being able to control it.
I have no power issues. Please let me know what you would need and I’ll provide everything I can.

This would probably be a good starting point…

  1. Add details :
    • Hardware model + communication type. For example: Arduino UNO with Ethernet Shield
    • Smartphone OS (iOS or Android) + version
    • Blynk server or local server
    • Blynk Library version
    • Add your sketch code. :point_up:Code should be formatted as example below.

Simply paste your code between ``` If you don’t format your code, your topic can be deleted by moderators.

void loop()
1 Like