Arming a brushless motor through ESC - 2

This is a continuation of
Arming a brushless motor through ESC - Using Arduino / Project Guidance - Arduino Forum

I was able to arm a motor controller with Arduino resets in between.

Uploaded code below to Arduino (from @helitus )
Turned on the ESC switch. Fan started spinning.
Reset Arduino
Around i=76 in setup() heard 3 beeps and then nothing happened
Reset Arduino again
Around i=76 heard 1 beep in setup()
Motor started spinning wildly that battery got disconnected.

Questions:

How do I make sure 3 beeps and then the 1 beep happen without Arduino reset in between?

What does variable i mean in the code? Speed or angle or throttle or frequency or PWM ?

How do I gradually accelerate the motor?

Tested code:

#include <Servo.h>

Servo motor;

void setup ()
{
motor.attach(2);
Serial.begin(9600);
int i = 0;

//Give some time before you start anything like switching on your ESC / Motor

Serial.print("Arming Test Starts in ");
for(i =10; i > 0; i--)
{
Serial.print(i);
Serial.print(".. ");
}
Serial.println();

// Watch for the tone when the ESC gets armed

for(i = 60; i < 80; i++)
{
motor.write(i);
Serial.println(i);
delay(500);
}
}

void loop()
{
motor.write(80); delay(1000);
motor.write(91); delay(2000);

}

@bluejets