Introduction: BrickPi3 Line Follower
Here is a project demonstrating how the Dexter Industries Line Follower can be used to make a BrickPi3 robot follow a line.
Step 1: Hardware Setup
This project uses a BrickPi3 robot built with two drive motors in a skid steer configuration. The left drive motor is connected to BrickPi3 port B, and the right drive motor is connected to BrickPi3 port C. The Line Follower sensor is connected to the Grove I2C port of the BrickPi3.
You can create your own line configuration using the line segments available here, or you can use a Lego Mindstorms mat.
Step 2: Software Setup
Whether your Raspberry Pi is running Raspbian or Raspbian For Robots, to install the drivers and project example program, you can run these two commands:
curl -kL dexterindustries.com/update_brickpi3 | bash
curl -kL dexterindustries.com/update_sensors | bash
Step 3: Calibration
To calibrate the line follower, place the complete sensor over the white background and run this command:
python -c "from di_sensors import easy_line_follower; easy_line_follower.EasyLineFollower().set_calibration('white')"
Then place the complete sensor over the black line and run this command:
python -c "from di_sensors import easy_line_follower; easy_line_follower.EasyLineFollower().set_calibration('black')"
Step 4: Running
The Line Follower example program is located in ~/Dexter/BrickPi3/Projects/LineBot. To run the example, navigate to the directory:
Then run the program: