Shop OBEX P1 Docs P2 Docs Learn Events
Manipulate a Boe-Bot using Light Sensors — Parallax Forums

Manipulate a Boe-Bot using Light Sensors

heavy-freelancerheavy-freelancer Posts: 23
edited 2011-03-28 10:24 in Robotics
Hey,

I have to manipulate my Boe-Bot so he can stop or move forward or turn left/right when he see an object in front of him using light sensors.

But the problem here is that I don't know where I must place the light sensors under my Education Board.
Also I don't know how to manipulate them.

Is there any one who have a picture of the schema and some code on how to do this thing I'm talking about ?

Thanks already.

Comments

  • ajwardajward Posts: 1,130
    edited 2010-12-18 10:51
    Hey,

    I have to manipulate my so he can stop or move forward or turn left/right when he see an object in front of him using light sensors.

    But the problem here is that I don't know where I must place the light sensors under my Education Board.
    Also I don't know how to manipulate them.

    Is there any one who have a picture of the schema and some code on how to do this thing I'm talking about ?

    Thanks already.

    Hmmm... I didn't do a lot with the photo-resistors. In the manual Chapter 6, figures 6-11 and 6-12 show a couple of illustrations on mounting them. (Downloadable from the Parallax website, I think.)
    Not sure how you would place them "under" the BOE.

    I'm working on mounting the IR circuits on a small prototype board that could be mounted under the main board.

    HTH,

    Amanda
  • heavy-freelancerheavy-freelancer Posts: 23
    edited 2010-12-18 10:56
    Which manual ?
  • ajwardajward Posts: 1,130
    edited 2010-12-18 11:13
    Which manual ?

    Didn't you get the "Robotics with the Boe Bot" with your kit?
    Anyway... You can download the .pdf file here: http://bit.ly/fJV0rR

    Amanda
  • Mike GreenMike Green Posts: 23,101
    edited 2010-12-18 11:29
    All of the Parallax tutorials can be downloaded here including various translations.
  • heavy-freelancerheavy-freelancer Posts: 23
    edited 2010-12-18 12:37
    I did exactly like shown in this picture and copied the code below, but it's not working
    Its just the right servo motor who is moving, and both moves when I turn out the light.

    DEBUG "Program Running!"
    FREQOUT 4, 2000, 3000 ' Start/restart signal.

    DO

    IF (IN6 = 0) AND (IN3 = 0) THEN ' Both detect shadows, forward.
    PULSOUT 13, 850
    PULSOUT 12, 650

    ELSEIF (IN6 = 0) THEN ' Left detects shadow,
    PULSOUT 13, 750 ' pivot left.
    PULSOUT 12, 650

    ELSEIF (IN3 = 0) THEN ' Right detects shadow,
    PULSOUT 13, 850 ' pivot right.
    PULSOUT 12, 750

    ELSE
    PULSOUT 13, 750 ' No shadow, sit still
    PULSOUT 12, 750
    ENDIF

    PAUSE 20
    LOOP
    303 x 516 - 54K
  • Mike GreenMike Green Posts: 23,101
    edited 2010-12-18 13:23
    You copied the connection diagram and the code from the book and the code you showed looks correct, so there must be something wrong with the way you've wired it or with the copy of the code you've shown.

    The general rule of debugging is that if it doesn't work and you've copied what was shown in the book, then you copied something incorrectly and your job is to find out where the mistake is. It won't be in the book.
  • heavy-freelancerheavy-freelancer Posts: 23
    edited 2010-12-18 14:28
    I checked again all the connections, and everything seems to be correct.

    Else what's the role of the black round thing with the + sign.
  • Mike GreenMike Green Posts: 23,101
    edited 2010-12-18 14:41
    The black round thing shown with a + sign is a small speaker (piezo-speaker) used for making beeps.

    The FREQOUT statement generates a pulse train at audio frequencies and this is sent to the piezo-speaker.
  • ajwardajward Posts: 1,130
    edited 2010-12-18 16:52
    I checked again all the connections, and everything seems to be correct.

    Else what's the role of the black round thing with the + sign.

    Hey! You have the Boe Bot. Did you get the full kit or, maybe, just the hardware?

    Amanda
  • heavy-freelancerheavy-freelancer Posts: 23
    edited 2010-12-19 08:27
    I have everything with me now. also all the accessories.
  • ajwardajward Posts: 1,130
    edited 2010-12-19 12:14
    Cool! The manual is a wealth of information, but, as I've found, some things can be easy to miss! :-(

    Amanda
  • FranklinFranklin Posts: 4,747
    edited 2010-12-19 13:41
    Sounds like your thresholds are not correct. Check to see how little light it takes to get the other motor turning.
  • jim N8RHQjim N8RHQ Posts: 85
    edited 2011-01-01 17:46
    Franklin wrote: »
    Sounds like your thresholds are not correct. Check to see how little light it takes to get the other motor turning.

    then double, triple check your resistors and their values...
  • oogellyboopoogellyboop Posts: 1
    edited 2011-03-28 10:24
    I have a program for mine but I don't have notations in there to tell you what it does...
Sign In or Register to comment.