Praful
Member level 3
I've made a project in which a relay can be operated through a IR remote
but one problem occurred is if we press and hold remote button a relay can toggles on to off to on to off to on to off
I want must function same as TV remote function off mean off and on means on it cant toggle
even a key pressed and hold it. It only operates again when we release the button and press it again to on.
So Please can any body tell me the solution for it I used a delay but also it toggles after a delayed time
The hardware, which I used, is At89c52 uC. and ke*il compiler and a program is in "C" language.
Example shown:--- :|
case 0xAC: onf1var--;
if(onf1var<=0)
{
ONF1ON=~ONF1ON;
putchar(digit[ONF1ON]); ONF1();
for(i=0;i<5500;i++);
}
break;
void ONF1(void)
{
if(ONF1ON)
{
ONF1LED=0;
}
if(!ONF1ON)
{
ONF1LED=1;
}
for(i=0;i<5500;i++);
but one problem occurred is if we press and hold remote button a relay can toggles on to off to on to off to on to off
I want must function same as TV remote function off mean off and on means on it cant toggle
even a key pressed and hold it. It only operates again when we release the button and press it again to on.
So Please can any body tell me the solution for it I used a delay but also it toggles after a delayed time
The hardware, which I used, is At89c52 uC. and ke*il compiler and a program is in "C" language.
Example shown:--- :|
case 0xAC: onf1var--;
if(onf1var<=0)
{
ONF1ON=~ONF1ON;
putchar(digit[ONF1ON]); ONF1();
for(i=0;i<5500;i++);
}
break;
void ONF1(void)
{
if(ONF1ON)
{
ONF1LED=0;
}
if(!ONF1ON)
{
ONF1LED=1;
}
for(i=0;i<5500;i++);