Prevent program to start running after boot/upload

Hey guys

I’ve created my first and pretty decent program for a bag welding machine, worked almost like a charm! But I’ve got an annoying issue though. As soon as I boot the machine or upload a refreshed version of the sketch, the machine/program starts running one full sequence immediately and since it’s doing a lot of relay/welding/stepper action, it’s definately not desirable. I can add a screenshot tomorrow. On top of the sketch are 3 buttons that pulse true when pressed and initiate individual cycles. I’m using the regular 3 pin development push buttons that are wired to 5v . The program ends on defer node, and also using multiple defers in between nodes cause i had to prevent some loop alerts.

Thanks,
Dan

Your switches go high when pressed, but you are seeing them pulse true on boot? You have a resistor on your digital pins for switches wired to ground to prevent them from floating? I don’t think I’ve every run into this problem. Could it be something lower in your program triggering on boot?

Hi!

I may have found the issue, but haven’t wrapped my head around the issue yet.

My buttons use an internal 10k resistor. When pressed, I get +5v on my signal pin. When not pressed, I measure 10k to ground and 0 voltage.

When I plug the pin into my digital port after measuring, it receives a ´push´signal once and the motor moves. Same when I remove ground connection from my button and re-apply it, without pushing anything.

My button nodes are set ´true´on PRS, but my watch node shows true when not pressed and turn false when I hold down the button ? When I change PRS to false, watch still shows false when pressed but else nothing seems to change ?

I seem to suffer a great brain fart here since beside my startup issue, I had to reverse wire my relays so that they are open circuit when pulled and closed when not active, which I don’t like at all, but even when changing ACT on the relay node, I couldn’t get them to work otherwise.

edit: The corresponding text for the button node shows: ‘Reads a generic button or another mechanical switch. It is expected that the button is low while pressed’

That’s basically not what I want ?

edit2: When I use digital read instead of button, it shows the proper way

Craving for suggestions

Thanks

Dan