Jump to content

cticer

Member
  • Posts

    1
  • Joined

  • Last visited

Everything posted by cticer

  1. I was having a similar issue, and I have just resolved it. Maybe this will help you too. When I would apply my code to the PB, I would leave it in a deactivated state. When I activated the PB, the code for its start() would run. Then it would deactivate. So when I went to test my button pressed() event, it would never trigger. And so my system.print() calls that were referenced in the pressed() event of my button could never execute. Turns out that the PB must be in an active state for the rest of the code to run. So in my case, I had a bit of a misunderstanding in how the code lifecycle of a PB would execute. So put your PB in active state, and then activate your switch, and then the code you're expecting should run.
×
×
  • Create New...