erfan.khalilian69
Member level 4
- Joined
- Feb 7, 2011
- Messages
- 71
- Helped
- 3
- Reputation
- 6
- Reaction score
- 3
- Trophy points
- 1,288
- Location
- Kualalampur
- Activity points
- 1,916
Hello everyone I have downloaded program which they defined the delay as below for their program.
//===================================================
void delay(unsigned short i);// at above the program
//==================subroutine DELAY==========================
void delay(unsigned short i)
{
for(;i>0;i--);
}
//===========================================
now I want to make 45 seconds delay and I have write it as below but error will appear as "108.28 implicit conversion of float to integer"and also "undefined identifier "i" "
I think I can't use the i as variable again as it has used in this program once but while i change the name of variable again the error will comes ?
any suggestion ? thanks
if (BUTTON1 != 0)
RC3 = 1;
delay(1.5); // delay for 1.5 milliseconds /// now servo rotate 90 degree
//pause for 45 seconds
for(i=0;i<45*5; i++) // for 45 seconds
RC3 = 0; // back to the previous position
delay(18.5)
plz help
//===================================================
void delay(unsigned short i);// at above the program
//==================subroutine DELAY==========================
void delay(unsigned short i)
{
for(;i>0;i--);
}
//===========================================
now I want to make 45 seconds delay and I have write it as below but error will appear as "108.28 implicit conversion of float to integer"and also "undefined identifier "i" "
I think I can't use the i as variable again as it has used in this program once but while i change the name of variable again the error will comes ?
any suggestion ? thanks
if (BUTTON1 != 0)
RC3 = 1;
delay(1.5); // delay for 1.5 milliseconds /// now servo rotate 90 degree
//pause for 45 seconds
for(i=0;i<45*5; i++) // for 45 seconds
RC3 = 0; // back to the previous position
delay(18.5)
plz help