Follow along with the video below to see how to install our site as a web app on your home screen.
Nota: This feature currently requires accessing the site using the built-in Safari browser.
main:
ADCON1 = 0x06 '//
''ansel=0
''anselh=0
TRISA = %00001010 ''
TRISB = %01000000 ''
TRISC = %00010010 ''
PORTB=0
'//Para saber si arranco.................
PORTB = %00011111
Delay_ms(1000)
PORTB = %00000000
'// forever
while(1)
'' porta = 0
'' portc = 0
'' portb=0
RAFLD
''DI = 0
if(SELD = 0) then
LD = 1
else
LD = 0
end if
delay_ms(20)
RAFDD
if(SEDD = 0) then
DD = 1
else
DD = 0
end if
delay_ms(20)
RAFFRENTE
if(SEFRENTE = 0) then
FRENTE = 1
else
FRENTE = 0
end if
delay_ms(20)
RAFDI
if(SEDI = 0) then
DI = 1
else
DI = 0
end if
delay_ms(20)
RAFLI
if(SELI = 0) then
LI = 1
else
LI = 0
end if
delay_ms(20)
wend
end.
Donde dice rafaga......
sub procedure RAFLD() ''PORTB.7
asm
bcf portb,7
movlw 0x254
movwf _n
volver:
bsf portb,7
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
bcf portb,7
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
decfsz _n,1
goto volver
end asm
end sub
Si, me parece que se mete luz de las lamparas halogenas, o de mercurio..., y con respecto al tubito si lo hicimos y conseguimos direccionar.
Quisiera saber si se podria codificar la rafaga y detectar un patron. O como seria el tema de los filtros
Miguelus en el mensaje #9 puso que el problema son los falsos disparos, ese problema se soluciona al 99% con la codificacion.
Y tienes bastante razón el resto, y una solución a eso de la interferencia sería cambiar a un método de RF.