Shop OBEX P1 Docs P2 Docs Learn Events
Following a Giant Line - Page 3 — Parallax Forums

Following a Giant Line

13»

Comments

  • Ed KennaEd Kenna Posts: 12
    edited 2007-06-08 00:16
    Ok thanks for your explanations The gain and offset make sense with what iy were talking about. I think I saw it called something else.
  • crgwbrcrgwbr Posts: 614
    edited 2007-06-26 17:20
    I just thought of a completely different way to follow the path. Let me know what you think:

    Say you have three LDRs (Light Dependent Resistor), each with a Red, Green, or Blue filter. Those LDRs are surrounded by white lights. White light is every color of light combined into one. By continually taking resistance readings from the LDRs, you should be able to determine exactly what color the object is that the device is positioned over. Right? Theoretically, a color will (say it's red) will absorb every color except it's own. Therefore, a red object reflects red light and absorbs all other light. Then, if the object is position over a red object, only the LDR with the red filter will be receiving light while the other two LDRs will be left in the dark. Is this reasoning correct? Obviously I know that nothing in the outdoors will be a pure color, like red, however, if I feed the LDRs output into a 10/12-bit ADC; I should be able to get a very accurate representation of what color the device is looking at. Then, by using this data, the black-top path that my robot is required to follow should be no problem at all to locate and follow.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Blog: Prog | Electro | Mech

    I would love to change the world, but they won't give me the source code

    People say that if you play Microsoft CD's backwards, you hear satanic things, but that's nothing, because if you play them forwards, they install Windows.

    I spent a minute looking at my own code by accident. I was thinking "What the heck is this guy doing?"
  • Dave HeinDave Hein Posts: 6,347
    edited 2007-06-29 15:30
    Your idea might work if you were following a thin brightly colored line painted on the path. However, it may have problems following a wide path that does not have a very distinct color. Imagine a person trying to follow the path by looking through a long thin tube pointed a few feet ahead of his feet. He would probably zig-zag back and forth on the path, and may even end up going the wrong way. He may also go off the path if there was a small path of dirt next to the path that had a similar appearance.
  • crgwbrcrgwbr Posts: 614
    edited 2007-06-29 20:31
    That's not quite what I intended. I was thinking more along the lines of two of these mounted on the two front corners of the bot, aimed directly at the ground. Would that work?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    My Blog: Prog | Electro | Mech

    I would love to change the world, but they won't give me the source code

    People say that if you play Microsoft CD's backwards, you hear satanic things, but that's nothing, because if you play them forwards, they install Windows.

    I spent a minute looking at my own code by accident. I was thinking "What the heck is this guy doing?"
Sign In or Register to comment.