Is there a block that just stops code

So basically how my code works, is that when our box is opened it reads pin 1 and that activates a Photocell resistor. So whenever the box reads 100 on the Photocell Resistor in causes a buzzer to start ringing. It also sends a signal to another Mircro:Bit. The other Micro:Bit when it recieves the number will display danger. Then once button A is pressed it should send a signal back over to the original Micro:Bit. Then in that recieved number code it is supposed to stop all sound but since the box is still opened and it is still reading light level the sound will stop for a split-second then continue beeping.
image This is the first Micro:Bit
image This is the one in sends the signal to

Would you mind sharing a link to the code? I have a few ideas, but to make sure they really work, I’ll need to test them in your actual program.

Right off the top of my head, I’d suggest making a flag. Have a variable called “going” and add a check for going==1 to your conditional.

1 Like