35/5000 Call functions with interrupts

I am writing a program that calls a function with an external interrupt. The function should blink a led 5 times. This is the code:

int PULSADOR=2;
int LED=13;
int estate=LOW;

void setup() {
// put your setup code here, to run once:
pinMode(PULSADOR, INPUT);
pinMode(LED, OUTPUT);
digitalWrite(LED,LOW);

}

void loop() {
// put your main code here, to run repeatedly:

if(digitalRead(PULSADOR)==HIGH){
void Ledparpar();
}
else(digitalRead(PULSADOR)== LOW);
}
/////////////////////////////////////////////////////////////////////////////////

void Ledparpar(int pulsador, int led) {
// put your main code here, to run repeatedly:
for ( int i=0; i<8; i++) {
digitalWrite(LED, HIGH);
delay(300);
digitalWrite(LED, LOW);
delay(300);

I don't see an interrupt in your program, nor is it complete.

What problem are you having ?

 else(digitalRead(PULSADOR)== LOW);

What is this supposed to do ?

  if(digitalRead(PULSADOR)==HIGH){
 void Ledparpar();
 }
 else(digitalRead(PULSADOR)== LOW);

If pin reads high, declare a void function Ledparpar() and directly forget this declaration,
else compare the same pin with low and throw away the result (a true value).

That is not how you call a function, your if/else usage is strange.

The following should work better:

  if (digitalRead(PULSADOR) == HIGH) {
    Ledparpar();
  }

Multiple Problems:

  1. void is used when defining the function, not when calling it.
  2. digitalRead(PULSADOR) is a read function and using == LOW will not Change the pin at all.
  3. You mention Interrupts... I don't see any reference to Interrupts in the code. I assume you have pin PULSADOR implemented in Hardware but you don't seem to use it in any way related to Interrupts.
  4. The Arduino language is case sensitive. PULSADOR and pulsador are two totally different variables but are confusing. Please consider using separate names.
  5. Why pass the pulsador Parameter to the function Ledparpar if it isn't used?
  6. Case sensitive - Problem 4 applies to LED/led as well.
  7. The function Ledparpar is defined as expecting two Parameters. You call it with None.

I doubt this sketch will even compile.

Am I the only one who doesn't understand the topic title?

AWOL:
Am I the only one who doesn't understand the topic title?

No.

PaulS:
No.

Phew. Good.

UKHeliBob, Whandall, JaBa
I have - and no joke - 4 days programming with arduino; This is my sixth program, thanks to uKHeliBob, Whandall, JaBa your comments have helped me a lot, the program already works. THANK YOU.

Regarding AWOL, which says his presentation is moderator, I just have to tell you that not everyone we started as experts, and if you did not understand the title of my post you have to be a beginner like me; There were those who understood and solved the problem. Thank you friends.

Well, that's put me in my place.
Would you deign to share the meaning of ...oh, wait, 0.007 - it's a James Bond reference (I think)
(If it's any help, I'm certainly not any kind of of Arduino expert)

There were those who understood and solved the problem.

There are those that ignored the useless post title, and only looked at the code. The rest of use went WTF when reading the post title, and assumed that, since the thread topic was unrelated to the problem, that you were either an idiot or a troll, and didn't bother reading the code/typing a reply.

You REALLY don't want to foster that impression, do you?

If not, you can stop digging, and explain how the thread title relates to your problem.