<< return to Pixycam.com

User Tools

Site Tools


wiki:v2:line_api

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
wiki:v2:line_api [2018/07/02 16:37]
pixycam
wiki:v2:line_api [2018/10/10 20:05] (current)
jfrench added protocol reference link
Line 9: Line 9:
 </​code>​ </​code>​
  
-The functions in this API will always return errors unless ​the [[wiki:v2:line_tracking|line_tracking]] program is being run+See also the [[wiki:v2:general_api|Pixy2 General API]], [[wiki:​v2:​ccc_api|Color Connected Components API]], and [[wiki:​v2:​video_api|Video API]] for other functionality.
  
-A good program to run to familiarize yourself the Line Tracking algorithm is the *line\_hello\_world* example found in the Arduino library.  ​+For a byte-level reference to the protocol, check out the new [[wiki:​v2:​protocol_reference|Pixy2 Serial Protocol - Packet Reference]] 
 + 
 + 
 +Firmware versions 3.0.11 and greater will automatically switch to the [[wiki:​v2:​line_tracking|line_tracking]] program when making requests through the line tracking API.   
 + 
 + 
 +A good program to run to familiarize yourself the Line Tracking algorithm is the *line\_hello\_world* example found in the Arduino ​Pixy2 library.  This [[wiki:​v2:​line_quickstart|quickstart guide]] will get you off to a good start.  ​
  
 ==== Whoa, this looks complicated ==== ==== Whoa, this looks complicated ====
  
-The line-tracking algorithm is really easy to use, especially if you stick to **getMainFeatures()**,​ which does it's best to keep your program simple, and it does a pretty good job.  ​+The line-tracking algorithm is really easy to use, especially if you stick to **getMainFeatures()**,​ which does it's best to keep your program simple, and it does a pretty good job.  ​If you haven'​t stepped through this [[wiki:​v2:​line_quickstart|quickstart guide]], do it!
  
  
Line 80: Line 86:
  
 Turn angles are specified in degrees, with 0 being straight ahead, left being 90 and right being -90 (for example), although any valid angle value can be used.  Valid angles are between -180 and 180.    Turn angles are specified in degrees, with 0 being straight ahead, left being 90 and right being -90 (for example), although any valid angle value can be used.  Valid angles are between -180 and 180.   
 +
 +
 +[{{wiki:​v2:​image_364.png?​500|Angle coordinates from Pixy2'​s perspective.}}]
  
  
Line 125: Line 134:
  
 == uint8_t m_x1 == == uint8_t m_x1 ==
-This variable contains the x location of the head of the Vector or line.  The value ranges between 0 and _frameWidth_ (79).+This variable contains the x location of the head (arrow end) of the Vector or line.  The value ranges between 0 and _frameWidth_ (79).
  
  
 == uint8_t m_y1 == == uint8_t m_y1 ==
-This variable contains the y location of the head of the Vector or line.  The value ranges between 0 and _frameWidth_ (52).+This variable contains the y location of the head (arrow end) of the Vector or line.  The value ranges between 0 and _frameWidth_ (52).
  
  
wiki/v2/line_api.1530549455.txt.gz · Last modified: 2018/07/02 16:37 by pixycam