Skip to main content

How the Line Follower Robot Works

The basic operation follows this principle:

  • When a line sensor detects the black line:

    • It sends a 1 signal to its corresponding pin (IO69 or IO68).

    • This signal is used as the select input in the demux2 blocks.

  • The demux2 block receives the constant 1 on its in input, and depending on the select value, it routes the signal to one of the outputs:

    • select = 0: The activation signal 1 is routed to outa.

    • select = 1: The activation signal 1 is routed to outb.

Example Behavior:

  • If the left sensor (IO69) detects the line:

    • The demux controlling the left motor sends the signal to outb (for example, turning the motor to correct the path).

  • If the right sensor (IO68) detects the line:

    • The demux controlling the right motor sends the signal to outb.

The robot adjusts the motor movements to follow the line detected by the sensors.