LF-2 Guide

  • Motor connection test

    Basic Code to test the Motor connections for the LF-2 Line Follower Kit

    Click here for code 
  • Sensor read program

    Program to print out the raw sensor values read by the line following sensor array

    Click here for code 
  • Adjusted Sensor Values

    Program to calibrate the line sensor and read adjusted sensor values

    Click here for code 

New LF2 Kit Program

New Code for Line Following with the LF-2 kit using 5/7 channel sensors. This code does not require any library installations. Work in progress!! So try with caution.

Edit Lines 18-20 as per your robot and track details.

LF2 Kit Program

Older code for the LF-2 Line Follower Kit. This code requies the TB6612FNG Library which needs to be installed separately.

This code is adjusted for 5 sensors reading a 25mm black line. Configure lines 13-16 as per your robot to get optimal performance.

You can change speed using the lfspeed variable on line 42

8 Channel Line Follower Program

Sample Code for Line Following using the 8 channel sensor