<< return to Pixycam.com

User Tools

Site Tools


wiki:v2:line_quickstart

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:line_quickstart [2018/07/03 19:30]
pixycam
wiki:v2:line_quickstart [2018/07/03 19:41]
pixycam
Line 1: Line 1:
-==== Line tracking quickstart ====+===== Line tracking quickstart ​=====
  
 This guide will help you get started with the line tracking algorithm on the Pixy2. ​ This guide will help you get started with the line tracking algorithm on the Pixy2. ​
  
-=== Running line tracking through PixyMon === +==== Running line tracking through PixyMon ​==== 
  
 PixyMon will display what Pixy2 detects graphically and is a good way to familiarize yourself with what the line tracking algorithm is capable of, and it's a good way to make adjustments. ​ Start by selecting the line tracking algorithm in the _Program_ menu.  PixyMon will display what Pixy2 detects graphically and is a good way to familiarize yourself with what the line tracking algorithm is capable of, and it's a good way to make adjustments. ​ Start by selecting the line tracking algorithm in the _Program_ menu. 
Line 61: Line 61:
  
  
-By default, Pixy2 will choose the branch automatically ​or based on default turn angle or the most recent call to [[wiki:​v2:​line_api|setNextTurn()]]. ​ You can change this behavior by enabling "​delayed turn" in the Expert configure tab.  ​+By default, Pixy2 will choose the branch automatically based on default turn angle or the most recent call to [[wiki:​v2:​line_api|setNextTurn()]]. ​ You can change this behavior by enabling "​delayed turn" in the Expert configure tab.  ​
  
  
Line 83: Line 83:
  
  
-=== Barcodes ===+==== Barcodes ​====
  
 We wanted Pixy2 to be able to receive simple commands or information while it is performing line tracking, so we added the barcode feature. ​ The barcodes are intended to act as "​roadsigns"​. ​ You can add graphics to the barcodes that are human-readable as long as you keep the barcode unobstructed. ​   To test the barcode functionality,​ download the print the [[https://​github.com/​charmedlabs/​pixy2/​raw/​master/​documents/​other/​all_codes.pdf|all_codes.pdf]] document.  ​ We wanted Pixy2 to be able to receive simple commands or information while it is performing line tracking, so we added the barcode feature. ​ The barcodes are intended to act as "​roadsigns"​. ​ You can add graphics to the barcodes that are human-readable as long as you keep the barcode unobstructed. ​   To test the barcode functionality,​ download the print the [[https://​github.com/​charmedlabs/​pixy2/​raw/​master/​documents/​other/​all_codes.pdf|all_codes.pdf]] document.  ​
Line 94: Line 94:
  
  
-=== Running a simple Arduino line tracking example ===+==== Running a simple Arduino line tracking example ​====
  
 If you haven'​t hooked your Arduino to your Pixy2 yet, use the supplied Arduino cable to connect Pixy to your Arduino as shown below. If you haven'​t hooked your Arduino to your Pixy2 yet, use the supplied Arduino cable to connect Pixy to your Arduino as shown below.
Line 111: Line 111:
  
  
-FIXME 
 <​code>​ <​code>​
 +vector: (43 31) (60 39) index: 3 flags 4 
 +vector: (43 31) (60 39) index: 3 flags 0 
 +vector: (44 39) (68 33) index: 2 flags 4 
 +vector: (44 39) (68 33) index: 2 flags 4 
 +vector: (44 40) (67 32) index: 2 flags 0 
 +vector: (44 40) (67 32) index: 2 flags 0 
 +vector: (39 38) (69 38) index: 9 flags 0 
 +vector: (39 38) (69 38) index: 9 flags 0 
 +intersection:​ (39 25) 
 +  0: index: 68 angle: -122 
 +  1: index: 117 angle: -3 
 +  2: index: 106 angle: 90 
 +  3: index: 95 angle: 158 
 +vector: (44 40) (67 32) index: 2 flags 0 
 +vector: (39 38) (69 38) index: 9 flags 0 
 +vector: (39 38) (69 38) index: 9 flags 0
 </​code>​ </​code>​
 +
  
 In particular, when you hold a barcode, line or intersection,​ you can see the numbers that Pixy2 returns. ​ Bear in mind that the numbers Pixy2 returns are based on the coordinate system below. ​ In particular, when you hold a barcode, line or intersection,​ you can see the numbers that Pixy2 returns. ​ Bear in mind that the numbers Pixy2 returns are based on the coordinate system below. ​
Line 122: Line 137:
  
  
-=== The line tracking API ===+Also note that the intersections and barcodes are only reported once every time the intersection or barcode comes into view.  This means you (the programmer) doesn'​t need to keep track of which intersections and barcodes have been seen before and which have not.   
 + 
 + 
 + 
 +==== The line tracking API ====
  
 The line tracking API can be found [[wiki:​v2:​line_api|here]]. ​ It applies to Arduino (SPI interface) as well as the Raspberry Pi, or similar controllers (USB interface).  ​ The line tracking API can be found [[wiki:​v2:​line_api|here]]. ​ It applies to Arduino (SPI interface) as well as the Raspberry Pi, or similar controllers (USB interface).  ​
wiki/v2/line_quickstart.txt · Last modified: 2019/01/30 01:50 by pixycam