<< return to Pixycam.com

User Tools

Site Tools


wiki:v2:lego_line_following_demo

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
wiki:v2:lego_line_following_demo [2019/01/31 00:43]
pixycam
wiki:v2:lego_line_following_demo [2019/01/31 01:00]
pixycam
Line 43: Line 43:
 ===== Troubleshooting ===== ===== Troubleshooting =====
  
-  - If your robot turns away from your object, make sure that the motor cables aren't crossed. ​ That is, if you are facing the motor ports (the back of the robot), the left motor connects to port B, the right motor connects to port A. +  - If your robot turns away from the line, make sure that the motor cables aren't crossed. ​ That is, if you are facing the motor ports (the back of the robot), the left motor connects to port B, the right motor connects to port A. 
-  - If your robot doesn'​t follow ​the line closely, try tilting Pixy2 more downward toward the paper. +  - If your robot starts turning left before ​the line curves to the left (for example), try tilting Pixy2 more downward toward the paper. ​ That is, if Pixy2 is tilted too far up, it will see too much of the line in front of it and "​anticipate"​ any turns. ​ On the other hand, this might be what you want. :) 
-  - Although it's unlikely, sometimes the Vector can become "​inverted "such that the Vector points down instead of up, which will cause your robot to back-up (reverse) instead of move forward. ​ It will resolve itself because your robot will back-up and turn around such that the Vector is pointing up again, but it can be unexpected. ​ The easiest way to prevent ​the Vector from being is to place a blank sheet of paper in front of Pixy2 such that it loses the current Vector, then remove the paper before you start the program. ​ After you remove the paper, Pixy2 will see the line in front of it, assign it as the Vector, and (by default) choose an upward orientation. ​ Your robot will then move forward.+  - Although it's unlikely, sometimes the Vector can become "​inverted"​ such that the Vector points down instead of up, which will cause your robot to back-up (reverse) instead of move forward. ​ It will resolve itself because your robot will back-up and turn around such that the Vector is pointing up again, but it can be unexpected. ​ The easiest way to prevent ​this is to place a blank sheet of paper in front of Pixy2 such that it loses the current Vector, then remove the paper before you start the program. ​ After you remove the paper, Pixy2 will see the line in front of it, assign it as the Vector, and (by default) choose an upward orientation. ​ Your robot will then move forward.
  
  
Line 65: Line 65:
  
  
-===== What's Next =====+===== What's Next=====
  
 Can you extend this demo to make turns based on barcodes? ​ Barcode images (including roadsigns!) are available [[https://​pixycam.com/​downloads-pixy2/​|here]]. Can you extend this demo to make turns based on barcodes? ​ Barcode images (including roadsigns!) are available [[https://​pixycam.com/​downloads-pixy2/​|here]].
  
  
wiki/v2/lego_line_following_demo.txt · Last modified: 2019/01/31 01:43 by pixycam