CoinSlot to Arduino... Need Help

Gedon:
Coin Slot to Arduino... Need Help. What to do?

This is the code i used, (modified)(original comments still there)
This code doesn't seem to do what i want as an output.

```
**[/b]
const int coinInt = 0;
//Attach coinInt to Interrupt Pin 0 (Digital Pin 2). Pin 3 = Interrpt Pin 1.
volatile float coinsValue = 0.00;
//Set the coinsValue to a Volatile float
//Volatile as this variable changes any time the Interrupt is triggered
int coinsChange = 0;
int OneLed = 8;
int FiveLed = 9;
int TenLed = 10;
//A Coin has been inserted flag

void setup()
{
  pinMode(OneLed, OUTPUT);
  pinMode(FiveLed, OUTPUT);
  pinMode(TenLed, OUTPUT);
  Serial.begin(9600);               
//Start Serial Communication
 
  attachInterrupt(coinInt, coinInserted, RISING); 
//If coinInt goes HIGH (a Pulse), call the coinInserted function
//An attachInterrupt will always trigger, even if your using delays
}

void coinInserted()   
//The function that is called every time it recieves a pulse
{
  coinsValue = coinsValue + 1;
//As we set the Pulse to represent 5p or 5c we add this to the coinsValue
  coinsChange = 1;                         
//Flag that there has been a coin inserted
}

void loop()
{
  if(coinsChange == 1)         
//Check if a coin has been Inserted
  {
   if (coinsValue == 1)
    {
       digitalWrite(OneLed, HIGH);
       delay(1000);
       digitalWrite(OneLed, LOW);
    }
    else if (coinsValue == 5)
    {
       digitalWrite(FiveLed, HIGH);
       delay(1000);
       digitalWrite(FiveLed, LOW);
    }
    else if (coinsValue == 10)
    {
       digitalWrite(TenLed, HIGH);
       delay(1000);
       digitalWrite(TenLed, LOW);
    }
//Print the Value of coins inserted
  coinsChange = 0;
  }
}**

```
What i want to do is, after receiving pulses from the COIN SLOT the arduino will count the number of pulses (1,5, or 10 pulses) then lights up LED corresponding to the number of pulses (if there is 1 pulse, LED1 will be HIGH; if there are 5 pulses, LED2 will be HIGH; if there are 10 pulses, LED3 will be HIGH)
any comments/suggestions?