Servomotor with 3 push button, ayuda!

¿Buenas tardes, alguien me puede ayudar a programar un servomotor con 3 push button?
Tengo que programar un servomotor de 180 grados.

El 1er boton 0 cero grados.
El 2 segundo 90 grados.
El 3 tercero a 180 grados.

Los botones no se deben mantener oprimidos.
SI no presionas nada se debe de quedar en la ultima posicion.
Ya hice que funcionara, pero no logro mantenerlos en la posicion.

Espero alguien me ayude por favor.


Please translate your questions to English, or ask them in the Spanish - language forum.
If i understood well, you already have tried something, but you can't remember the last pushed button or keep the servo at the desired position.

To help you out with that, post your entire code, and put that in [code] [/code] tags please.

[Good afternoon. Could somebody help me to programming a servomotor with 3 push button ?
I have to programming a servomotor of 180 degrees
The first button , 0 degrees
The second, 90 degrees
The third, 180 degrees

The buttons must not be kept opressed
If you don't press anything, it must be in the last position.
I could already make it work, but I can't keep them in position
I hope that somebody help me please.

I hope that somebody help me please.

Post the code you wrote, and I'm sure someone will have some suggestions to get it working. (It's not usual here for members to write code from the beginning, but rather we help with existing code that has problems.)

Simple servo button code for two buttons. You should be able to add a third button.

//zoomkat servo button test 12-29-2011
// Powering a servo from the arduino usually *DOES NOT WORK*.

#include <Servo.h>
int button1 = 4; //button pin, connect to ground to move servo
int press1 = 0;
int button2 = 5; //button pin, connect to ground to move servo
int press2 = 0;
Servo servo1;

void setup()
  pinMode(button1, INPUT);
  pinMode(button2, INPUT);
  digitalWrite(4, HIGH); //enable pullups to make pin high
  digitalWrite(5, HIGH); //enable pullups to make pin high

void loop()
  press1 = digitalRead(button1);
  if (press1 == LOW)
  press2 = digitalRead(button2);
  if (press2 == LOW)