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:general_api [2018/05/22 14:26] pixycam |
wiki:v2:general_api [2018/05/22 15:08] pixycam |
||
---|---|---|---|
Line 1: | Line 1: | ||
===== Pixy2 General API ===== | ===== Pixy2 General API ===== | ||
+ | |||
+ | Pixy2's general API can be called through the base Pixy2 object: | ||
+ | |||
+ | <code> | ||
+ | Pixy2 pixy; | ||
+ | </code> | ||
==== Member functions ==== | ==== Member functions ==== | ||
Line 71: | Line 77: | ||
=== Pixy2Line line === | === Pixy2Line line === | ||
+ | This is an instance of the Line Tracking object associated with the line\_tracking program. | ||
==== Error codes ==== | ==== Error codes ==== | ||
=== PIXY_RESULT_ERROR === | === PIXY_RESULT_ERROR === | ||
+ | General error result | ||
+ | |||
=== PIXY_RESULT_BUSY === | === PIXY_RESULT_BUSY === | ||
+ | This is returned when Pixy has no new data. It is used in polling mode, as opposed to blocking mode. | ||
+ | |||
=== PIXY_RESULT_CHECKSUM_ERROR === | === PIXY_RESULT_CHECKSUM_ERROR === | ||
+ | This is returned when the data packet received contains a checksum error. | ||
+ | |||
=== PIXY_RESULT_TIMEOUT === | === PIXY_RESULT_TIMEOUT === | ||
+ | This is returned when Pixy2 has taken too long to return its result. | ||
+ | |||
=== PIXY_RESULT_BUTTON_OVERRIDE === | === PIXY_RESULT_BUTTON_OVERRIDE === | ||
+ | This is returned when the user is interacting with the button (e.g. teaching Pixy a signature) and can't perform the requested action. | ||