BrickPi3 Line Follower
by dexter_industries in Circuits > Raspberry Pi
1575 Views, 3 Favorites, 0 Comments
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.
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.
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
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')"
Running
The Line Follower example program is located in ~/Dexter/BrickPi3/Projects/LineBot. To run the example, navigate to the directory:
cd ~/Dexter/BrickPi3/Projects/LineBot
Then run the program:
python LineBot.py