# Simple script help

**URL:** https://forum.pololu.com/t/simple-script-help/5434
**Category:** Servo controllers and servos
**Created:** [January 21, 2013, 9:16pm UTC](https://forum.pololu.com/t/simple-script-help/5434 "2013-01-21T21:16:39Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![EFries531](https://forum.pololu.com/letter_avatar_proxy/v4/letter/e/b782af/32.png) [@EFries531](https://forum.pololu.com/u/EFries531)
#### Post date: [January 21, 2013, 9:16pm UTC](https://forum.pololu.com/t/simple-script-help/5434/1 "2013-01-21T21:16:39Z")

</div>

Please help me write a script in maestro language so that a touch of a button the servo rotates 90 degrees, delays a sec, then returns to original position. I must be dumb so leave no details out.

---

<div class="post-metadata">

### Author: ![ryantm](https://forum.pololu.com/user_avatar/forum.pololu.com/ryantm/32/8302_2.png) [@ryantm](https://forum.pololu.com/u/ryantm)
#### Post date: [January 22, 2013, 12:11am UTC](https://forum.pololu.com/t/simple-script-help/5434/2 "2013-01-22T00:11:43Z")

</div>

Hello.

The [Maestro user’s guide](https://www.pololu.com/docs/0J40) has a lot of good information about working with the Maestro. In particular, Section 6.c has an example script for using a button to control servos. Section 7.b shows how to wire a switch or button to a Maestro.

- Ryan

---

<div class="post-metadata">

### Author: ![EFries531](https://forum.pololu.com/letter_avatar_proxy/v4/letter/e/b782af/32.png) [@EFries531](https://forum.pololu.com/u/EFries531)
#### Post date: [January 22, 2013, 10:51pm UTC](https://forum.pololu.com/t/simple-script-help/5434/3 "2013-01-22T22:51:55Z")

</div>

I’m clueless. I have no programming experience and the documentation looks like hieroglyphics.  
I entered the code below and the servo did nothing. What’s the issue?

begin  
8000 0 servo  
500 delay  
4000 0 servo  
repeat

I’m using:  
Sub-Micro Servo 3.7g (Generic)  
Micro Maestro 6-Channel USB Servo Controller (Assembled)

---

<div class="post-metadata">

### Author: ![ryantm](https://forum.pololu.com/user_avatar/forum.pololu.com/ryantm/32/8302_2.png) [@ryantm](https://forum.pololu.com/u/ryantm)
#### Post date: [January 22, 2013, 11:25pm UTC](https://forum.pololu.com/t/simple-script-help/5434/4 "2013-01-22T23:25:45Z")

</div>

I’m sorry the documentation is not easy for you to use. If you tell me the exact part of it that is not clear to you, I can try to clarify for you. The immediate thing that comes to mind about your script is you are not delaying after setting the servo to 4000, so it will spend no time at that position. Also, you haven’t described how you have everything connected. A picture of your setup would be a quick way to do that.

- Ryan
