Shop OBEX P1 Docs P2 Docs Learn Events
differentiate black and white line — Parallax Forums

differentiate black and white line

smokysmoky Posts: 19
edited 2009-08-04 16:32 in BASIC Stamp
Hi to all experts,

···················· can anyone guide me through by using boebot and cmu to differentiate white and black line? i would like to do·in such a way that·the boebot·will travel·on the path when it detect black and once it detect white it will turn left or right back to the black line, the tricky part is that when either shifted to left or right both senses white, how will the boebot know whether is turn left or right back to the centre line (black).

I have see the archive files provided, but somehow its different and i cant understand. sorry...

I hope someone can help.

Thanks

Comments

  • FranklinFranklin Posts: 4,747
    edited 2009-08-03 14:56
    It would help if you could show us what you've tried already so we don't repeat what you have already done.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    - Stephen
  • smokysmoky Posts: 19
    edited 2009-08-03 15:29
    Thanks for the reply Stephen,

    I·have attached the program i use to control the sumobot via cmu. Please give me any feedback or guide me if u can.

    For the compare:, no matter what range i set also useless, because lets just give a simple example, the sumobot is travelling on top·of the black line, (black line length 20cm and width 4.5cm). What if the sumbot will slightly tilt to the left or right (both situation·sense white)·how will the sumobot know whether it should turn left or right back to the centre and carry on to follow the black line.

    This problem exits when i create a radius black path·instead of using straight line path.



    smoky
  • smokysmoky Posts: 19
    edited 2009-08-03 15:32
    Sorry stephen, is there anything that i can do about it? Or can u teach me how to write a program or add any devices ( not recommeded [noparse]:)[/noparse]) which can settle this program?
    Sorry to trouble you.

    smoky
  • isofuncurvesisofuncurves Posts: 19
    edited 2009-08-04 16:32
    Smokey,
    It sounds like you are just trying to follow a line that makes turns rather than simply goes straight. Correct? One strategy for following the line would be to have the robot turn left or right a few degrees if the sensor detects the line, continue. If not, turn in the opposite direction twice the distance. Keep repeating making wider arcs until the line is found. Think of it as a pendulum with increasing arc lengths looking for the line. There may be other strategies but this is what comes to mind.

    [noparse][[/noparse]I'm only as far as centering my servos so I'm VERY new]

    Carl
Sign In or Register to comment.