different action based on the number of times a button is pressed

float pos = 0;    // variable to store the rotary switch input
    for (pos = 12.5; pos < 18; pos += .1)  // goes from 12.5  to 18 
                                                          // in steps of .1  
      myservo1.write(pos);              // tell servo to go to position in variable 'pos'

I fail to see where any rotary switch is read. So, the initial comment is crap.

The only place that pos is used is to position the servo. The Servo::write() function takes an int.

So, why is pos a float?

The Tools + Auto Format function would do an excellent job of properly indenting your code, so you can see where braces are missing. Indenting a statement doesn't mean squat to the compiler. But, it means a lot to people reading the code. Properly indented code has the same meaning to people and to compilers. The auto format tool makes the indenting match how the compiler will understand the code. It can, then, be quite obvious that how you understand it and how the compiler will understand it are not the same thing.

I can not stress the importance of properly indented code enough. Yours, of course, is not.

johncc's comment regarding braces is nonsense. If statements, and for and while loops, may or may not need braces. It is recommended that they always be used, so that you can add a statement to the block, and be sure that the statement is executed the correct number of times. Switch statements always need braces.

Functions always need curly braces. Almost any other use of curly braces (except in array initializations) is unnecessary.