Giter Club home page Giter Club logo

Comments (7)

gabrielkrell avatar gabrielkrell commented on July 19, 2024 1

I guess that wasn't clear. Say the robot is going through a 90-degree right turn:

  1. The front sensor moves past the turn. This triggers
    2.The robot turns in the L/R direction that was most recently "on", which would be the right sensor. It does this until the front sensor is "on" again, indicating that it's back on the line.

I use "on" to mean "on the line".

Here's a really shitty diagram where the triangle is the robot and the dots are its sensors. There are very nice animated gifs in the instructable I linked.
image

from ece100linefollower.

gabrielkrell avatar gabrielkrell commented on July 19, 2024

New algorithm implemented in commit 7ee4cd3. Needs to be tested.

from ece100linefollower.

FinallySivaguru avatar FinallySivaguru commented on July 19, 2024

The degree turn limit is 45 degrees, right?

from ece100linefollower.

gabrielkrell avatar gabrielkrell commented on July 19, 2024

Yeah, 135° from the current direction. Tripped me up on the first pre-lab

from ece100linefollower.

gabrielkrell avatar gabrielkrell commented on July 19, 2024

OK, possible algorithm for three sensors:

if front sensor
    move fwd
else
    turn in direction of whichever sensor is on or whichever sensor was most recently on until front sensor is on again

from ece100linefollower.

FinallySivaguru avatar FinallySivaguru commented on July 19, 2024

What would happen if the else statement was applied when the robot met a right turn of say, 90 degrees? The robot would move to the direction in which the sensor was recently on. That would happen to be both left and right? I'm not sure if we are meaning "on" as having light actually hit the sensors on the white tape. Or is "on" when no light hits the sensors as a result of the black coating?

from ece100linefollower.

gabrielkrell avatar gabrielkrell commented on July 19, 2024

Well, we switched algorithms to follow the side of the edge instead of stay on the path, so that fixed all of our problems. See 35e63e2 for original implementation, a81f339 for final.

from ece100linefollower.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.