Small subroutine does't work [SOLVED]

I made a small program that has to give a number of impulse to a bell, but is doesn’t work.
What is wrong?

//Libraries
# include <Wire.h>

//Define global parameters
int Bellpin, repeats;

//==========================================================
void setup() {
    Bellpin =13;
    pinMode(Bellpin, OUTPUT);    // sets the digital pin 13 as output
    }

//==========================================================
void loop() {
    //if the hour changes from one to two
    repeats =2;
    Bell(repeats);           //The bell will ring 2 times
    delay(10000);            // wait for 10 seconds
    }

//==========================================================
void Bell(int numberPings){
   for (int i =1 ; numberPings; i++){
      digitalWrite(Bellpin, LOW);     // set pin 13 LOW
      Serial.println ("Gongslag");
      delay(300);                     // waits for a second
      digitalWrite(Bellpin, HIGH);    // sets pin 13 HIGH
      delay(1200);
      } //End loop 
  }   //End procedure
for (int i =1 ; numberPings; i++)

oops

Not sure why this needs the Wire library.

but is doesn’t work.

don’t ever use that phrase with saying what “works” means.

"Does't work" means in this case:

  • The message "Gongslag" doesn't appear in the Serial Monitor
  • I need Wire.h for future messages on LCD, so at the moment it can be removed
  • My LED is permanently flashing and does not stop for 10 seconds.

Your serial interface is running at what speed?

Have you fixed the for loop?

ArduinoStarter1:

  • The message “Gongslag” doesn’t appear in the Serial Monitor

You forgot Serial.begin().

ArduinoStarter1:

  • My LED is permanently flashing and does not stop for 10 seconds.

You are using the ‘for’ loop incorrectly. What you wrote is equivalent to:

  int i = 1;
  while (numberPings != 0) // numberPings == 2 so ALWAYS TRUE
  {
     // Blink the LED
     i++;
  }

What you probably wanted was:

  int i = 0;
  while (i < numberPings)
  {
     // Blink the LED
     i++;
  }

Or, as a ‘for’ loop:

  for (int i = 0; i < numberPings; i++)
  {
     // Blink the LED
  }

Thanks gentlemen, now it works fine.
Problem solved.