Help programming servo

Hello everybody I wanted to ask you if you could help me programming a servo.
For my project Im making an evaporative cooler for class.
This machine needs two controllers, one is an automatic (directly controlled by arduino) and the second one is a manual (controlled by a potenciometer). Both selected by a switch.

For the manual I used:

valor = analogRead(potpin);
valor = map(valor, 0, 1023, 0, 180);

The code worked pretty well.
The problem is that for the automatic part I need to use numbers obtained from a equation.
I´ll give you an idea of what I did:

int grados;
int velocidad;

velocidad is a number that is obtained from different comparison between data from temperature sensors; for example, for a temperature of 25°C the number for "velocidad" is 2.3 and so on for the rest of temperatures.

After that I calculate grados using a complex equation.

grados= (8.996*pow(10,-5)velocidadpow(10,3)) + etc...

"grados" is a value that is between 60 to 110.

The value I get is the one I want to send to the servo but using the maping code doesn´t work, I did this:

grados= map(grados,60,110,0,180);

Do you know if the servo code only reads values from 0 to 1023? is there another way to send integer values to the servo? or does the servo only work with potenciometer values?

Please help me!
And thanks.

Can you provide the Code

I tried the code you gave me and it worked godivaPrima, the problem is that only works when I have only that program in hand, let me add the code:

#include <Servo.h>
Servo myservo;
int grados=0;
int val=0;
int pot=0;
const int button=10;
int buttonstate=0;

void setup()
  // put your setup code here, to run once:

void loop()
  if (buttonstate==HIGH){
  val = map(val, 0, 1023, 60, 130);
  if (buttonstate==LOW){ 

The problem is, when I push the button the servo must move to 60° and when I let the button it should move to 70° but it just stays still.

I can´t understand why it happens, so I though it needed the map code,I added it but it only works when I use for in-min and in-max values that are different from the out-min and out-max. I don´t understand why.

I wanted to use something like this for map:


But it didn´t work out.

Can you help me out with this please?

Can you please show me how do you connect the button when you use the PULLUP function? I´m trying as you said but doesn´t seem to work