Rotation, Roll sensor, that is adjustable. A buzzer that will let you know when the RC truck is about to roll over

I would like to know the steps on how to capture the role of an RC vehicle, before it is about to roll on its side. The micro:bit can be placed on the RC vehicle on the roll axis.

Micro:bit will be placed on the RC truck, Roll axis . Then A switch will Capture 0 value of the roll value. Then the RC truck will be tilted at 90° or whatever the role value is, before it tips over.

Here is what I have on my micro:bit, to capture the data when the A switch is pressed. When the B button is pressed down, it captures the angle of the roll.

What I don’t know is how to include the buzzer so when it gets to the point of the data captured on the B switch, it will start buzzing.

I do have a YouTube video of an example…

Here is the micro:bit code that I have in blocked so far.