Products PayPal provides a safe and secure way to purchase online. We never see your credit card number or store it on our server. You can use your PayPal account or major credit card to process your order online safely. Featured Project This project walks through the steps we followed to get the AI framework PyTorch to run on a Raspberry Pi 4 |
![]() |
Romi Chassis Basic Line Solving Project
Step 1: Build a course.
Before you can run the Basic Line Follower, you will need a lined course. Use white poster board, foam board, white board, expanded PVC, or even a white floor or table and create a line course with black electrical tape. You may have sharp corners, but it will run smoother if the turns are gradual. Keep a minimum of 6" between any meandering lines.
Step 2: Components you will need. 1. Arduino Uno or Sparkfun RedBoardhttp://www.zagrosrobotics.com/shop/item.aspx?itemid=868 2. Sparkfun Ardumoto shield http://www.zagrosrobotics.com/shop/item.aspx?itemid=782 3. Pololu QTR-8RC Reflectance Sensor Array http://www.zagrosrobotics.com/shop/item.aspx?itemid=896 4. Robot chassis : Romi: http://www.zagrosrobotics.com/shop/item.aspx?itemid=1036 5. Jumper Wires http://www.zagrosrobotics.com/shop/item.aspx?itemid=834 6. USB cable which matches your choice of Arduino/Redboard 7. AA batteries - 6 8. *Small Alligator Clips
*Less Soldering Option
Step 3: Romi Assembly Follow the instructions for chassis assembly: https://www.pololu.com/docs/0J68
Step 4: Wiring... A detailed wiring diagram can be found here: http://www.zagrosrobotics.com/files/ZagrosLineMazeFollowWiring_08232015a.pdf Connect the following with the leads or jumpers :
Note : Digital Pin 3 is skipped and used by the Ardumoto motor driver. Ardumoto also uses pins 11, 12, and 13.
If you do not wish to solder, you may use the Alligator clips to extend the jumper wires from the board to the motors and battery packs. The switch is optional and not necessary with the alligator clips. Simply unclip either the positive or negative battery clip to disconnect power when not in use.
Step 5: Arduino Sketch...If you are new to Arduino, or need some further detail on how to install the software and where to save Sketches, you can find detailed instructions for windows here : http://www.zagrosrobotics.com/files/ZagrosArduinoInstallation_08232015a.pdf Download the Sketches and Library here : http://www.zagrosrobotics.com/files/ZagrosBasicLineFollower_08232015a.zip Extract the zipfile and move the " BasicLineFollower_08232015a" and “MotorDirTest_08232015a” folders to your Arduino sketches folder. Move the "QTRSensors" folder to the Arduino libraries folder. Plug in your Arduino/Redboard to your computer with the USB cable. Open and upload the “MotorDirTest_08232015a” sketch. Open the Serial Monitor and test your motors for correct wiring. See comments at the top of the sketch to help you make wiring changes if needed. After the motors are turning correctly, open and upload the " BasicLineFollower_08232015a" sketch.
Step 6: Test and Tune...The Romi is a lightweight but powerful robot. The battery cartridge holds 6 AA batteries. You may bridge the positive and negative ends with the alligator clips as shown:
The blue clips are the bridge that chain the 4 batteries in the front with the two batteries in the back. The red clip is positive and the black clip in the back is negative. We found this to be too much power for the “BasicLineFollower” program. To scale back the power, remove the blue clips and reattach the black clip aside the red clip. This uses the power of 4 batteries instead of 6.
Unplug your robot from the USB and set your robot on your lined course and turn it on. You should see the robot turn back and forth over the line and begin following. You can "tune" some of the variables in the sketch to affect its performance. Until you understand how the sketch works, only adjust the couple of variables noted for "Tune."
You can adjust the “calibration speed” (the sweeping motion of the sensor across the line) in the highlighted code below.
If you want to adjust the speed of the robot, scroll down to the bottom of the code and you can adjust each motor speed from 0 -255.
The sketch is only a basic example to help you learn several fundamentals of sensing and motor control. The real fun begins as you tune some of the variables and add further refined control functions while developing an understanding of how to instruct the robot to accomplish tasks.
|
![]() |
|