Shop OBEX P1 Docs P2 Docs Learn Events
Boe bot iR test — Parallax Forums

Boe bot iR test

BatmanBatman Posts: 93
edited 2006-02-02 18:51 in Robotics
I have been trying this for hours and still dont work

Code is:

' {$STAMP BS2}
' {$PBASIC 2.5}
irdetectright VAR Bit
DO
·· FREQOUT 2, 1, 38500
·· irdetectright = IN0
·· DEBUG HOME, "irdetectright = ", BIN1 irdetectright
·· PAUSE 100
LOOP
why is irdetectright = 0 all the time

▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
Happy new year

Comments

  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-02-02 00:03
    There doesn't seem to be any problem with the code -- you probably have something misconnected; that's very easy to do.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • BatmanBatman Posts: 93
    edited 2006-02-02 00:15
    i connected it right
    ir led to P2
    detector to p0

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year
  • BatmanBatman Posts: 93
    edited 2006-02-02 00:32
    just did the whisker and that didn work either

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-02-02 00:46
    You might try a different input pin if you're absolutely sure your circuit is correct (trust me, we all fall prey to our egos on this one...).

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • BatmanBatman Posts: 93
    edited 2006-02-02 00:49
    am telling you i spent 2 hour doing it, switching from left to right
    when i touch the receiver it turn to 1
    when i remove my hand it turns to 0

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year
  • BatmanBatman Posts: 93
    edited 2006-02-02 01:04
    even the whiskers dont work tryed it in 4 diffrent pin

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year
  • Jon WilliamsJon Williams Posts: 6,491
    edited 2006-02-02 01:05
    What do you mean, "touch the receiver"? -- do you have loose connection? This happens in breadboards all the time. You probably don't want to hear this, but when I get to this point of frustration I pull the components and start from scratch. There's only a few components involved, so it won't take long.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Jon Williams
    Applications Engineer, Parallax
  • BatmanBatman Posts: 93
    edited 2006-02-02 01:07
    doing it atm

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year
  • BatmanBatman Posts: 93
    edited 2006-02-02 01:13
    nope still didnt work (getting frustrated)
    i hate when i get frustratedshakehead.gifsmhair.gif

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year
  • BatmanBatman Posts: 93
    edited 2006-02-02 01:23
    am now trying to test if is the pin problem trying to light a led

    is this code right?

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    ···················· 'led
    HIGH 15

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year
  • edited 2006-02-02 01:28
    Remember while you are doing it that plugging the LED in backward will result in no light. You have to make sure that the anode and cathode are connected as indicated in the schematic and wiring diagram. For a review of LED connections (this applies to the IR LED too), see pages 45 to 51 in Robotics with the Boe-Bot v2.2.
  • BatmanBatman Posts: 93
    edited 2006-02-02 01:36
    nope doesnt work whats wrong?

    help me [noparse][[/noparse]pls]

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year

    Post Edited (Batman) : 2/2/2006 2:06:31 AM GMT
  • edited 2006-02-02 02:17
    Try this:

    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    DEBUG "Program running..."

    HIGH 15
  • edited 2006-02-02 02:22
    Also, try following the step by step instructions on pages 45 to 52 in Robotics with the Boe-Bot v2.2. If that's not what your working from, it's available for download from www.parallax.com -> Downloads -> Stamps in Class Tutorials.

    When you download the program (from the previous post), does the Debug Terminal appear with the message "Program Running..."?
  • BatmanBatman Posts: 93
    edited 2006-02-02 02:31
    ' {$STAMP BS2}
    ' {$PBASIC 2.5}

    DEBUG "Program running..."

    HIGH 15

    didnt work

    and yes it says program running

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year

    Post Edited (Batman) : 2/2/2006 2:34:38 AM GMT
  • BatmanBatman Posts: 93
    edited 2006-02-02 02:53
    nvm it work the led works now i got to get the IR test to work

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year
  • BatmanBatman Posts: 93
    edited 2006-02-02 03:06
    i thinking am doing something wrong? with the ir

    pls help me out

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year
  • edited 2006-02-02 03:20
    Make sure your BASIC Stamp is properly inserted into the socket. Unplug power from your board, then press down firmly with your thumb on the BASIC Stamp. Reconnect power and try again.

    Make sure to follow the step-by-step instructions in Robotics with the Boe-Bot, in Chapter 7, Activity #1.
  • BatmanBatman Posts: 93
    edited 2006-02-02 03:34
    do bulb light affect the Ir led? or receiver?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year
  • BatmanBatman Posts: 93
    edited 2006-02-02 03:45
    i dont think it from the circuit i think it from how i am facing the receiver/ir led - well i used the fastroaming code
    idk but when i touch the receiver it turns. but it looks like the irled arnt working how can i fix that?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year
  • edited 2006-02-02 04:10
    Fluorescent lights can cause the IR recievers say they are detecting IR when they really aren't. However, they will not make the irDetectRight variable be 0 all the time. Only occasionally.

    The instructions in Chapter 7, Activity #1 in Robotics with the Boe-Bot v.2.2 show how you should be pointing the IR LEDs and receivers.

    The IR LEDs and receivers are not designed to be contact sensors. They should not respond to touch. They should respond to an obstacle in front of them. See page 236.
  • BatmanBatman Posts: 93
    edited 2006-02-02 04:28
    sry for that but no one told that you need to remover the iron stuff on the receiver (covering it)
    works now

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year
  • BatmanBatman Posts: 93
    edited 2006-02-02 04:33
    do your know where i can get the example of a push button( never mind)


    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year

    Post Edited (Batman) : 2/2/2006 4:37:25 AM GMT
  • edited 2006-02-02 04:34
    Um, well, I'm glad to hear it works now. If they are the receivers that come with the Boe-Bot, they are supposed to have the metal case and the metal X over the black hemisphere. Removing the metal X won't hurt it, but it's always worked without removing it.
  • edited 2006-02-02 04:38
    Batman said...
    do your know where i can get the example of a push button( never mind)
    Yes, go to www.parallax.com -> Downloads -> Stamps in Class Tutorials

    Download What's a Microcontroller v2.2.

    Chapter 3 has lots of pushbutton examples.

    Post Edited (Andy Lindsay (Parallax)) : 2/2/2006 4:41:57 AM GMT
  • BatmanBatman Posts: 93
    edited 2006-02-02 18:34
    help me out now it keeps flickering to 0 ( it goes 2 then in a half of a sec it goes to o then back then agian so fourth

    but if i put my hands infront it goes to zero.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year
  • BatmanBatman Posts: 93
    edited 2006-02-02 18:51
    dam it just got this and i already burnt(blow) a led
    frustration is geting the best of me

    but i have 15 more leds



    nvm it works

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Happy new year

    Post Edited (Batman) : 2/3/2006 7:19:31 PM GMT
Sign In or Register to comment.