This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
wiki:v2:line_api [2018/07/03 16:57] 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 128: | 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). |