range of IR LEDs
Hi,
I try to biuld a circiut to wireless communication with two BS2.![idea.gif](http://forums.parallax.com/images/smilies/idea.gif)
![01f813fbef43a8ccm.jpg](http://images49.fotosik.pl/85/01f813fbef43a8ccm.jpg)
First module is a receiver ( standard Infrared Receiver 350-00014 )
![4b42c880a32fa62c.jpg](http://images41.fotosik.pl/81/4b42c880a32fa62c.jpg)
And there is a code:
Second module is a transmitter ( with 350-00017 IR Transmitter )
![7b854597fd740644.jpg](http://images44.fotosik.pl/85/7b854597fd740644.jpg)
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.![cry.gif](http://forums.parallax.com/images/smilies/cry.gif)
Can someone help me ?
I try to biuld a circiut to wireless communication with two BS2.
![idea.gif](http://forums.parallax.com/images/smilies/idea.gif)
![01f813fbef43a8ccm.jpg](http://images49.fotosik.pl/85/01f813fbef43a8ccm.jpg)
First module is a receiver ( standard Infrared Receiver 350-00014 )
![4b42c880a32fa62c.jpg](http://images41.fotosik.pl/81/4b42c880a32fa62c.jpg)
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 )
![7b854597fd740644.jpg](http://images44.fotosik.pl/85/7b854597fd740644.jpg)
' {$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.
![cry.gif](http://forums.parallax.com/images/smilies/cry.gif)
Can someone help me ?
![rolleyes.gif](http://forums.parallax.com/images/smilies/rolleyes.gif)
Comments