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

**URL:** <https://forum.makecode.com/t/rotation-roll-sensor-that-is-adjustable-a-buzzer-that-will-let-you-know-when-the-rc-truck-is-about-to-roll-over/22486>\
**Category:** micro:bit\
**Tags:** make\
**Created:** [September 15, 2023, 7:09pm UTC](https://forum.makecode.com/t/rotation-roll-sensor-that-is-adjustable-a-buzzer-that-will-let-you-know-when-the-rc-truck-is-about-to-roll-over/22486 "2023-09-15T19:09:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Benchmade](https://avatars.discourse-cdn.com/v4/letter/b/22d042/32.png) [@Benchmade](https://forum.makecode.com/u/Benchmade)\
**Post date:** [September 15, 2023, 7:09pm UTC](https://forum.makecode.com/t/rotation-roll-sensor-that-is-adjustable-a-buzzer-that-will-let-you-know-when-the-rc-truck-is-about-to-roll-over/22486/1 "2023-09-15T19:09:48Z")

</div>

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…  
[www.youtube.com/watch](https://www.youtube.com/watch?v=_6BpXRFIaes)

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

 ![IMG_0878](https://us1.discourse-cdn.com/flex020/uploads/makecode/original/2X/6/6ce3af83ed052af71ebaf28ba6a3b9ae75f21381.jpeg)
