Shop OBEX P1 Docs P2 Docs Learn Events
help! trying to send a high from one parallax board to another — Parallax Forums

help! trying to send a high from one parallax board to another

AshleyAshley Posts: 9
edited 2008-01-30 13:01 in BASIC Stamp
okay so are project is basically this ir sends signal to reciver that it sees its so
its

if irdetect = 1 then
high 15
endif

then we've connected a wire from pin 15 to another board in pin 6

does it need ground or sumthing? like

if in6 = 1 then
pulsout 13,650
endif

but its not recieving the high for pin6 to make it do what we want
like ive check the wire and used an led and the ir is sending the signal but
pin6 isnt doing anything...

Comments

  • allanlane5allanlane5 Posts: 3,815
    edited 2008-01-29 17:42
    I think an IR Detector has an active LOW signal. Meaning when it detects IR, its output goes LOW.

    What's the "PULSOUT" supposed to be doing? If it's a BS2, "PULSOUT 13, 650" will give you a 325 uSec pulse -- that's AWFULLY small.

    You may need an "INPUT IRDetect" line -- but probably that's the default...
  • AshleyAshley Posts: 9
    edited 2008-01-29 17:45
    The pulseout is the code for our motor that we have hooked up to the bored enabling us to lower a door down. we hooked up an led to the 1st bored and it was sending out a signal to high 15 but the other bord won't recieve it to high 6 ... if that makes sence.

    instead of high 15 should it be low?
  • AshleyAshley Posts: 9
    edited 2008-01-29 21:51
    okies so it sends the darn signal can someone look at my code?
    (board 1)
    FOR bridge = 0 TO 220 'bridge opens
    DEBUG DEC bridge 'displays amount of time it takes to open
    PULSOUT 15,850
    PAUSE 100 'waits
    NEXT
    (so in here the ir is sensed on different board sending the signal to pin 6)
    (board 2)
    DO

    FREQOUT 6, 1, 38500
    irdetect = IN5
    DEBUG HOME, "irDetect = ", BIN1 irdetect

    IF irdetect = 1 THEN 'ir detected
    HIGH 15 'send high 15 signal to other parallax
    ELSEIF irdetect = 0 THEN 'ir not detected
    LOW 15 'send low 15 signal to other parallax
    ENDIF

    LOOP
    (board 2)

    IF IN6 = 1 THEN 'if pin 15 is high then
    DEBUG BIN IN6 'displays if working
    FOR bridge = 0 TO 220 'bridge closes
    DEBUG DEC bridge 'displays amount of time it takes to close
    PULSOUT 15, 650
    PAUSE 100 'waits
    NEXT
    ELSEIF IN6 = 0 THEN 'if pin 15 is low then
    DEBUG BIN IN15 'displays if working
    END 'ends program
    ENDIF

    Post Edited By Moderator (Chris Savage (Parallax)) : 1/29/2008 9:57:27 PM GMT
  • AshleyAshley Posts: 9
    edited 2008-01-29 21:59
    woops the second board 2 should be board 1
  • AmaralAmaral Posts: 176
    edited 2008-01-30 13:01
    hook the ground of both boards toguether ! just put a wire from ground to ground.

    as far as I understand you are not sending any signal thru IR led or detectors ! wright ?


    Hope to help

    Amaral
Sign In or Register to comment.