range of IR LEDs
julius.meinl
Posts: 6
Hi,
I try to biuld a circiut to wireless communication with two BS2.
First module is a receiver ( standard Infrared Receiver 350-00014 )
And there is a code:
Second module is a transmitter ( with 350-00017 IR Transmitter )
Everything it's OK, but ...
If I use Universal Remote (020-00001) I can directed the remote no matter where and It's OK, but if I use the second module I have to refer them directly to the receiver, so if I want to comunicate two boe-bot robots with this circuit It will be big problem.
Can someone help me ?
I try to biuld a circiut to wireless communication with two BS2.
First module is a receiver ( standard Infrared Receiver 350-00014 )
And there is a code:
' {$STAMP BS2} ' {$PORT COM5} ' {$PBASIC 2.5} time VAR Word(12) index VAR Nib ' Display heading. DEBUG "time ARRAY", CR, "PWM MEASUREMENTS", CR, "Element Duration, 2-us", CR, "------- --------------" DO ' Beginning of main loop. DO ' Wait for rest between messages. PULSIN 0, 1, time(0) LOOP UNTIL time(0) > 1000 PULSIN 0, 0, time(0) ' Measure/store data pulses. PULSIN 0, 0, time(1) PULSIN 0, 0, time(2) PULSIN 0, 0, time(3) PULSIN 0, 0, time(4) PULSIN 0, 0, time(5) PULSIN 0, 0, time(6) PULSIN 0, 0, time(7) PULSIN 0, 0, time(8) PULSIN 0, 0, time(9) PULSIN 0, 0, time(10) PULSIN 0, 0, time(11) FOR index = 0 TO 11 ' Display 12 pulse measurements. DEBUG CRSRXY, 0, 4 + index, "time(", DEC index, ")", CRSRXY, 9, 4 + index, DEC time(index), CLREOL LOOP
Second module is a transmitter ( with 350-00017 IR Transmitter )
' {$STAMP BS2} ' {$PBASIC 2.5} ' {$PORT COM4} pi CON 8 fr CON 38000 DO 'PULSOUT 0,1 'HIGH 0 PAUSE 22 'LOW 0 FREQOUT pi, 3, fr ' Start pulse PAUSE 1 FREQOUT pi, 2, fr ' Bit-0 = binary-1 PAUSE 1 FREQOUT pi, 2, fr ' Bit-1 = binary-0 PAUSE 1 FREQOUT pi, 2, fr ' Bit-2 = binary-0 PAUSE 1 FREQOUT pi, 2, fr ' Bit-3 = binary-1 PAUSE 1 FREQOUT pi, 2, fr ' Bit-4 = binary-0 PAUSE 1 FREQOUT pi, 2, fr ' Bit-5 = binary-0 PAUSE 1 FREQOUT pi, 1, fr ' Bit-6 = binary-0 PAUSE 1 FREQOUT pi, 2, fr ' Bit-7 = binary-0 PAUSE 1 FREQOUT pi, 2, fr ' Bit-8 = binary-0 PAUSE 1 FREQOUT pi, 2, fr ' Bit-9 = binary-0 PAUSE 1 FREQOUT pi, 2, fr ' Bit-10 = binary-0 PAUSE 1 FREQOUT pi, 2, fr ' Bit-11 = binary-0 LOOP
Everything it's OK, but ...
If I use Universal Remote (020-00001) I can directed the remote no matter where and It's OK, but if I use the second module I have to refer them directly to the receiver, so if I want to comunicate two boe-bot robots with this circuit It will be big problem.
Can someone help me ?
Comments