Lab1: Line following

Steps to get the environment working:

  1. Open bluetooth
  2. Connect the boeboth with the computer. The pin code is 0000. The number of the bot must match the number on the dongle!
    It’s ok that it will not show connected after connecting, it’s for handshake only.
  3. Open the terminal
  4. Type cad
  5. Type botcommander
  6. Connect to the robot

Now write your code in the suitable editor. To compile and upload the code:

  1. Compile the code using botcommander
  2. If there is any previous code already running on the bot, clear it using the pushbutton on the Boe-Bot! The connection will disconnect if you don’t. It is possible to reconnect after this.
  3. Upload the code you just compiled
  4. The robot should automatically start running your code.
  5. Don’t forget to clear the old code before uploading a new one.

Task 1

  1. Form a team of 2 to 3 members. If possible, use the same members for the next two labs as well.
  2. Take a look at the robot manual
  3. Download the sample codes
  4. All tasks have the same structure: task, final solution and program codes – remember to check the given program codes in the BotCommander program folder
  5. Take a look at the final solution:
  6. Calibrate the Boe-Bot with standstill code. Try to understand the code. (0_calibrate.c)
  7. Take the moving forward and backward code and program the robot to move forwards and backwards. (1_move.c).
  8. Test the QTI sensor with QTI sensor code using file (2_qti.c)
  9. Now you have all the knowledge to detect the line and move the robot. Program the Boe-Bot to move along the black line. (3_line.c)

Bonus: Detecting obstacles

  1. Take a look at how detecting obstacles using top IR emitter works (4_top_ir.c)
  2. Implement this in your line following code  (5_line_ir.c)


Don’t forget to return the robots and bluetooth dongles! Log out of the machines, restore order in your workplace.