Arduino Forum

International => India => Topic started by: deepakvnit on May 27, 2012, 01:38 pm

Title: ERROR: function used was not declared in scope
Post by: deepakvnit on May 27, 2012, 01:38 pm
first of all i want to apologize if this is not right place for this thread but i will really appreciate some help on my project ..... i m attaching my setup code below. every time compile it, it gives error" function used  was not declared  in scope"


void setup()
{
/* defining input ports*/ 
                            pinMode (2,INPUT);
                            pinMode (3,INPUT);
                            pinMode (4,INPUT);
                            pinMode (5,INPUT);
                            pinMode (6,INPUT);
/*defining output ports*/
                            pinMode(7,OUTPUT);
                            pinMode(8,OUTPUT);
                            pinMode(9,OUTPUT);
                            pinMode(10,OUTPUT);
                            pinMode(11,OUTPUT);
/*DAC output ports*/                           
                            pinMode(A0,OUTPUT);
                            pinMode(A1,OUTPUT);
                            pinMode(A2,OUTPUT);
                            pinMode(A3,OUTPUT);
/* serial communication*/
                            Serial.begin(9600);
/* interrupt */               
                            attachInterrupt(0,interrupt1,CHANGE);

}
void loop()
{}
void iterrupt1()
{
asm volatile ("  jmp 0");
}
i m looking for any error from past 4 hours.want some help very soon .thanks in advance!!!!!!!!!!
Title: Re: ERROR: function used was not declared in scope
Post by: johnwasser on May 27, 2012, 01:44 pm
Code: [Select]
   
attachInterrupt(0,interrupt1,CHANGE);

void iterrupt1()  // You spelled it wrong
Title: Re: ERROR: function used was not declared in scope
Post by: Nishant_Sood on May 27, 2012, 07:04 pm
Sir john is correct you spelled it wrong!
Title: Re: ERROR: function used was not declared in scope
Post by: deepakvnit on May 28, 2012, 09:57 am
sorry for giving you pain, guys. it was a seriously dumb mistake i did, which took me hours to correct. sorry once again..... and thanx a lot for helping me.