AtomSoft
Well-Known Member
Hey guys i have a nice wireless camera setup. I has 4 channels but no remote. I noticed it has 4 LEDs in the front and 1 button on top to switch. I was thinking of having a small pic any 20 pin or less to control this via infrared remote.
I was planning on monitoring the LED signals and producing a count based on on/off signals.
So if its on channel 2 then i will get something like 0010. Depending on how i wire it.
With this info i can easily tell what channel im on and if i press button 4 on my remote i want i to send a signal to close the button the number of times to get 1000
So i assume something like
Would this work? Ad this is only in my head so far heh...
Is it ok to snoop on the LEDs?
I was planning on monitoring the LED signals and producing a count based on on/off signals.
So if its on channel 2 then i will get something like 0010. Depending on how i wire it.
With this info i can easily tell what channel im on and if i press button 4 on my remote i want i to send a signal to close the button the number of times to get 1000
So i assume something like
Code:
MyChan = 0;
switch(irCmd){
case 1:
MyPressQty = 0b00000001;
case 2:
MyPressQty = 0b00000010;
case 3:
MyPressQty = 0b00000100;
case 4:
MyPressQty = 0b00001000;
}
while(1){
MyChan = portb & 0x0F; //This should give me my 2 aka 0010
if(MyChan == MyPressQty) break;
closeButton(); //Close the button (press)
DelayS(1); //Delay 1 second
}
Would this work? Ad this is only in my head so far heh...
Is it ok to snoop on the LEDs?
Last edited: