# Rotate servo motor in anticlockwise direction

**URL:** <https://forum.makecode.com/t/rotate-servo-motor-in-anticlockwise-direction/26523>\
**Category:** micro:bit\
**Created:** [February 1, 2024, 5:28pm UTC](https://forum.makecode.com/t/rotate-servo-motor-in-anticlockwise-direction/26523 "2024-02-01T17:28:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![a\_second\_person](https://avatars.discourse-cdn.com/v4/letter/a/65b543/32.png) [@a\_second\_person](https://forum.makecode.com/u/a_second_person)\
**Post date:** [February 1, 2024, 5:28pm UTC](https://forum.makecode.com/t/rotate-servo-motor-in-anticlockwise-direction/26523/1 "2024-02-01T17:28:11Z")

</div>

Hello :). I need some help in makecode so i can rotate an MG995 servo motor in anticlockwise direction and also to make it stop when it is done turning

---

<div class="post-metadata">

**Author:** ![bsiever](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.makecode.com/bsiever/32/1032_2.png) [@bsiever](https://forum.makecode.com/u/bsiever)\
**Post date:** [February 1, 2024, 10:22pm UTC](https://forum.makecode.com/t/rotate-servo-motor-in-anticlockwise-direction/26523/2 "2024-02-01T22:22:22Z")

</div>

Hi @a_second_person & welcome to the forum!

Do you mean you want 0 to be full rotation and 180 to be no rotation? The `map` function in the `math` toolbox may behave the way you want. Here’s an example: [https://makecode.microbit.org/S32402-55227-51399-33502](https://makecode.microbit.org/S32402-55227-51399-33502)
