This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Next revision Both sides next revision | ||
wiki:v2:line_api [2018/07/03 16:56] pixycam |
wiki:v2:line_api [2018/09/28 19:58] jfrench Imported by DokuWiki Advanced Plugin |
||
---|---|---|---|
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. | ||
- | A good program to run to familiarize yourself the Line Tracking algorithm is the *line\_hello\_world* example found in the Arduino library. | + | 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 45: | Line 47: | ||
- | [{{wiki:v2:image_364.png?500|Line tracking image coordinates from Pixy2's perspective. See note (3) below about resolution.}}] | + | [{{wiki:v2:image_366.png?500|Line tracking image coordinates from Pixy2's perspective. See note (3) below about resolution.}}] |
| | ||
Line 82: | Line 84: | ||
- | [{{wiki:v2:wiki:v2:image_364.png|Angle coordinates from Pixy2's perspective.}}] | + | [{{wiki:v2:image_364.png?500|Angle coordinates from Pixy2's perspective.}}] |
Line 128: | Line 130: | ||
== 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). |