Lego NXT Searching a Tree

Discussion in 'Programmer's Corner' started by Healthycola, Mar 8, 2010.

  1. Healthycola

    Thread Starter New Member

    Mar 8, 2010
    We're programming a lego NXT robot in my embedded systems class and basically our robot has to search through a tree (following a black path using its light sensor). My question is, what is the best way of searching through a tree (I know binary trees exist, but I'm not quite sure how to program the robot using it). Any ideas would help!

  2. retched

    AAC Fanatic!

    Dec 5, 2009
    Ummmmm, whaT? What kind of tree, and what are you searching for? what methods of input sensors and locomotion are being used?
  3. Healthycola

    Thread Starter New Member

    Mar 8, 2010
    Its sort of like a binary tree.
    I'm searching for a CD (very reflective material) at the end of the tree.
    Methods for input: Light Sensors
    Methods for moving: Motors (each wheel can be given its own respective power).

    Basically if the light sensor detects black, it'll move. But how do I start going through each branch on the tree??
  4. beenthere

    Retired Moderator

    Apr 20, 2004
  5. BMorse

    AAC Fanatic!

    Sep 26, 2009
    A binary tree of what size and height?
    what is the root node?
    Is it sorted or Balanced or neither?
    The questions can go on an on here so can you be a little more specific?

    There are tons of binary tree types that you would have to be taken in consideration :

    Do you already have the tree planned out? How wide are the lines? can you post it on here or atleast a sketch of it, it can be drawn on paper and scanned in if needed, but it would be very helpful in guiding you.

    Do you have any of the electronics? Such as motors? Microcontroller, etc.?

    B. Morse